Commit 584c2d0a authored by unknown's avatar unknown

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.
parent 2480b60b
...@@ -318,7 +318,7 @@ handle_slave_init(void *arg __attribute__((unused))) ...@@ -318,7 +318,7 @@ handle_slave_init(void *arg __attribute__((unused)))
mysql_mutex_lock(&LOCK_thread_count); mysql_mutex_lock(&LOCK_thread_count);
slave_init_thread_running= false; slave_init_thread_running= false;
mysql_cond_signal(&COND_thread_count); mysql_cond_broadcast(&COND_thread_count);
mysql_mutex_unlock(&LOCK_thread_count); mysql_mutex_unlock(&LOCK_thread_count);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment