/* All threads has now been aborted */
DBUG_PRINT("quit",("Waiting for threads to die (count=%u)",thread_count));
mysql_mutex_lock(&LOCK_thread_count);
while (thread_count)
{
mysql_cond_wait(&COND_thread_count, &LOCK_thread_count); <-------- here
DBUG_PRINT("quit",("One thread died (count=%u)",thread_count));
}
mysql_mutex_unlock(&LOCK_thread_count);
close_active_mi();
DBUG_PRINT("quit",("close_connections thread"));
DBUG_VOID_RETURN;
}
waiting for slave threads to exit.
And here's where it misses to close wsrep backend:
#ifdef WITH_WSREP
if (WSREP_ON) wsrep_stop_replication(NULL);
#endif
close_connections();
where WSREP_ON expands to (global_system_variables.wsrep_on) which is in no way indicative of initialized wsrep backend.
Something else must be used here. E.g. checking for non-NULL wsrep pointer.
And here's where it sits:
/* All threads has now been aborted */ PRINT(" quit",( "Waiting for threads to die (count= %u)",thread_ count)) ; mutex_lock( &LOCK_thread_ count); cond_wait( &COND_thread_ count, &LOCK_thread_ count); <-------- here PRINT(" quit",( "One thread died (count= %u)",thread_ count)) ; mutex_unlock( &LOCK_thread_ count);
DBUG_
mysql_
while (thread_count)
{
mysql_
DBUG_
}
mysql_
close_ active_ mi(); PRINT(" quit",( "close_ connections thread"));
DBUG_
DBUG_VOID_RETURN;
}
waiting for slave threads to exit.
And here's where it misses to close wsrep backend:
#ifdef WITH_WSREP replication( NULL);
if (WSREP_ON) wsrep_stop_
#endif
close_ connections( );
where WSREP_ON expands to (global_ system_ variables. wsrep_on) which is in no way indicative of initialized wsrep backend.
Something else must be used here. E.g. checking for non-NULL wsrep pointer.
Workaround: avoid setting wsrep_on to 0.