summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-02-03 18:19:56 +0100
committerSergei Golubchik <serg@mariadb.org>2015-02-03 18:19:56 +0100
commitbfe703a45888107936c184076eaead28b8b8a90a (patch)
tree183080fb1f6665badce232171ec4423927bbaec8 /sql/sql_acl.cc
parentd0fb9580e0b2400d633b672e881a9d661cafb07f (diff)
downloadmariadb-git-bfe703a45888107936c184076eaead28b8b8a90a.tar.gz
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.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index c8714423933..96fff6d6763 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1140,8 +1140,6 @@ bool acl_init(bool dont_read_acl_tables)
*/
return_val= acl_reload(thd);
delete thd;
- /* Remember that we don't have a THD */
- set_current_thd(0);
DBUG_RETURN(return_val);
}
@@ -6556,8 +6554,6 @@ bool grant_init()
thd->store_globals();
return_val= grant_reload(thd);
delete thd;
- /* Remember that we don't have a THD */
- set_current_thd(0);
DBUG_RETURN(return_val);
}