From bfe703a45888107936c184076eaead28b8b8a90a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 3 Feb 2015 18:19:56 +0100 Subject: don't let current_thd to point to a destroyed THD * reset current_thd in THD::~THD, otherwise my_malloc_size_cb_func() might access THD after it was destroyed. * remove now redundant set_current_thd(0) calls that follow delete thd. --- sql/sql_udf.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'sql/sql_udf.cc') diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index 2354f120041..d266e8f6bc7 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -258,8 +258,6 @@ void udf_init() end: close_mysql_tables(new_thd); delete new_thd; - /* Remember that we don't have a THD */ - set_current_thd(0); DBUG_VOID_RETURN; } -- cgit v1.2.1