Skip to content

Commit

Permalink
MDEV-19457: sys_vars.wsrep_provider_basic failed in buildbot
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
sysprg committed Jan 20, 2020
1 parent 7993f89 commit 578b6ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sql/wsrep_mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 578b6ba

Please sign in to comment.