summaryrefslogtreecommitdiff
path: root/sql/threadpool_unix.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-11-02 10:43:52 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-11-02 10:43:52 +0100
commit4ffc9c3b01459a2904a7154a6c750d128864fc7b (patch)
treed482bfdf461dc06616cfb23b61c1045a04b1b15d /sql/threadpool_unix.cc
parent27bcea09e5230757071d27b91402647a9e0b4713 (diff)
downloadmariadb-git-4ffc9c3b01459a2904a7154a6c750d128864fc7b.tar.gz
MDEV-531 : Warning: Forcing close of thread ... in rpl_binlog_index
Use post_kill_notification in for one_thread_per_connection scheduler, the same as already used in threadpool, to reliably wake a thread stuck in read() or in different poll() variations.
Diffstat (limited to 'sql/threadpool_unix.cc')
-rw-r--r--sql/threadpool_unix.cc18
1 files changed, 1 insertions, 17 deletions
diff --git a/sql/threadpool_unix.cc b/sql/threadpool_unix.cc
index f5ea771883d..da38d64fa4d 100644
--- a/sql/threadpool_unix.cc
+++ b/sql/threadpool_unix.cc
@@ -173,7 +173,6 @@ static int create_worker(thread_group_t *thread_group);
static void *worker_main(void *param);
static void check_stall(thread_group_t *thread_group);
static void connection_abort(connection_t *connection);
-void tp_post_kill_notification(THD *thd);
static void set_wait_timeout(connection_t *connection);
static void set_next_timeout_check(ulonglong abstime);
static void print_pool_blocked_message(bool);
@@ -444,7 +443,7 @@ static void timeout_check(pool_timer_t *timer)
/* Wait timeout exceeded, kill connection. */
mysql_mutex_lock(&thd->LOCK_thd_data);
thd->killed = KILL_CONNECTION;
- tp_post_kill_notification(thd);
+ post_kill_notification(thd);
mysql_mutex_unlock(&thd->LOCK_thd_data);
}
else
@@ -1259,21 +1258,6 @@ static void connection_abort(connection_t *connection)
/**
- MySQL scheduler callback : kill connection
-*/
-
-void tp_post_kill_notification(THD *thd)
-{
- DBUG_ENTER("tp_post_kill_notification");
- if (current_thd == thd || thd->system_thread)
- DBUG_VOID_RETURN;
-
- if (thd->net.vio)
- vio_shutdown(thd->net.vio, SHUT_RD);
- DBUG_VOID_RETURN;
-}
-
-/**
MySQL scheduler callback: wait begin
*/