From 35c78a1fcff2acc9cfd6700b04b459e152df00f5 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 25 Jul 2014 17:02:47 +0400 Subject: [PATCH] MDEV-6489 - rpl.rpl_insert, rpl.rpl_insert_delayed and main.mysqlslap fail on PPC64 There seem to be a bug on Power8 which doesn't guarantee a signal to be delivered to waiting thread if broadcast is called outside of mutex. For now workaround it by calling broadcast while mutex is still held. --- client/mysqlslap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 3ba5eb80a07..01064f74261 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -1796,8 +1796,8 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) pthread_mutex_lock(&sleeper_mutex); master_wakeup= 0; - pthread_mutex_unlock(&sleeper_mutex); pthread_cond_broadcast(&sleep_threshhold); + pthread_mutex_unlock(&sleeper_mutex); gettimeofday(&start_time, NULL);