Commit 8154ef4b authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-7067: Server outputs Galera (WSREP) information, even if Galera is disabled

Additional changes :
* On startup, do not initialize wsrep if wsrep_on=0.
* On shutdown, stop wsrep replication only if > 0 wsrep
threads are running.
parent b08c4201
......@@ -1902,7 +1902,10 @@ static void __cdecl kill_server(int sig_ptr)
#endif
/* Stop wsrep threads in case they are running. */
if (wsrep_running_threads > 0)
{
wsrep_stop_replication(NULL);
}
close_connections();
......@@ -5806,10 +5809,6 @@ int mysqld_main(int argc, char **argv)
wsrep_create_appliers(wsrep_slave_threads - 1);
}
}
else
{
wsrep_init_startup (false);
}
if (opt_bootstrap)
{
......
......@@ -552,8 +552,8 @@ int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff,
*v++= wsrep_status_vars[i];
DBUG_ASSERT(i < maxi);
DBUG_ASSERT(wsrep != NULL);
if (wsrep != NULL) {
wsrep_stats_var* stats= wsrep->stats_get(wsrep);
for (wsrep_stats_var *sv= stats; i < maxi && sv && sv->name; i++, sv++, v++)
{
......@@ -575,6 +575,7 @@ int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff,
DBUG_ASSERT(i < maxi);
}
wsrep->stats_free(wsrep, stats);
}
my_qsort(buff, i, sizeof(*v), show_var_cmp);
......
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