mariadb/mysql-test/r/processlist_notembedded.result
Sergei Golubchik 2cdf8a9327 MDEV-23752 SHOW EXPLAIN FOR thd waits for sleep
fix main.processlist_notembedded test

* before EXPLAINing `select sleep` wait for select to start
  (fixes "Target is not running an EXPLAINable command")
* after killing sleep, wait for it to die
  (fixes test failures on --repeat when old sleep shows on a test rerun)

* unify with 10.3, copy minor changes from there
  (`--echo End of 5.5` vs `--echo # End of 5.5`, etc)
2021-07-31 09:27:53 +02:00

34 lines
797 B
Text

#
# MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
#
connect con1,localhost,root;
connection con1;
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go';
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
FOUND 1 /sleep/ in MDEV-20466.text
SET DEBUG_SYNC= 'now SIGNAL go';
connection con1;
user
disconnect con1;
connection default;
SET DEBUG_SYNC = 'RESET';
#
# End of 5.5 tests
#
#
# MDEV-23752: SHOW EXPLAIN FOR thd waits for sleep
#
connect con1,localhost,root;
select sleep(100000);
connection default;
SHOW EXPLAIN FOR $con_id;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select sleep(100000)
KILL QUERY $con_id;
disconnect con1;
#
# End of 10.2 tests
#