diff --git a/mysys/my_init.c b/mysys/my_init.c index bb72d0e0426..cdd07ec6a8b 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -201,11 +201,12 @@ Voluntary context switches %ld, Involuntary context switches %ld\n", #endif } + my_thread_end(); + my_thread_global_end(); + if (!(infoflag & MY_DONT_FREE_DBUG)) DBUG_END(); /* Must be done as late as possible */ - my_thread_end(); - my_thread_global_end(); my_mutex_end(); #if defined(SAFE_MUTEX) /*