summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-07-09 11:04:28 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-07-09 11:04:28 -0400
commit40bfd20180a392f0c2e56cc99fff9ab3bf3ef87f (patch)
tree87a341f119275a1592e8e1dc629392ea20e40303 /mysql-test
parent04db5aeb097a9733ba31015f09198aea04067ee4 (diff)
downloadmariadb-git-40bfd20180a392f0c2e56cc99fff9ab3bf3ef87f.tar.gz
MDEV#6411 - Setting set @@global_wsrep_sst_auth=NULL
causes crash Fixed by properly handling the NULL values.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/wsrep/r/variables.result18
-rw-r--r--mysql-test/suite/wsrep/t/variables.test18
2 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result
index bfa371da3a7..bbd969c735a 100644
--- a/mysql-test/suite/wsrep/r/variables.result
+++ b/mysql-test/suite/wsrep/r/variables.result
@@ -11,6 +11,7 @@ SET SESSION wsrep_replicate_myisam= ON;
ERROR HY000: Variable 'wsrep_replicate_myisam' is a GLOBAL variable and should be set with SET GLOBAL
SET GLOBAL wsrep_replicate_myisam= ON;
SET GLOBAL wsrep_replicate_myisam= OFF;
+SET GLOBAL wsrep_provider=none;
#
# MDEV#6206: wsrep_slave_threads subtracts from max_connections
@@ -76,4 +77,21 @@ SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
SET GLOBAL wsrep_provider= none;
SET GLOBAL wsrep_cluster_address= '';
SET GLOBAL wsrep_provider_options= '';
+#
+# MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
+#
+SET @wsrep_sst_auth_saved= @@global.wsrep_sst_auth;
+SET @@global.wsrep_sst_auth= 'user:pass';
+SELECT @@global.wsrep_sst_auth;
+@@global.wsrep_sst_auth
+********
+SET @@global.wsrep_sst_auth= '';
+SELECT @@global.wsrep_sst_auth;
+@@global.wsrep_sst_auth
+
+SET @@global.wsrep_sst_auth= NULL;
+SELECT @@global.wsrep_sst_auth;
+@@global.wsrep_sst_auth
+NULL
+SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
# End of test.
diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test
index 59d2aeccafd..a79a99bfecc 100644
--- a/mysql-test/suite/wsrep/t/variables.test
+++ b/mysql-test/suite/wsrep/t/variables.test
@@ -19,6 +19,7 @@ SET GLOBAL wsrep_replicate_myisam= ON;
# Reset it back.
SET GLOBAL wsrep_replicate_myisam= OFF;
+SET GLOBAL wsrep_provider=none;
--echo
--echo #
@@ -26,6 +27,11 @@ SET GLOBAL wsrep_replicate_myisam= OFF;
--echo #
call mtr.add_suppression("safe_mutex: Found wrong usage of mutex 'LOCK_wsrep_slave_threads' and 'LOCK_global_system_variables'");
call mtr.add_suppression("WSREP: Failed to get provider options");
+
+--disable_query_log
+eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
+--enable_query_log
+
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
SELECT @@global.wsrep_provider;
SELECT @@global.wsrep_slave_threads;
@@ -71,5 +77,17 @@ SET GLOBAL wsrep_provider= none;
SET GLOBAL wsrep_cluster_address= '';
SET GLOBAL wsrep_provider_options= '';
+--echo #
+--echo # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash
+--echo #
+SET @wsrep_sst_auth_saved= @@global.wsrep_sst_auth;
+SET @@global.wsrep_sst_auth= 'user:pass';
+SELECT @@global.wsrep_sst_auth;
+SET @@global.wsrep_sst_auth= '';
+SELECT @@global.wsrep_sst_auth;
+SET @@global.wsrep_sst_auth= NULL;
+SELECT @@global.wsrep_sst_auth;
+SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
+
--echo # End of test.