summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2020-01-14 14:23:15 +0100
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2020-01-14 14:23:15 +0100
commitc8463ec1e6376bd03b923ac52fcce3ed077bcae3 (patch)
treeab0d42b1671033f8fa7f4a72d3e0d8988b35356e
parentcb204e11eaf4c473ce5d5a10a21de147430057dc (diff)
downloadmariadb-git-10.1-MDEV-19457.tar.gz
MDEV-19457: sys_vars.wsrep_provider_basic failed in buildbot10.1-MDEV-19457
If the initialization of the wsrep provider failed, in some cases the internal variable wrep_inited indicating that the initialization has already been completed is still set to "1", which then leads to confusion in the initialization status. To solve the problem, we should set this variable to "1" only if the wsrep provider initialization really completed successfully. An earlier issue has already been fixed for branch 10.4, and this patch contains a fix for earlier versions (where Galera 3.x is used).
-rw-r--r--sql/wsrep_mysqld.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 0627127c6e0..c256467706b 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -599,7 +599,6 @@ int wsrep_init()
{
// enable normal operation in case no provider is specified
wsrep_ready_set(TRUE);
- wsrep_inited= 1;
global_system_variables.wsrep_on = 0;
wsrep_init_args args;
args.logger_cb = wsrep_log_cb;
@@ -610,10 +609,15 @@ int wsrep_init()
{
DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode));
WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode);
+ wsrep_ready_set(FALSE);
wsrep->free(wsrep);
free(wsrep);
wsrep = NULL;
}
+ else
+ {
+ wsrep_inited= 1;
+ }
return rcode;
}
else