Loading mysql-test/r/binlog_killed.result +3 −15 Original line number Diff line number Diff line Loading @@ -6,19 +6,7 @@ get_lock("a", 20) 1 reset master; insert into t2 values (null, null), (null, get_lock("a", 10)),(null, get_lock("a", 10)); select count(*) from t2 /* must be 3 */; count(*) 3 select (@a:=load_file("MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) is not null; (@a:=load_file("MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) is not null 1 select @a like "%#%error_code=0%" /* must return 1 */; @a like "%#%error_code=0%" 1 select @a like "%insert into%" /* must return 1 */; @a like "%insert into%" 1 select @result /* must be zero either way */; @result 0 drop table t1,t2,t3; mysql-test/t/binlog_killed.test +12 −16 Original line number Diff line number Diff line Loading @@ -31,24 +31,12 @@ disable_abort_on_error; disable_query_log; disable_result_log; while (`select count(*) from t2`) { sleep 0.1; dec $counter; if (!$counter) { die("Waited too long for query to suceed"); } } eval kill query $ID; enable_abort_on_error; enable_query_log; enable_result_log; connection con2; --error 0,ER_QUERY_INTERRUPTED reap; select count(*) from t2 /* must be 3 */; let $rows= `select count(*) from t2 /* must be 1 or 0 */`; --exec $MYSQL_BINLOG --start-position=126 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR Loading @@ -56,8 +44,16 @@ eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) is not null; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval select @a like "%#%error_code=0%" /* must return 1 */; eval select @a like "%insert into%" /* must return 1 */; let $error_code= `select @a like "%#%error_code=0%" /* must return 1 or 0*/`; let $insert_binlogged= `select @a like "%insert into%" /* must return 1 or 0 */`; eval set @result= $rows-2*$error_code - $insert_binlogged; enable_abort_on_error; enable_query_log; enable_result_log; select @result /* must be zero either way */; # the functions are either *insensitive* to killing or killing can cause # strange problmes with the error propagation out of SF's stack # Bug#27563, Bug#27565, BUG#24971 Loading Loading @@ -245,7 +241,7 @@ drop function bug27563; drop function bug27565; } #system rm $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ; system rm $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ; drop table t1,t2,t3; Loading
mysql-test/r/binlog_killed.result +3 −15 Original line number Diff line number Diff line Loading @@ -6,19 +6,7 @@ get_lock("a", 20) 1 reset master; insert into t2 values (null, null), (null, get_lock("a", 10)),(null, get_lock("a", 10)); select count(*) from t2 /* must be 3 */; count(*) 3 select (@a:=load_file("MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) is not null; (@a:=load_file("MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) is not null 1 select @a like "%#%error_code=0%" /* must return 1 */; @a like "%#%error_code=0%" 1 select @a like "%insert into%" /* must return 1 */; @a like "%insert into%" 1 select @result /* must be zero either way */; @result 0 drop table t1,t2,t3;
mysql-test/t/binlog_killed.test +12 −16 Original line number Diff line number Diff line Loading @@ -31,24 +31,12 @@ disable_abort_on_error; disable_query_log; disable_result_log; while (`select count(*) from t2`) { sleep 0.1; dec $counter; if (!$counter) { die("Waited too long for query to suceed"); } } eval kill query $ID; enable_abort_on_error; enable_query_log; enable_result_log; connection con2; --error 0,ER_QUERY_INTERRUPTED reap; select count(*) from t2 /* must be 3 */; let $rows= `select count(*) from t2 /* must be 1 or 0 */`; --exec $MYSQL_BINLOG --start-position=126 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR Loading @@ -56,8 +44,16 @@ eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) is not null; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval select @a like "%#%error_code=0%" /* must return 1 */; eval select @a like "%insert into%" /* must return 1 */; let $error_code= `select @a like "%#%error_code=0%" /* must return 1 or 0*/`; let $insert_binlogged= `select @a like "%insert into%" /* must return 1 or 0 */`; eval set @result= $rows-2*$error_code - $insert_binlogged; enable_abort_on_error; enable_query_log; enable_result_log; select @result /* must be zero either way */; # the functions are either *insensitive* to killing or killing can cause # strange problmes with the error propagation out of SF's stack # Bug#27563, Bug#27565, BUG#24971 Loading Loading @@ -245,7 +241,7 @@ drop function bug27563; drop function bug27565; } #system rm $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ; system rm $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ; drop table t1,t2,t3;