[Commits] Rev 4145: MDEV-6040: MariaDB hangs if terminated quickly after start in http://bazaar.launchpad.net/~maria-captains/maria/10.0

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Thu Apr 10 10:38:57 EEST 2014


At http://bazaar.launchpad.net/~maria-captains/maria/10.0

------------------------------------------------------------
revno: 4145
revision-id: knielsen at knielsen-hq.org-20140410073857-7laqshw8k7mjkq8b
parent: knielsen at knielsen-hq.org-20140409124246-ex6slxt3tyhe6x5u
committer: knielsen at knielsen-hq.org
branch nick: tmp-10.0
timestamp: Thu 2014-04-10 09:38:57 +0200
message:
  MDEV-6040: MariaDB hangs if terminated quickly after start
  
  We need to use mysql_cond_broadcast() rather than _signal for
  COND_thread_count, as there can be multiple waiters.
  
  Thanks to Pavel Ivanov for reporting both the problem and the
  solution.
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2014-03-26 21:25:38 +0000
+++ b/sql/slave.cc	2014-04-10 07:38:57 +0000
@@ -318,7 +318,7 @@ handle_slave_init(void *arg __attribute_
 
   mysql_mutex_lock(&LOCK_thread_count);
   slave_init_thread_running= false;
-  mysql_cond_signal(&COND_thread_count);
+  mysql_cond_broadcast(&COND_thread_count);
   mysql_mutex_unlock(&LOCK_thread_count);
 
   return 0;



More information about the commits mailing list