Skip to content

Commit 83bbe36

Browse files
committed
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)
1 parent d463677 commit 83bbe36

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
33
#
4-
connect con1,localhost,root,,;
4+
connect con1,localhost,root;
55
connection con1;
66
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go';
77
connection default;
@@ -13,17 +13,21 @@ user
1313
disconnect con1;
1414
connection default;
1515
SET DEBUG_SYNC = 'RESET';
16-
End of 5.5 tests
16+
#
17+
# End of 5.5 tests
18+
#
1719
#
1820
# MDEV-23752: SHOW EXPLAIN FOR thd waits for sleep
1921
#
20-
connect con1,localhost,root,,;
21-
select sleep(100000);;
22+
connect con1,localhost,root;
23+
select sleep(100000);
2224
connection default;
23-
SHOW EXPLAIN FOR con_id;
25+
SHOW EXPLAIN FOR $con_id;
2426
id select_type table type possible_keys key key_len ref rows Extra
2527
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
2628
Warnings:
2729
Note 1003 select sleep(100000)
28-
KILL QUERY con_id;
30+
KILL QUERY $con_id;
31+
#
2932
# End of 10.2 tests
33+
#

mysql-test/main/processlist_notembedded.test

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source include/count_sessions.inc;
77
--echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
88
--echo #
99

10-
connect (con1,localhost,root,,);
10+
connect con1,localhost,root;
1111

1212
connection con1;
1313

@@ -39,22 +39,22 @@ SET DEBUG_SYNC = 'RESET';
3939

4040
source include/wait_until_count_sessions.inc;
4141

42-
--echo End of 5.5 tests
42+
--echo #
43+
--echo # End of 5.5 tests
44+
--echo #
4345

4446
--echo #
4547
--echo # MDEV-23752: SHOW EXPLAIN FOR thd waits for sleep
4648
--echo #
4749

48-
--connect (con1,localhost,root,,)
50+
--connect con1,localhost,root
4951
--let $con_id = `SELECT CONNECTION_ID()`
50-
--send select sleep(100000);
52+
--send select sleep(100000)
5153

5254
--connection default
55+
evalp SHOW EXPLAIN FOR $con_id;
56+
evalp KILL QUERY $con_id;
5357

54-
--replace_result $con_id con_id
55-
eval SHOW EXPLAIN FOR $con_id;
56-
57-
--replace_result $con_id con_id
58-
eval KILL QUERY $con_id;
59-
58+
--echo #
6059
--echo # End of 10.2 tests
60+
--echo #

0 commit comments

Comments
 (0)