Fixed random failure in main.kill_processlist-6619 (take 3)

followup for 81f75ca83a

improve over take 2. It's technically possible, though unlikely,
to see THD after it already reset the info to NULL, but has not
changed the command to COM_SLEEP yet (see THD::mark_connection_idle()).

Let's wait for "Sleep", not for NULL.
This commit is contained in:
Sergei Golubchik 2024-04-13 14:36:15 +02:00
parent 69b5fdf32a
commit 6a4ac4c72d

View file

@ -10,7 +10,7 @@ source include/wait_condition.inc;
--connect (con1,localhost,root,,)
--let $con_id = `SELECT CONNECTION_ID()`
let $wait_condition=select info is NULL from information_schema.processlist where id != $con_id;
let $wait_condition=select command = 'sleep' from information_schema.processlist where id != $con_id;
source include/wait_condition.inc;
--replace_result Execute Query
@ -32,9 +32,7 @@ reap;
SET DEBUG_SYNC='reset';
# Wait until default connection has reset query string
let $wait_condition=
SELECT COUNT(*) = 1 from information_schema.processlist
WHERE info is NULL;
let $wait_condition=select command = 'sleep' from information_schema.processlist where id != $con_id;
--source include/wait_condition.inc
--replace_result Execute Query