Skip to content

Commit 78a0646

Browse files
committed
make plugins.processlist more robust
1 parent 00ccff4 commit 78a0646

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

mysql-test/suite/plugins/r/processlist.result

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ create table t1 (a int) engine=innodb;
22
start transaction;
33
insert t1 values (1);
44
connect con2,localhost,root;
5-
state from show engine innodb status
5+
state from show engine innodb status, must be empty
66

7-
state from show processlist
8-
97
disconnect con2;
108
connection default;
119
drop table t1;

mysql-test/suite/plugins/t/processlist.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ start transaction;
88
insert t1 values (1);
99
let id=`select connection_id()`;
1010
connect con2,localhost,root;
11+
let $wait_condition=select state='' from information_schema.processlist where id = $id;
12+
--source include/wait_condition.inc
1113
replace_regex /\"/-/; #"
1214
let s=`show engine innodb status`;
1315
disable_query_log;
14-
eval select regexp_replace("$s", '(?s)^.*MySQL thread id $id,.*root([^\n]*)\n.*', '\\\\1') as `state from show engine innodb status`;
15-
eval select state as `state from show processlist` from information_schema.processlist where id = $id;
16+
eval select regexp_replace("$s", '(?s)^.*MySQL thread id $id,.*root([^\n]*)\n.*', '\\\\1') as `state from show engine innodb status, must be empty`;
1617
enable_query_log;
1718
disconnect con2;
1819
connection default;

0 commit comments

Comments
 (0)