1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Sergei Golubchik
2015-02-03 18:19:56 +01:00
parent d0fb9580e0
commit bfe703a458
11 changed files with 1 additions and 25 deletions

View File

@@ -1712,7 +1712,7 @@ THD::~THD()
DBUG_ASSERT(status_var.local_memory_used == 0);
}
set_current_thd(orig_thd);
set_current_thd(orig_thd == this ? 0 : orig_thd);
DBUG_VOID_RETURN;
}