summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-12-17 22:36:26 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2019-12-17 22:39:06 +0100
commit80c97f8c0c496a4ef9372172704b7d0d9115325f (patch)
tree9d53683412d3468de01921ee34b96bc49547b171
parentfc860d3fa3bc854fbe6aab9179d7a4aaf6eb9edf (diff)
downloadmariadb-git-80c97f8c0c496a4ef9372172704b7d0d9115325f.tar.gz
MDEV-21343 Threadpool/Unix- wait_begin() function does not wake/create threads, when it should
Fixed the condition for waking up/creating another thread. If there is some work to do (if the request queue is not empty), a thread should be woken or created. The condition was incorrect since 18c9b34
-rw-r--r--sql/threadpool_unix.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc
index b505ec3dff5..3a90f24f6e9 100644
--- a/sql/threadpool_unix.cc
+++ b/sql/threadpool_unix.cc
@@ -1173,7 +1173,7 @@ void wait_begin(thread_group_t *thread_group)
DBUG_ASSERT(thread_group->connection_count > 0);
if ((thread_group->active_thread_count == 0) &&
- (thread_group->queue.is_empty() || !thread_group->listener))
+ (!thread_group->queue.is_empty() || !thread_group->listener))
{
/*
Group might stall while this thread waits, thus wake