summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-06-27 18:15:47 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2016-06-27 18:15:47 -0400
commit48a0a66ffa3241c91324606911f7964e956bc99f (patch)
treea575448e6ac256e61880de9eda4273448e4192c0 /mysql-test/suite
parent7f9fcfe00efa7262b0b95e00a595083ab0e21426 (diff)
downloadmariadb-git-48a0a66ffa3241c91324606911f7964e956bc99f.tar.gz
MDEV-10186: mysqld crash when runtime setting wsrep_cluster_address without wsrep_on=ON
On wsrep_cluster_address update, node restarts the replication and attempts to connect to the new address. In this process it makes a call to wsrep provider's connect API, which could lead to segfault if wsrep provider is not loaded (wsrep_on=OFF). Fixed by making sure that it proceeds only if a provider is loaded.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/wsrep/r/mdev_10186.result11
-rw-r--r--mysql-test/suite/wsrep/t/mdev_10186.opt1
-rw-r--r--mysql-test/suite/wsrep/t/mdev_10186.test12
3 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/suite/wsrep/r/mdev_10186.result b/mysql-test/suite/wsrep/r/mdev_10186.result
new file mode 100644
index 00000000000..f966c443569
--- /dev/null
+++ b/mysql-test/suite/wsrep/r/mdev_10186.result
@@ -0,0 +1,11 @@
+#
+# MDEV-10186: mysqld crash when runtime setting
+# wsrep_cluster_address without wsrep_on=ON
+#
+SELECT @@wsrep_on;
+@@wsrep_on
+0
+SELECT @@GLOBAL.wsrep_provider;
+@@GLOBAL.wsrep_provider
+/usr/lib/galera/libgalera_smm.so
+SET @@GLOBAL.wsrep_cluster_address='gcomm://';
diff --git a/mysql-test/suite/wsrep/t/mdev_10186.opt b/mysql-test/suite/wsrep/t/mdev_10186.opt
new file mode 100644
index 00000000000..e2655959c62
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_10186.opt
@@ -0,0 +1 @@
+--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=0
diff --git a/mysql-test/suite/wsrep/t/mdev_10186.test b/mysql-test/suite/wsrep/t/mdev_10186.test
new file mode 100644
index 00000000000..ec5e9462821
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mdev_10186.test
@@ -0,0 +1,12 @@
+--source include/have_wsrep_provider.inc
+--source include/have_binlog_format_row.inc
+
+--echo #
+--echo # MDEV-10186: mysqld crash when runtime setting
+--echo # wsrep_cluster_address without wsrep_on=ON
+--echo #
+
+SELECT @@wsrep_on;
+SELECT @@GLOBAL.wsrep_provider;
+SET @@GLOBAL.wsrep_cluster_address='gcomm://';
+