Bugfix: only call innobase_release_temporary_latches() in case of current_thd

is not NULL, otherwise we get NULL pointer dereferencing.

Approved by:	Heikki
This commit is contained in:
vasil 2007-04-20 17:51:54 +00:00
parent 061e01a061
commit 54f780f055

View file

@ -2568,9 +2568,14 @@ ha_innobase::close(void)
/*====================*/
/* out: 0 */
{
THD* thd;
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);