Skip to content

Commit c287873

Browse files
committed
MDEV-7352: main.kill_processlist-6619 fails sporadically in buildbot
After fix of MDEV-6728, the KILL signal is reset at the start of query execution. This means that in this test case, we need to wait for the to-be-killed query to have started; otherwise the kill signal can be lost, causing the test case to fail.
1 parent b070813 commit c287873

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

mysql-test/r/kill_processlist-6619.result

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ SHOW PROCESSLIST;
33
Id User Host db Command Time State Info Progress
44
# root # test Sleep # # NULL 0.000
55
# root # test Query # # SHOW PROCESSLIST 0.000
6-
SET DEBUG_SYNC='before_execute_sql_command WAIT_FOR go';
6+
SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
77
SHOW PROCESSLIST;
88
connection default;
9+
SET DEBUG_SYNC='now WAIT_FOR ready';
910
KILL QUERY con_id;
1011
SET DEBUG_SYNC='now SIGNAL go';
1112
connection con1;
1213
ERROR 70100: Query execution was interrupted
14+
SET DEBUG_SYNC='reset';
1315
SHOW PROCESSLIST;
1416
Id User Host db Command Time State Info Progress
1517
# root # test Sleep # # NULL 0.000

mysql-test/t/kill_processlist-6619.test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@
99
--let $con_id = `SELECT CONNECTION_ID()`
1010
--replace_column 1 # 3 # 6 # 7 #
1111
SHOW PROCESSLIST;
12-
SET DEBUG_SYNC='before_execute_sql_command WAIT_FOR go';
12+
SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
1313
send SHOW PROCESSLIST;
1414
--connection default
15+
# We must wait for the SHOW PROCESSLIST query to have started before sending
16+
# the kill. Otherwise, the KILL may be lost since it is reset at the start of
17+
# query execution.
18+
SET DEBUG_SYNC='now WAIT_FOR ready';
1519
--replace_result $con_id con_id
1620
eval KILL QUERY $con_id;
1721
SET DEBUG_SYNC='now SIGNAL go';
1822
--connection con1
1923
--error ER_QUERY_INTERRUPTED
2024
reap;
25+
SET DEBUG_SYNC='reset';
2126
--replace_column 1 # 3 # 6 # 7 #
2227
SHOW PROCESSLIST;

0 commit comments

Comments
 (0)