Commit 8b3f470c authored by Monty's avatar Monty

Fixed random failure in main.kill_processlist-6619

The problem was that SHOW PROCESSLIST was done before the command of
the default connection was cleared.

Reviewer: Sergei Golubchik <serg@mariadb.org>
parent 32546877
SET DEBUG_SYNC='dispatch_command_end SIGNAL ready WAIT_FOR go';
select 1;
connect con1,localhost,root,,;
SET DEBUG_SYNC='now wait_for ready';
SET DEBUG_SYNC='now signal go';
SHOW PROCESSLIST;
Id User Host db Command Time State Info Progress
# root # test Sleep # # NULL 0.000
......@@ -6,6 +10,8 @@ Id User Host db Command Time State Info Progress
SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
SHOW PROCESSLIST;
connection default;
1
1
SET DEBUG_SYNC='now WAIT_FOR ready';
KILL QUERY con_id;
SET DEBUG_SYNC='now SIGNAL go';
......
......@@ -4,7 +4,14 @@
--source include/not_embedded.inc
--source include/have_debug_sync.inc
# This is to ensure that the following SHOW PROCESSLIST does not show the query
SET DEBUG_SYNC='dispatch_command_end SIGNAL ready WAIT_FOR go';
--send select 1
--connect (con1,localhost,root,,)
SET DEBUG_SYNC='now wait_for ready';
SET DEBUG_SYNC='now signal go';
--let $con_id = `SELECT CONNECTION_ID()`
--replace_result Execute Query
--replace_column 1 # 3 # 6 # 7 #
......@@ -12,6 +19,8 @@ SHOW PROCESSLIST;
SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
send SHOW PROCESSLIST;
--connection default
--reap
# We must wait for the SHOW PROCESSLIST query to have started before sending
# the kill. Otherwise, the KILL may be lost since it is reset at the start of
# query execution.
......
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