diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 87f3cd04605..fb0ef81bda5 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1266,13 +1266,13 @@ void clean_up(bool print_message) MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); DBUG_PRINT("quit", ("Error messages freed")); /* Tell main we are ready */ + logger.cleanup_end(); (void) pthread_mutex_lock(&LOCK_thread_count); DBUG_PRINT("quit", ("got thread count lock")); ready_to_exit=1; /* do the broadcast inside the lock to ensure that my_end() is not called */ (void) pthread_cond_broadcast(&COND_thread_count); (void) pthread_mutex_unlock(&LOCK_thread_count); - logger.cleanup_end(); /* The following lines may never be executed as the main thread may have