summaryrefslogtreecommitdiff
path: root/sql/scheduler.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2009-11-26 22:19:33 +0200
committerMichael Widenius <monty@askmonty.org>2009-11-26 22:19:33 +0200
commitd210df50a21d82a1f20c6bc786149478801e91c6 (patch)
tree032497be5cbaf40b6e4b292149b44bd635de700b /sql/scheduler.cc
parent847bab8e7566dbddaa8c2959d2e261d3d7abd677 (diff)
downloadmariadb-git-d210df50a21d82a1f20c6bc786149478801e91c6.tar.gz
Added protection around usage of thd->mysys_var
(May be changed to 0 by scheduler)
Diffstat (limited to 'sql/scheduler.cc')
-rw-r--r--sql/scheduler.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/scheduler.cc b/sql/scheduler.cc
index e0a7837de8e..5b8f834aecc 100644
--- a/sql/scheduler.cc
+++ b/sql/scheduler.cc
@@ -235,9 +235,7 @@ void thd_scheduler::thread_detach()
if (thread_attached)
{
THD* thd = (THD*)list.data;
- pthread_mutex_lock(&thd->LOCK_thd_data);
- thd->mysys_var= NULL;
- pthread_mutex_unlock(&thd->LOCK_thd_data);
+ thd->reset_globals();
thread_attached= FALSE;
#ifndef DBUG_OFF
/*