Commit ddf6a665 authored by Marc Alff's avatar Marc Alff

Bug#54334 Double initialization of mysys mutexes

Prior to this fix, mysys mutexes such as THR_LOCK_lock could be initialized
twice by a call to my_init().
The root cause was out of place initialization in my_basic_init(),
calling my_thread_global_init().

With this fix,
- my_basic_init() properly initializes the mutex implementation itself,
for SAFE or FAST mutexes, and for platform dependent initializations,
before initialiazing a mutex.
- my_init() properly initializes mysys mutexes once,
when making the first call to my_thread_global_init().
parent 75dce25c
......@@ -104,8 +104,6 @@ my_bool my_basic_init(void)
mysql_stdin= & instrumented_stdin;
#if defined(THREAD)
if (my_thread_global_init())
return 1;
# if defined(SAFE_MUTEX)
safe_mutex_global_init(); /* Must be called early */
# endif
......
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