summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-10-14 15:29:57 +0200
committerSergei Golubchik <serg@mariadb.org>2015-10-15 00:55:56 +0200
commit2a471e8e98478ba3618d2556b0059e3bf06767d9 (patch)
tree86b499d7a87028d79e9cef82d6e1aee3f68a2219 /libmysqld
parentb867ade5916941c25a714068a913c4b75aabe868 (diff)
downloadmariadb-git-2a471e8e98478ba3618d2556b0059e3bf06767d9.tar.gz
fix func_hybrid_type crash in --ps --embedded
create_embedded_thd() must reset current_thd before returning, otherwise client [de-]allocations will be happening in that stray THD context
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index eb854a9f076..86a0676d97e 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -701,6 +701,7 @@ void *create_embedded_thd(int client_flag)
threads.append(thd);
mysql_mutex_unlock(&LOCK_thread_count);
thd->mysys_var= 0;
+ thd->reset_globals();
return thd;
err:
delete(thd);