Skip to content

Commit 9fbe360

Browse files
committed
make plugins.processlist more robust
1 parent e0139c2 commit 9fbe360

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
create table t1 (a int) engine=innodb;
22
start transaction;
33
insert t1 values (1);
4-
state from show engine innodb status
4+
state from show engine innodb status, must be empty
55

6-
state from show processlist
7-
86
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)