summaryrefslogtreecommitdiff
path: root/mysys/my_thr_init.c
diff options
context:
space:
mode:
authorChristopher Powers <chris.powers@oracle.com>2010-08-22 20:41:42 -0500
committerChristopher Powers <chris.powers@oracle.com>2010-08-22 20:41:42 -0500
commitf49c88c8e7a49cc1aa110abbf4a40c1ec4e7af47 (patch)
tree7d862117ebebeb5ea7ce64716214b0b72679a540 /mysys/my_thr_init.c
parentf4cef8d31f6ee7afefe6cba16f817c01c46a63c2 (diff)
downloadmariadb-git-f49c88c8e7a49cc1aa110abbf4a40c1ec4e7af47.tar.gz
Bug #55345, "mysql_library_init causes segfault if executed after calling mysql_library_end"
my_thread_global_end() now sets mysql_thread_basic_global_init_done= 0 to ensure destroyed mutexes are not reused. I verified that clearing this flag will not result in the redundant allocation of other resources allocated by my_thread_global_init() and my_thread_basic_global_init(). mysys/my_thr_init.c: Clear mysql_thread_basic_global_init_done flag at the end of my_thread_global_end()
Diffstat (limited to 'mysys/my_thr_init.c')
-rw-r--r--mysys/my_thr_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 236b694726f..045b56b11c2 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -302,6 +302,8 @@ void my_thread_global_end(void)
#ifndef HAVE_GETHOSTBYNAME_R
mysql_mutex_destroy(&LOCK_gethostbyname_r);
#endif
+
+ my_thread_basic_global_init_done= 0;
}
static my_thread_id thread_id= 0;