bug#22725

combining the final result variable in such way that either option of the test execution
will yield zero.
parent 2e60009c
......@@ -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;
......@@ -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
......@@ -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
......@@ -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;
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