Skip to content

Commit 80c97f8

Browse files
committed
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
1 parent fc860d3 commit 80c97f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/threadpool_unix.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ void wait_begin(thread_group_t *thread_group)
11731173
DBUG_ASSERT(thread_group->connection_count > 0);
11741174

11751175
if ((thread_group->active_thread_count == 0) &&
1176-
(thread_group->queue.is_empty() || !thread_group->listener))
1176+
(!thread_group->queue.is_empty() || !thread_group->listener))
11771177
{
11781178
/*
11791179
Group might stall while this thread waits, thus wake

0 commit comments

Comments
 (0)