Browse Source

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.
remotes/origin/bb-10.6-MDEV-32551
Marko Mäkelä 2 years ago
parent
commit
1fc2843eee
  1. 2
      storage/innobase/fil/fil0fil.cc

2
storage/innobase/fil/fil0fil.cc

@ -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;
}

Loading…
Cancel
Save