From 79d08e682ff70469abe7146f06b3b4103679e072 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 7 Dec 2015 15:15:43 +0100 Subject: small cleanup: udf_init()/udf_free() calls --- sql/sql_udf.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/sql_udf.cc') diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index e5fac48a750..626e5569ccc 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -142,7 +142,7 @@ void udf_init() DBUG_ENTER("ufd_init"); char db[]= "mysql"; /* A subject to casednstr, can't be constant */ - if (initialized) + if (initialized || opt_noacl) DBUG_VOID_RETURN; #ifdef HAVE_PSI_INTERFACE @@ -267,6 +267,8 @@ void udf_free() { /* close all shared libraries */ DBUG_ENTER("udf_free"); + if (opt_noacl) + DBUG_VOID_RETURN; for (uint idx=0 ; idx < udf_hash.records ; idx++) { udf_func *udf=(udf_func*) my_hash_element(&udf_hash,idx); -- cgit v1.2.1 From 865548fc8d0574e6418b66def39b6d36bbc0205a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 18 Dec 2015 09:50:39 +0100 Subject: MDEV-9088 Server crashes on shutdown after the second post of feedback report On shutdown feedback was sending a short report without creating a THD. At that point current_thd was pointing to the already destroyed THD from the previous full report. backport from 10.1: commit bfe703a Author: Sergei Golubchik Date: Tue Feb 3 18:19:56 2015 +0100 don't let current_thd to point to a destroyed 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 0f9043a77df..74d2f6bc252 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