mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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().
This commit is contained in:
@ -302,6 +302,8 @@ void my_thread_global_end(void)
|
|||||||
#ifndef HAVE_GETHOSTBYNAME_R
|
#ifndef HAVE_GETHOSTBYNAME_R
|
||||||
mysql_mutex_destroy(&LOCK_gethostbyname_r);
|
mysql_mutex_destroy(&LOCK_gethostbyname_r);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
my_thread_basic_global_init_done= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static my_thread_id thread_id= 0;
|
static my_thread_id thread_id= 0;
|
||||||
|
Reference in New Issue
Block a user