summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-06-12 12:37:28 +0200
committerSergei Golubchik <serg@mariadb.org>2018-06-13 20:26:51 +0200
commit51254da52c144781695250a98f365fbc090ef619 (patch)
treee29a844eafdcea467d57682172b9b4beac47c2bd /mysql-test/suite
parentd2e1ed8b936a78ceeec0e64231997d7ed18a4daf (diff)
downloadmariadb-git-51254da52c144781695250a98f365fbc090ef619.tar.gz
MDEV-15359 Thread stay in "cleaning up" status after finishing
make thd_get_error_context_description() to show not just thd->proc_info, but exactly the same thread state that SHOW PROCESSLIST shows.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/plugins/r/processlist.result8
-rw-r--r--mysql-test/suite/plugins/t/processlist.test18
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/processlist.result b/mysql-test/suite/plugins/r/processlist.result
new file mode 100644
index 00000000000..d08ea9d3523
--- /dev/null
+++ b/mysql-test/suite/plugins/r/processlist.result
@@ -0,0 +1,8 @@
+create table t1 (a int) engine=innodb;
+start transaction;
+insert t1 values (1);
+state from show engine innodb status
+
+state from show processlist
+
+drop table t1;
diff --git a/mysql-test/suite/plugins/t/processlist.test b/mysql-test/suite/plugins/t/processlist.test
new file mode 100644
index 00000000000..5aacef317b9
--- /dev/null
+++ b/mysql-test/suite/plugins/t/processlist.test
@@ -0,0 +1,18 @@
+#
+# MDEV-15359 Thread stay in "cleaning up" status after finishing
+#
+source include/have_innodb.inc;
+
+create table t1 (a int) engine=innodb;
+start transaction;
+insert t1 values (1);
+let id=`select connection_id()`;
+connect con2,localhost,root;
+let s=query_get_value(show engine innodb status,Status,1);
+disable_query_log;
+eval select regexp_replace("$s", '(?s)^.*MySQL thread id $id,.*root([^\n]*)\n.*', '\\\\1') as `state from show engine innodb status`;
+eval select state as `state from show processlist` from information_schema.processlist where id = $id;
+enable_query_log;
+disconnect con2;
+connection default;
+drop table t1;