diff --git a/client/mysqltest.c b/client/mysqltest.c index 184ca721b6cbdb92e7088fa4c560c51d60064ffb..a0ae9cc80ad1cfb972c4d52d4995310d6658e2c9 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -837,9 +837,9 @@ int var_set(const char *var_name, const char *var_name_end, int open_file(const char *name) { + char buff[FN_REFLEN]; DBUG_ENTER("open_file"); DBUG_PRINT("enter", ("name: %s", name)); - char buff[FN_REFLEN]; if (!test_if_hard_path(name)) { strxmov(buff, opt_basedir, name, NullS); @@ -868,9 +868,9 @@ int open_file(const char *name) int check_eol_junk(const char *eol) { + const char *p= eol; DBUG_ENTER("check_eol_junk"); DBUG_PRINT("enter", ("eol: %s", eol)); - const char *p= eol; /* Remove all spacing chars except new line */ while (*p && my_isspace(charset_info, *p) && (*p != '\n')) p++; @@ -1665,7 +1665,7 @@ static uint get_errcodes(match_err *to,struct st_query *q) } } if (!e->name) - die("Unknown SQL error '%s'\n", start); + die("Unknown SQL error '%s'", start); } else { @@ -2089,7 +2089,7 @@ int connect_n_handle_errors(struct st_query *q, MYSQL* con, const char* host, if (record) { if (!q->record_file[0] && !result_file) - die("At line %u: Missing result file", start_lineno); + die("Missing result file"); if (!result_file) str_to_file(q->record_file, ds->str, ds->length); } @@ -2235,7 +2235,7 @@ int do_block(enum block_cmd cmd, struct st_query* q) char *p= q->first_argument; const char *expr_start, *expr_end; VAR v; - const char *cmd_name= (cmd == Q_WHILE ? "while" : "if"); + const char *cmd_name= (cmd == cmd_while ? "while" : "if"); /* Check stack overflow */ if (cur_block == block_stack_end) @@ -3092,7 +3092,7 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags) warn_res= mysql_store_result(mysql); } if (!warn_res) - verbose_msg("Warning count is %u but didn't get any warnings\n", + verbose_msg("Warning count is %u but didn't get any warnings", count); else { @@ -3183,7 +3183,7 @@ static int normal_handle_error(const char *query, struct st_query *q, abort_not_supported_test(); if (q->abort_on_error) - die("At line %u: query '%s' failed: %d: %s", start_lineno, query, + die("query '%s' failed: %d: %s", query, mysql_errno(mysql), mysql_error(mysql)); else { @@ -3710,7 +3710,7 @@ static void run_query_stmt_handle_warnings(MYSQL *mysql, DYNAMIC_STRING *ds) { MYSQL_RES *warn_res= mysql_store_result(mysql); if (!warn_res) - verbose_msg("Warning count is %u but didn't get any warnings\n", + verbose_msg("Warning count is %u but didn't get any warnings", count); else { diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 964a69ffb127baed0e6c40c9c164d89a513fa725..eaf4fd559283254b8c9635fc9e005bf8380089b4 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -684,9 +684,7 @@ set v1 = 1; set v2 = 2; set v3 = 1000000000000; set v4 = 2000000000000; set v5 = while v5 < 100000 do set v1 = v1 + 0.000000000001; set v2 = v2 - 0.000000000001; set v3 = v3 + 1; set v4 = v4 - 1; set v5 = v5 + 1; end while; select v1, v2, v3 * 0.000000000001, v4 * 0.000000000001; end;// -# call p1()// -# v1 v2 v3 * 0.000000000001 v4 * 0.000000000001 1.000000100000 1.999999900000 1.000000100000 1.999999900000 drop procedure p1; diff --git a/mysql-test/t/flush_read_lock_kill.test b/mysql-test/t/flush_read_lock_kill.test index 02384357711c821c59e0e6bd744b5a6303e267c6..de2576300dc2e000ba511a0d7cad92359226cfaf 100644 --- a/mysql-test/t/flush_read_lock_kill.test +++ b/mysql-test/t/flush_read_lock_kill.test @@ -34,7 +34,7 @@ send flush tables with read lock; connection con2; select ((@id := kill_id) - kill_id) from t1; ---sleep 2; # leave time for FLUSH to block +--sleep 2 # leave time for FLUSH to block kill connection @id; connection con1; diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index 37e11e14df52b720457efa18cf548408a4616917..a40aa7953feda721bffe23620b8757825e5d92f7 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -47,7 +47,7 @@ select get_lock("a", 10); connection con2; let $ID= `select connection_id()`; send select get_lock("a", 10); ---real_sleep 2; +real_sleep 2; connection con1; disable_query_log; eval kill query $ID; diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index baa8dbec09d0513fdd703159b9e7e31f47f46afb..1da41bfa913edf55eec7198fb3f1e6d8012349c9 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -140,7 +140,7 @@ select * from t2; alter table t2 drop key day; connection master; delete from t2; ---error 1062; +--error 1062 load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test index e2a8982ebaab20954d4c2f46d384689a7bc4dc50..5557f7675d53970892d9ec86ca252e2b1a71a694 100644 --- a/mysql-test/t/rpl_sp.test +++ b/mysql-test/t/rpl_sp.test @@ -27,7 +27,7 @@ drop function if exists fn1; --enable_warnings delimiter |; ---error 1418; # not deterministic +--error 1418 # not deterministic create procedure foo() begin declare b int; @@ -85,7 +85,7 @@ call foo2(); --replace_column 2 # 5 # show binlog events from 605; ---error 1418; +--error 1418 alter procedure foo2 contains sql; # SP with definer's right @@ -106,7 +106,7 @@ grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; connect (con1,127.0.0.1,zedjzlcsjhd,,mysqltest1,$MASTER_MYPORT,); connection con1; ---error 1419; # only full-global-privs user can create a routine +--error 1419 # only full-global-privs user can create a routine create procedure foo4() deterministic insert into t1 values (10); @@ -127,7 +127,7 @@ delimiter ;| # I add ,0 so that it does not print the error in the test output, # because this error is hostname-dependent ---error 1142,0; +--error 1142,0 call foo4(); # invoker has no INSERT grant on table => failure show warnings; @@ -136,7 +136,7 @@ call foo3(); # success (definer == root) show warnings; --replace_result localhost.localdomain localhost 127.0.0.1 localhost ---error 1142,0; +--error 1142,0 call foo4(); # definer's rights => failure show warnings; @@ -226,7 +226,7 @@ select * from mysql.proc where db='mysqltest1'; # And now triggers connection con1; ---error 1227; +--error 1227 create trigger trg before insert on t1 for each row set new.a= 10; connection master; diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 302acc9bef2268e8aea5bf623f769b5545eb89ea..20f0b072bfd599d3df68d620771023ced5a91efe 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -315,7 +315,7 @@ INSERT INTO t1 (col2) VALUES(CAST('0000-00-00' AS DATETIME)); ## Test INSERT with CAST AS DATETIME into TIMESTAMP # All test cases expected to fail should return # SQLSTATE 22007 <invalid datetime value> -!$1292 +--error 1292 INSERT INTO t1 (col3) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); -- should return OK -- We accept this to be a failure @@ -406,7 +406,7 @@ INSERT INTO t1 (col2) VALUES(CONVERT('0000-00-00',DATETIME)); ## Test INSERT with CONVERT to DATETIME into DATETIME # All test cases expected to fail should return # SQLSTATE 22007 <invalid datetime value> -!$1292 +--error 1292 INSERT INTO t1 (col3) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); -- should return OK -- We accept this to be a failure diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 55d004b361fb33c1e5ecf9d6916e136d547dc733..39c5888a1d9c88fd7842d5c8791c98a41c9036c6 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -494,7 +494,7 @@ select 0.8 = 0.7 + 0.1; # #drop procedure p1; # -delimiter // +delimiter //; # create procedure p1 () begin declare v1, v2, v3, v4 decimal(16,12); declare v5 int;