Skip to content

Commit 1547e55

Browse files
committed
fix more sporadic failures on main.kill
sometimes `KILL QUERY ID @id` was executed before the previous `send SELECT SLEEP(1000)` has reached the parser. As the statement resets the kill status before execution, the effect of the KILL was ignored.
1 parent 401ae95 commit 1547e55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mysql-test/main/kill.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ connection default;
542542
--echo #
543543
send SELECT SLEEP(1000);
544544
connection con1;
545-
let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)';
545+
let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)' AND STATE='User sleep';
546546
source include/wait_condition.inc;
547547
KILL QUERY ID @id;
548548
connection default;
@@ -560,7 +560,7 @@ CREATE USER u1@localhost;
560560
send SELECT SLEEP(1000);
561561

562562
connection con1;
563-
let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)';
563+
let $wait_condition= SELECT @id:=QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO='SELECT SLEEP(1000)' AND STATE='User sleep';
564564
source include/wait_condition.inc;
565565
let $id= `SELECT @id`;
566566

0 commit comments

Comments
 (0)