3092 Marc Alff 2010-06-08
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().
modified:
mysys/my_init.c
3091 Davi Arnaut 2010-06-05
Post-merge fix: header is used by the client API. Obvious in retrospect.
Also, update a few cases missed by the initial patch.
@ client/mysqltest.cc
Remove trailing comma.
@ include/my_alloc.h
Do not use wrapper.
@ include/mysql.h.pp
Update ABI file.
@ plugin/semisync/semisync_master.h
Initialize variable.
@ sql/debug_sync.cc
Use C linkage.
modified:
client/mysqltest.cc
include/my_alloc.h
include/mysql.h.pp
plugin/semisync/semisync_master.h
sql/debug_sync.cc
=== modified file 'mysys/my_init.c'
--- a/mysys/my_init.c 2010-05-28 22:53:26 +0000
+++ b/mysys/my_init.c 2010-06-08 12:41:48 +0000
@@ -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
Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100608124148-lr1ult7lwo75niev.bundle
| Thread |
|---|
| • bzr push into mysql-trunk-bugfixing branch (marc.alff:3091 to 3092) Bug#54334 | Marc Alff | 8 Jun |