summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager/instance_map.cc
diff options
context:
space:
mode:
authorunknown <petr/cps@mysql.com/owlet.local>2006-10-05 22:07:21 +0400
committerunknown <petr/cps@mysql.com/owlet.local>2006-10-05 22:07:21 +0400
commit777bab9853a950b37b752bfc9c757ec0fdfa7fe0 (patch)
tree58f0d1070e128e77846de46a5dfa227b05a2b350 /server-tools/instance-manager/instance_map.cc
parent6acdc271f21b5e1d45fe33bc0254c61761db2abd (diff)
downloadmariadb-git-777bab9853a950b37b752bfc9c757ec0fdfa7fe0.tar.gz
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 server-tools/instance-manager/instance_map.cc: flush_instances shouldn't reinit guardian, if it failed to load info about them server-tools/instance-manager/manager.cc: On error we should 1) stop guardian 2) terminate all other threads and exit
Diffstat (limited to 'server-tools/instance-manager/instance_map.cc')
-rw-r--r--server-tools/instance-manager/instance_map.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/server-tools/instance-manager/instance_map.cc b/server-tools/instance-manager/instance_map.cc
index 3b7f58d8a09..f6662847440 100644
--- a/server-tools/instance-manager/instance_map.cc
+++ b/server-tools/instance-manager/instance_map.cc
@@ -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;