Commit 0cc809f9 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-31826: Memory leak on failed IMPORT TABLESPACE

fil_delete_tablespace(): Invoke fil_space_free_low() directly.
This fixes up commit 39e3ca8b
parent 6f091434
......@@ -1702,10 +1702,14 @@ void fil_close_tablespace(ulint id)
completely and permanently. */
while (buf_flush_list_space(space));
/* If the free is successful, the latch will be released there. */
if (!fil_space_free(id, true)) {
space->x_unlock();
}
space->x_unlock();
mysql_mutex_lock(&log_sys.mutex);
if (space->max_lsn != 0) {
ut_d(space->max_lsn = 0);
fil_system.named_spaces.remove(*space);
}
mysql_mutex_unlock(&log_sys.mutex);
fil_space_free_low(space);
}
/** Delete a tablespace and associated .ibd file.
......
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