summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera
diff options
context:
space:
mode:
authorDaniele Sciascia <daniele.sciascia@galeracluster.com>2017-02-06 18:07:21 +0100
committerJan Lindström <jan.lindstrom@mariadb.com>2017-08-11 12:17:22 +0300
commit77f5b188d35ba5a5bf5f06c4e0ef25d25dacd963 (patch)
treea9f511e2405b11713ffbe7e679f5cf874d23ccf9 /mysql-test/suite/galera
parent391b1af0fbb9723ce768d0b06830865fa983a8dd (diff)
downloadmariadb-git-77f5b188d35ba5a5bf5f06c4e0ef25d25dacd963.tar.gz
MW-357 Reset thd->wsrep_apply_toi regardless of applier exiting
Applier does not reset thd->wsrep_apply_toi if applier thread decides to exit by setting 'exit= true'. The problem is that galera side may decide not to kill the applier thread: for instance if we try to SET wsrep_slave_threads = 0; then galera refuses to kill the last applier thread. If this happens we are left with a thd which has not been reset to the initial state. This patch ensures that the thd is reset regardless of the applier thread exiting or not.
Diffstat (limited to 'mysql-test/suite/galera')
-rw-r--r--mysql-test/suite/galera/r/MW-357.result6
-rw-r--r--mysql-test/suite/galera/t/MW-357.test13
2 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/r/MW-357.result b/mysql-test/suite/galera/r/MW-357.result
new file mode 100644
index 00000000000..d249d5997f7
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-357.result
@@ -0,0 +1,6 @@
+SET GLOBAL wsrep_slave_threads = 0;
+Warnings:
+Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
+CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-357.test b/mysql-test/suite/galera/t/MW-357.test
new file mode 100644
index 00000000000..d13cf058aeb
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-357.test
@@ -0,0 +1,13 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_2
+SET GLOBAL wsrep_slave_threads = 0;
+
+--connection node_1
+CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
+
+--connection node_1
+INSERT INTO t1 VALUES (1);
+
+DROP TABLE t1;