From 6a204546ef91aa90dedb6b47353bbb568f0531b0 Mon Sep 17 00:00:00 2001
From: Nirbhay Choubey <nirbhay@mariadb.com>
Date: Tue, 24 Mar 2015 16:41:04 -0400
Subject: MDEV-7798: mysql.server init script can't stop mysqld when WSREP is
 turned off

wsrep threads should be always be checked for existence & stopped on
server shutdown.
---
 mysql-test/suite/wsrep/r/mdev_7798.result | 13 +++++++++++++
 mysql-test/suite/wsrep/t/mdev_7798.opt    |  1 +
 mysql-test/suite/wsrep/t/mdev_7798.test   | 17 +++++++++++++++++
 3 files changed, 31 insertions(+)
 create mode 100644 mysql-test/suite/wsrep/r/mdev_7798.result
 create mode 100644 mysql-test/suite/wsrep/t/mdev_7798.opt
 create mode 100644 mysql-test/suite/wsrep/t/mdev_7798.test

(limited to 'mysql-test/suite/wsrep')

diff --git a/mysql-test/suite/wsrep/r/mdev_7798.result b/mysql-test/suite/wsrep/r/mdev_7798.result
new file mode 100644
index 00000000000..83a02f3a606
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/mdev_7798.result
@@ -0,0 +1,13 @@
+#
+# MDEV-7798: mysql.server init script can't stop mysqld when WSREP is
+# turned off
+#
+SELECT @@GLOBAL.WSREP_ON;
+@@GLOBAL.WSREP_ON
+1
+SET GLOBAL WSREP_ON= 0;
+Restart the node.
+SELECT @@GLOBAL.WSREP_ON;
+@@GLOBAL.WSREP_ON
+1
+# End of test.
diff --git a/mysql-test/suite/wsrep/t/mdev_7798.opt b/mysql-test/suite/wsrep/t/mdev_7798.opt
new file mode 100644
index 00000000000..459a9702707
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_7798.opt
@@ -0,0 +1 @@
+--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --wsrep_causal_reads=ON
diff --git a/mysql-test/suite/wsrep/t/mdev_7798.test b/mysql-test/suite/wsrep/t/mdev_7798.test
new file mode 100644
index 00000000000..9dfff0959bc
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_7798.test
@@ -0,0 +1,17 @@
+--source include/have_wsrep_provider.inc
+--source include/have_binlog_format_row.inc
+
+--echo #
+--echo # MDEV-7798: mysql.server init script can't stop mysqld when WSREP is
+--echo # turned off
+--echo #
+
+SELECT @@GLOBAL.WSREP_ON;
+SET GLOBAL WSREP_ON= 0;
+
+--echo Restart the node.
+--source include/restart_mysqld.inc
+
+SELECT @@GLOBAL.WSREP_ON;
+
+--echo # End of test.
-- 
cgit v1.2.1