mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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>
This commit is contained in:
@ -1,4 +1,8 @@
|
|||||||
|
SET DEBUG_SYNC='dispatch_command_end SIGNAL ready WAIT_FOR go';
|
||||||
|
select 1;
|
||||||
connect con1,localhost,root,,;
|
connect con1,localhost,root,,;
|
||||||
|
SET DEBUG_SYNC='now wait_for ready';
|
||||||
|
SET DEBUG_SYNC='now signal go';
|
||||||
SHOW PROCESSLIST;
|
SHOW PROCESSLIST;
|
||||||
Id User Host db Command Time State Info Progress
|
Id User Host db Command Time State Info Progress
|
||||||
# root # test Sleep # # NULL 0.000
|
# 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';
|
SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
|
||||||
SHOW PROCESSLIST;
|
SHOW PROCESSLIST;
|
||||||
connection default;
|
connection default;
|
||||||
|
1
|
||||||
|
1
|
||||||
SET DEBUG_SYNC='now WAIT_FOR ready';
|
SET DEBUG_SYNC='now WAIT_FOR ready';
|
||||||
KILL QUERY con_id;
|
KILL QUERY con_id;
|
||||||
SET DEBUG_SYNC='now SIGNAL go';
|
SET DEBUG_SYNC='now SIGNAL go';
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
--source include/have_debug_sync.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,,)
|
--connect (con1,localhost,root,,)
|
||||||
|
SET DEBUG_SYNC='now wait_for ready';
|
||||||
|
SET DEBUG_SYNC='now signal go';
|
||||||
|
|
||||||
--let $con_id = `SELECT CONNECTION_ID()`
|
--let $con_id = `SELECT CONNECTION_ID()`
|
||||||
--replace_result Execute Query
|
--replace_result Execute Query
|
||||||
--replace_column 1 # 3 # 6 # 7 #
|
--replace_column 1 # 3 # 6 # 7 #
|
||||||
@ -12,6 +19,8 @@ SHOW PROCESSLIST;
|
|||||||
SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
|
SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
|
||||||
send SHOW PROCESSLIST;
|
send SHOW PROCESSLIST;
|
||||||
--connection default
|
--connection default
|
||||||
|
--reap
|
||||||
|
|
||||||
# We must wait for the SHOW PROCESSLIST query to have started before sending
|
# 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
|
# the kill. Otherwise, the KILL may be lost since it is reset at the start of
|
||||||
# query execution.
|
# query execution.
|
||||||
|
Reference in New Issue
Block a user