1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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
This commit is contained in:
Vladislav Vaintroub
2019-12-17 22:36:26 +01:00
parent fc860d3fa3
commit 80c97f8c0c

View File

@ -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