Commit 6801f80a authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-19457 sys_vars.wsrep_provider_basic failed

wsrep_init_provider_status_variables(): Always set wsrep_inited
to ensure that the memory will be freed.

The initial patch was provided by Julius Goryavsky.
parent 366f4f29
......@@ -627,6 +627,7 @@ static wsrep::gtid wsrep_server_initial_position()
*/
static void wsrep_init_provider_status_variables()
{
wsrep_inited= 1;
const wsrep::provider& provider=
Wsrep_server_state::instance().provider();
strncpy(provider_name,
......@@ -711,9 +712,7 @@ int wsrep_init()
WSREP_ERROR("wsrep::init() failed: %d, must shutdown", err);
}
else
{
wsrep_init_provider_status_variables();
}
return err;
}
......@@ -749,7 +748,6 @@ int wsrep_init()
Wsrep_server_state::instance().unload_provider();
return 1;
}
wsrep_inited= 1;
wsrep_init_provider_status_variables();
wsrep_capabilities_export(Wsrep_server_state::instance().provider().capabilities(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment