Commit 54f780f0 authored by vasil's avatar vasil

Bugfix: only call innobase_release_temporary_latches() in case of current_thd

is not NULL, otherwise we get NULL pointer dereferencing.

Approved by:	Heikki
parent 061e01a0
...@@ -2568,9 +2568,14 @@ ha_innobase::close(void) ...@@ -2568,9 +2568,14 @@ ha_innobase::close(void)
/*====================*/ /*====================*/
/* out: 0 */ /* out: 0 */
{ {
THD* thd;
DBUG_ENTER("ha_innobase::close"); DBUG_ENTER("ha_innobase::close");
innobase_release_temporary_latches(ht, current_thd); thd = current_thd; // avoid calling current_thd twice, it may be slow
if (thd != NULL) {
innobase_release_temporary_latches(ht, thd);
}
row_prebuilt_free(prebuilt); row_prebuilt_free(prebuilt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment