Commit 60ee2bbe authored by unknown's avatar unknown

Improve error message for faulty usage of "inc" and "dec"


client/mysqltest.c:
  Improve error messages for "inc" and "dec"
mysql-test/r/mysqltest.result:
  Update test result
parent e08efc15
......@@ -1360,9 +1360,9 @@ int do_modify_var(struct st_query *query,
const char *p= query->first_argument;
VAR* v;
if (!*p)
die("Missing arguments to %.*s", query->first_word_len, query->query);
die("Missing argument to %.*s", query->first_word_len, query->query);
if (*p != '$')
die("First argument to %.*s must be a variable (start with $)",
die("The argument to %.*s must be a variable (start with $)",
query->first_word_len, query->query);
v= var_get(p, &p, 1, 0);
switch (operator) {
......@@ -1373,7 +1373,7 @@ int do_modify_var(struct st_query *query,
v->int_val++;
break;
default:
die("Invalid operator to do_operator");
die("Invalid operator to do_modify_var");
break;
}
v->int_dirty= 1;
......
......@@ -305,8 +305,8 @@ mysqltest: At line 1: Invalid argument to real_sleep "abc"
101
hej
1
mysqltest: At line 1: Missing arguments to inc
mysqltest: At line 1: First argument to inc must be a variable (start with $)
mysqltest: At line 1: Missing argument to inc
mysqltest: At line 1: The argument to inc must be a variable (start with $)
mysqltest: At line 1: End of line junk detected: "1000"
4
4
......@@ -315,8 +315,8 @@ mysqltest: At line 1: End of line junk detected: "1000"
99
hej
-1
mysqltest: At line 1: Missing arguments to dec
mysqltest: At line 1: First argument to dec must be a variable (start with $)
mysqltest: At line 1: Missing argument to dec
mysqltest: At line 1: The argument to dec must be a variable (start with $)
mysqltest: At line 1: End of line junk detected: "1000"
mysqltest: At line 1: Missing arguments to system, nothing to do!
mysqltest: At line 1: Missing arguments to system, nothing to do!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment