mariadb/mysql-test/main/kill_processlist-6619.result
Kristian Nielsen ef7abc881c MDEV-10793: MDEV-33292: main.kill_processlist-6619 fails sporadically in buildbot
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>
2024-03-14 22:48:12 +01:00

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