Commit 83bbe368 authored by Sergei Golubchik's avatar Sergei Golubchik

fix sporadic failures of main.processlist_notembedded

the test was doing

--replace_result $con_id con_id
eval SHOW EXPLAIN FOR $con_id;

with the intention of replacing the variable part of the statement
in the result log. But actually replace_result replaces everything
that matches. In particular, when $con_id is 100, the warning

Note   1003    select sleep(100000)

becomes

Note   con_id3    select sleep(con_id000)
parent d463677f
# #
# MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
# #
connect con1,localhost,root,,; connect con1,localhost,root;
connection con1; connection con1;
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go'; SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go';
connection default; connection default;
...@@ -13,17 +13,21 @@ user ...@@ -13,17 +13,21 @@ user
disconnect con1; disconnect con1;
connection default; connection default;
SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET';
End of 5.5 tests #
# End of 5.5 tests
#
# #
# MDEV-23752: SHOW EXPLAIN FOR thd waits for sleep # MDEV-23752: SHOW EXPLAIN FOR thd waits for sleep
# #
connect con1,localhost,root,,; connect con1,localhost,root;
select sleep(100000);; select sleep(100000);
connection default; connection default;
SHOW EXPLAIN FOR con_id; SHOW EXPLAIN FOR $con_id;
id select_type table type possible_keys key key_len ref rows Extra 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 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings: Warnings:
Note 1003 select sleep(100000) Note 1003 select sleep(100000)
KILL QUERY con_id; KILL QUERY $con_id;
#
# End of 10.2 tests # End of 10.2 tests
#
...@@ -7,7 +7,7 @@ source include/count_sessions.inc; ...@@ -7,7 +7,7 @@ source include/count_sessions.inc;
--echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes --echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
--echo # --echo #
connect (con1,localhost,root,,); connect con1,localhost,root;
connection con1; connection con1;
...@@ -39,22 +39,22 @@ SET DEBUG_SYNC = 'RESET'; ...@@ -39,22 +39,22 @@ SET DEBUG_SYNC = 'RESET';
source include/wait_until_count_sessions.inc; source include/wait_until_count_sessions.inc;
--echo End of 5.5 tests --echo #
--echo # End of 5.5 tests
--echo #
--echo # --echo #
--echo # MDEV-23752: SHOW EXPLAIN FOR thd waits for sleep --echo # MDEV-23752: SHOW EXPLAIN FOR thd waits for sleep
--echo # --echo #
--connect (con1,localhost,root,,) --connect con1,localhost,root
--let $con_id = `SELECT CONNECTION_ID()` --let $con_id = `SELECT CONNECTION_ID()`
--send select sleep(100000); --send select sleep(100000)
--connection default --connection default
evalp SHOW EXPLAIN FOR $con_id;
evalp KILL QUERY $con_id;
--replace_result $con_id con_id --echo #
eval SHOW EXPLAIN FOR $con_id;
--replace_result $con_id con_id
eval KILL QUERY $con_id;
--echo # End of 10.2 tests --echo # End of 10.2 tests
--echo #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment