summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2014-03-07 12:08:38 +0100
committerunknown <knielsen@knielsen-hq.org>2014-03-07 12:08:38 +0100
commitfd25574645662c14e76e05690eb1be158a800370 (patch)
treeec7732ec0fcd54b5d781fafab749ce3b33d4790c
parent2aa619ec68ae2aed567433ae37905eb7fe58fb70 (diff)
downloadmariadb-git-fd25574645662c14e76e05690eb1be158a800370.tar.gz
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@.
-rw-r--r--sql/rpl_parallel.cc5
1 files changed, 5 insertions, 0 deletions
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: