summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorunknown <stewart@mysql.com>2005-07-14 17:33:35 +1000
committerunknown <stewart@mysql.com>2005-07-14 17:33:35 +1000
commit7f8b23344a0a4031098d2b543269d3ae07ff0200 (patch)
tree3c7e66d0ef2849db0a7b0fe7b9f2db2433239bf2 /sql/slave.cc
parent2a04d15596aa2f86fcfc1291f1460e8b92060e39 (diff)
downloadmariadb-git-7f8b23344a0a4031098d2b543269d3ae07ff0200.tar.gz
BUG#11384 drop database causes mysqld to core
Only reproducable in 5.1-wl2325, although the missing code is missing from 4.0 and up. sql/slave.cc: Clean up after slave sql thread when exiting. Wasn't calling close_thread_tables(). This was causing a crashing bug in the 5.1-wl2325 tree. It is conceivable that this could cause a problem in earlier versions, but we have not been able to reproduce.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index b0f911e7013..6132d334dbb 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2721,6 +2721,7 @@ err:
net_end(&thd->net); // destructor will not free it, because net.vio is 0
pthread_mutex_lock(&LOCK_thread_count);
THD_CHECK_SENTRY(thd);
+ close_thread_tables(thd);
delete thd;
pthread_mutex_unlock(&LOCK_thread_count);
pthread_cond_broadcast(&mi->stop_cond); // tell the world we are done