summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-03-23 22:12:00 +0100
committerSergei Golubchik <serg@mariadb.org>2016-03-23 22:12:00 +0100
commita75d26946423d2142921411bf7bdc731eba4df1a (patch)
tree86ddc7808c7a45ee5212e8809574313ad5af5022
parent06b455645258031cfc5d0810c28311307e9700f3 (diff)
downloadmariadb-git-a75d26946423d2142921411bf7bdc731eba4df1a.tar.gz
thread cache: cleanup DBUG state when caching a thread
this fixes 40 failures in mysql-test
-rw-r--r--sql/mysqld.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index acca5749c42..51ad1ad7058 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3014,6 +3014,11 @@ static bool cache_thread()
PSI_THREAD_CALL(delete_current_thread)();
#endif
+#ifndef DBUG_OFF
+ while (_db_is_pushed_())
+ _db_pop_();
+#endif
+
set_timespec(abstime, THREAD_CACHE_TIMEOUT);
while (!abort_loop && ! wake_thread && ! kill_cached_threads)
{