summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-08-11 16:24:01 +0200
committerSergei Golubchik <serg@mariadb.org>2017-08-14 19:45:59 +0200
commit1b993721ff1bdd094126390ea6dd67d9e36e071d (patch)
tree74cc54697455e54dcf35976b01f801c4cba4c1d3 /mysql-test/suite/innodb
parent023131e3954e17d315e3cb21145af979c286b672 (diff)
downloadmariadb-git-1b993721ff1bdd094126390ea6dd67d9e36e071d.tar.gz
MDEV-13472 rpl.rpl_semi_sync_wait_point crashes because of thd_destructor_proxy
InnoDB: in slow shutodwn mode do not stop purge threads as long as some connection threads are running
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r--mysql-test/suite/innodb/r/purge_thread_shutdown.result16
-rw-r--r--mysql-test/suite/innodb/t/purge_thread_shutdown.test11
2 files changed, 23 insertions, 4 deletions
diff --git a/mysql-test/suite/innodb/r/purge_thread_shutdown.result b/mysql-test/suite/innodb/r/purge_thread_shutdown.result
index 58b5c31461a..38cefbaf3e8 100644
--- a/mysql-test/suite/innodb/r/purge_thread_shutdown.result
+++ b/mysql-test/suite/innodb/r/purge_thread_shutdown.result
@@ -1,8 +1,10 @@
+connect con1, localhost, root;
create table t1 (a int) engine=innodb;
insert t1 values (1),(2),(3),(4);
delete from t1 where a=1;
select user,state from information_schema.processlist order by 2;
user state
+root
root Filling schema table
system user InnoDB purge coordinator
system user InnoDB purge worker
@@ -10,10 +12,22 @@ system user InnoDB purge worker
system user InnoDB purge worker
system user InnoDB shutdown handler
set global debug_dbug='+d,only_kill_system_threads';
-connect con1, localhost, root;
+set global innodb_fast_shutdown=0;
shutdown;
connection default;
disconnect con1;
+select user,state from information_schema.processlist order by 2;
+user state
+root Filling schema table
+system user InnoDB purge coordinator
+system user InnoDB purge worker
+system user InnoDB purge worker
+system user InnoDB purge worker
+system user InnoDB slow shutdown wait
+set global innodb_fast_shutdown=1;
+select user,state from information_schema.processlist order by 2;
+user state
+root Filling schema table
delete from t1 where a=3;
set global innodb_fast_shutdown=0;
ERROR 42000: Variable 'innodb_fast_shutdown' can't be set to the value of '0'
diff --git a/mysql-test/suite/innodb/t/purge_thread_shutdown.test b/mysql-test/suite/innodb/t/purge_thread_shutdown.test
index 4f2e72567f4..8a9a834454c 100644
--- a/mysql-test/suite/innodb/t/purge_thread_shutdown.test
+++ b/mysql-test/suite/innodb/t/purge_thread_shutdown.test
@@ -2,6 +2,7 @@ source include/have_innodb.inc;
source include/not_embedded.inc;
source include/have_debug.inc;
+connect con1, localhost, root;
create table t1 (a int) engine=innodb;
insert t1 values (1),(2),(3),(4);
delete from t1 where a=1;
@@ -9,8 +10,7 @@ delete from t1 where a=1;
select user,state from information_schema.processlist order by 2;
set global debug_dbug='+d,only_kill_system_threads';
-
-connect con1, localhost, root;
+set global innodb_fast_shutdown=0;
let $_server_id= `SELECT @@server_id`;
let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect;
@@ -20,11 +20,16 @@ send shutdown;
connection default;
disconnect con1;
+sleep 5;
+select user,state from information_schema.processlist order by 2;
+set global innodb_fast_shutdown=1;
+
let $wait_condition=select count(*) = 0 from information_schema.processlist where user='system user';
source include/wait_condition.inc;
+select user,state from information_schema.processlist order by 2;
delete from t1 where a=3;
---error ER_WRONG_VALUE_FOR_VAR
+error ER_WRONG_VALUE_FOR_VAR;
set global innodb_fast_shutdown=0;
let $me=`select connection_id()`;