summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/galera/r/galera_var_sst_auth.result12
-rw-r--r--mysql-test/suite/galera/t/galera_var_sst_auth.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_var_sst_auth.test12
-rw-r--r--sql/wsrep_mysqld.cc2
-rw-r--r--sql/wsrep_sst.cc5
-rw-r--r--sql/wsrep_sst.h1
-rw-r--r--sql/wsrep_var.h2
7 files changed, 29 insertions, 6 deletions
diff --git a/mysql-test/suite/galera/r/galera_var_sst_auth.result b/mysql-test/suite/galera/r/galera_var_sst_auth.result
new file mode 100644
index 00000000000..1db83197870
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_sst_auth.result
@@ -0,0 +1,12 @@
+#
+# MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
+#
+SELECT @@global.wsrep_sst_auth;
+@@global.wsrep_sst_auth
+********
+SET @@global.wsrep_sst_auth='foo:bar';
+SELECT @@global.wsrep_sst_auth;
+@@global.wsrep_sst_auth
+********
+disconnect node_2;
+disconnect node_1;
diff --git a/mysql-test/suite/galera/t/galera_var_sst_auth.opt b/mysql-test/suite/galera/t/galera_var_sst_auth.opt
new file mode 100644
index 00000000000..67babbb1ae7
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_sst_auth.opt
@@ -0,0 +1 @@
+--wsrep_sst_auth=root:
diff --git a/mysql-test/suite/galera/t/galera_var_sst_auth.test b/mysql-test/suite/galera/t/galera_var_sst_auth.test
new file mode 100644
index 00000000000..5c9b3f5a61e
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_sst_auth.test
@@ -0,0 +1,12 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
+--echo #
+
+SELECT @@global.wsrep_sst_auth;
+SET @@global.wsrep_sst_auth='foo:bar';
+SELECT @@global.wsrep_sst_auth;
+
+--source include/galera_end.inc
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index de050c6470e..fe52ca2c49d 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -577,7 +577,7 @@ int wsrep_init()
return 1;
}
- wsrep_sst_auth_init(wsrep_sst_auth);
+ wsrep_sst_auth_init();
wsrep_ready_set(FALSE);
assert(wsrep_provider);
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 2b682a1aded..ba6bb18bf37 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -169,10 +169,9 @@ bool wsrep_sst_auth_update (sys_var *self, THD* thd, enum_var_type type)
return sst_auth_real_set (wsrep_sst_auth);
}
-void wsrep_sst_auth_init (const char* value)
+void wsrep_sst_auth_init ()
{
- if (wsrep_sst_auth == value) wsrep_sst_auth = NULL;
- if (value) sst_auth_real_set (value);
+ sst_auth_real_set(wsrep_sst_auth);
}
bool wsrep_sst_donor_check (sys_var *self, THD* thd, set_var* var)
diff --git a/sql/wsrep_sst.h b/sql/wsrep_sst.h
index 50a16100128..460046bc4ad 100644
--- a/sql/wsrep_sst.h
+++ b/sql/wsrep_sst.h
@@ -64,6 +64,7 @@ extern void wsrep_sst_grab();
extern bool wsrep_sst_wait();
/*! Signals wsrep that initialization is complete, writesets can be applied */
extern bool wsrep_sst_continue();
+extern void wsrep_sst_auth_init();
extern void wsrep_sst_auth_free();
extern void wsrep_SE_init_grab(); /*! grab init critical section */
diff --git a/sql/wsrep_var.h b/sql/wsrep_var.h
index 202d6e393e0..0eccf64edb8 100644
--- a/sql/wsrep_var.h
+++ b/sql/wsrep_var.h
@@ -81,7 +81,6 @@ extern bool wsrep_sst_receive_address_update UPDATE_ARGS;
extern bool wsrep_sst_auth_check CHECK_ARGS;
extern bool wsrep_sst_auth_update UPDATE_ARGS;
-extern void wsrep_sst_auth_init INIT_ARGS;
extern bool wsrep_sst_donor_check CHECK_ARGS;
extern bool wsrep_sst_donor_update UPDATE_ARGS;
@@ -98,7 +97,6 @@ extern bool wsrep_desync_update UPDATE_ARGS;
#define wsrep_provider_init(X)
#define wsrep_init_vars() (0)
#define wsrep_start_position_init(X)
-#define wsrep_sst_auth_init(X)
#endif /* WITH_WSREP */
#endif /* WSREP_VAR_H */