mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix Bug #19368 Failure in "flush_instances" causes assert in Thread_registry
Stop guardian and all the rest of threads before shutdown in case of an error
This commit is contained in:
@ -215,7 +215,9 @@ int Instance_map::flush_instances()
|
||||
hash_init(&hash, default_charset_info, START_HASH_SIZE, 0, 0,
|
||||
get_instance_key, delete_instance, 0);
|
||||
rc= load();
|
||||
guardian->init(); // TODO: check error status.
|
||||
/* don't init guardian if we failed to load instances */
|
||||
if (!rc)
|
||||
guardian->init(); // TODO: check error status.
|
||||
pthread_mutex_unlock(&LOCK_instance_map);
|
||||
guardian->unlock();
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user