Commit 1fc2843e authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-31826: File handle leak on failed IMPORT TABLESPACE

fil_space_t::drop(): If the caller is not interested in a
detached handle, close it immediately.
parent 90e11488
......@@ -1678,6 +1678,8 @@ fil_space_t *fil_space_t::drop(ulint id, pfs_os_file_t *detached_handle)
mysql_mutex_unlock(&fil_system.mutex);
if (detached_handle)
*detached_handle = handle;
else
os_file_close(handle);
return space;
}
......
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