From fd25574645662c14e76e05690eb1be158a800370 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2014 12:08:38 +0100 Subject: [PATCH] MDEV-5789: race between rpl_parallel_change_thread_count and slave start upon server start without --skip-slave-start Make sure to signal the condition variable for the thread pool after the new threads have been added to the pool. Thanks to user nanyi607rao, who reported this bug on maria-developers@. --- sql/rpl_parallel.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 58b4948baae..27f17668849 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -705,6 +705,11 @@ rpl_parallel_change_thread_count(rpl_parallel_thread_pool *pool, pool->changing= false; mysql_mutex_unlock(&LOCK_active_mi); } + + mysql_mutex_lock(&pool->LOCK_rpl_thread_pool); + mysql_cond_broadcast(&pool->COND_rpl_thread_pool); + mysql_mutex_unlock(&pool->LOCK_rpl_thread_pool); + return 0; err: