1
0
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:
petr/cps@mysql.com/owlet.local
2006-10-05 22:07:21 +04:00
parent 2073e4a1cb
commit 96c6f6f5c2
2 changed files with 20 additions and 2 deletions

View File

@ -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;