diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-02-03 18:19:56 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-02-03 18:19:56 +0100 |
commit | bfe703a45888107936c184076eaead28b8b8a90a (patch) | |
tree | 183080fb1f6665badce232171ec4423927bbaec8 /sql/sql_reload.cc | |
parent | d0fb9580e0b2400d633b672e881a9d661cafb07f (diff) | |
download | mariadb-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_reload.cc')
-rw-r--r-- | sql/sql_reload.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index fe494c760dc..6fc0e0024af 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -98,8 +98,6 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, if (tmp_thd) { delete tmp_thd; - /* Remember that we don't have a THD */ - set_current_thd(0); thd= 0; } reset_mqh((LEX_USER *)NULL, TRUE); |