Comment 18 for bug 1099742

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

And here's where it sits:

 /* 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.

Workaround: avoid setting wsrep_on to 0.