summaryrefslogtreecommitdiff
path: root/sql/threadpool_common.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-12-27 16:10:34 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2011-12-27 16:10:34 +0100
commit27ef2fda985a1cb55166d77d3d973704ba57e30f (patch)
tree75dadb418c402adc45e7e9170937683058d9f535 /sql/threadpool_common.cc
parentc01fc2abc7820ec372c2f678474912196f49d983 (diff)
downloadmariadb-git-27ef2fda985a1cb55166d77d3d973704ba57e30f.tar.gz
fix test suite
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r--sql/threadpool_common.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc
index 229c913ab44..b6676576fb3 100644
--- a/sql/threadpool_common.cc
+++ b/sql/threadpool_common.cc
@@ -71,7 +71,9 @@ static inline bool thread_attach(THD* thd, char *stack_start, PSI_thread **save_
static inline void thread_detach(THD* thd, PSI_thread *restore_psi_thread)
{
DBUG_ENTER("thread_detach");
+ mysql_mutex_lock(&thd->LOCK_thd_data);
thd->mysys_var = NULL;
+ mysql_mutex_unlock(&thd->LOCK_thd_data);
#ifndef DBUG_OFF
/*
If during the session @@session.dbug was assigned, the
@@ -161,7 +163,7 @@ int threadpool_process_request(THD *thd)
PSI_thread *psi_thread;
thread_attach(thd, (char *)&thd, &psi_thread);
- if (thd->killed == KILL_CONNECTION)
+ if (thd->killed >= KILL_CONNECTION)
{
/*
kill flag can be set have been killed by