mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
ef7abc881c
There were several races in the main.kill_processlist-6619 testcase: - Lingering connections from a previous test case could be visible in SHOW PROCESSLIST and cause .result diff. - A sync point "dispatch_command_end" was ineffective, as it was consumed at the end of the SET DEBUG command itself. - The signal from sync point "before_execute_sql_command" could override an earlier signal, causing DEBUG_SYNC timeout and test failure. - The final SHOW PROCESSLIST could occasionally see a connection in state "Busy" instead of the expected "Sleep". Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
31 lines
986 B
Text
31 lines
986 B
Text
SET DEBUG_SYNC='dispatch_command_end2 SIGNAL ready EXECUTE 3';
|
|
connect con1,localhost,root,,;
|
|
SET DEBUG_SYNC='now wait_for ready';
|
|
connection default;
|
|
SET DEBUG_SYNC='dispatch_command_end WAIT_FOR go EXECUTE 2';
|
|
select 1;
|
|
connection con1;
|
|
SET DEBUG_SYNC='now signal go';
|
|
SET DEBUG_SYNC='now wait_for ready';
|
|
SET DEBUG_SYNC='now signal go';
|
|
SET DEBUG_SYNC='now wait_for ready';
|
|
SET DEBUG_SYNC='RESET';
|
|
SHOW PROCESSLIST;
|
|
Id User Host db Command Time State Info Progress
|
|
# root # test Sleep # # NULL 0.000
|
|
# root # test Query # # SHOW PROCESSLIST 0.000
|
|
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';
|
|
connection con1;
|
|
ERROR 70100: Query execution was interrupted
|
|
SET DEBUG_SYNC='reset';
|
|
SHOW PROCESSLIST;
|
|
Id User Host db Command Time State Info Progress
|
|
# root # test Sleep # # NULL 0.000
|
|
# root # test Query # # SHOW PROCESSLIST 0.000
|