Commit ea3ff730 authored by Daniele Sciascia's avatar Daniele Sciascia Committed by Nirbhay Choubey

GCF-837 Fix crash when loading wrong provider version

mysqld would crash with "double free or corrruption message"
if wrong provider version was given.
parent bf19492e
......@@ -484,8 +484,7 @@ int wsrep_init()
WSREP_ERROR("wsrep_load(%s) failed: %s (%d). Reverting to no provider.",
wsrep_provider, strerror(rcode), rcode);
strcpy((char*)wsrep_provider, WSREP_NONE); // damn it's a dirty hack
(void) wsrep_init();
return rcode;
return wsrep_init();
}
else /* this is for recursive call above */
{
......@@ -671,6 +670,9 @@ void wsrep_init_startup (bool first)
wsrep_thr_lock_init(wsrep_thd_is_BF, wsrep_abort_thd,
wsrep_debug, wsrep_convert_LOCK_to_trx, wsrep_on);
/* Skip replication start if dummy wsrep provider is loaded */
if (!strcmp(wsrep_provider, WSREP_NONE)) return;
/* Skip replication start if no cluster address */
if (!wsrep_cluster_address || strlen(wsrep_cluster_address) == 0) return;
......
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