summaryrefslogtreecommitdiff
path: root/sql/threadpool_unix.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-07 11:30:03 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-07 11:30:03 +0200
commit9e11e055ce1461caecbb30e8300dfdcd48af22f1 (patch)
tree48f5dc07a29e44a106c37e7e8e3234c62abbebf6 /sql/threadpool_unix.cc
parent2b5c9bc2c813ea7963959e515da5d60392c35431 (diff)
parent6b99859fff6b8c0a52ea45965834c9c3fdfc4cb3 (diff)
downloadmariadb-git-9e11e055ce1461caecbb30e8300dfdcd48af22f1.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/threadpool_unix.cc')
-rw-r--r--sql/threadpool_unix.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc
index 2987badcb7e..5d46b8790c5 100644
--- a/sql/threadpool_unix.cc
+++ b/sql/threadpool_unix.cc
@@ -982,24 +982,26 @@ static void thread_group_close(thread_group_t *thread_group)
if (pipe(thread_group->shutdown_pipe))
{
- DBUG_VOID_RETURN;
+ goto end;
}
/* Wake listener */
if (io_poll_associate_fd(thread_group->pollfd,
thread_group->shutdown_pipe[0], NULL))
{
- DBUG_VOID_RETURN;
+ goto end;
+ }
+ {
+ char c= 0;
+ if (write(thread_group->shutdown_pipe[1], &c, 1) < 0)
+ goto end;
}
- char c= 0;
- if (write(thread_group->shutdown_pipe[1], &c, 1) < 0)
- DBUG_VOID_RETURN;
-
/* Wake all workers. */
while(wake_thread(thread_group) == 0)
{
}
+end:
mysql_mutex_unlock(&thread_group->mutex);
DBUG_VOID_RETURN;