diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 46a8298a770..e915e28d1a3 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -1359,10 +1359,11 @@ dberr_t srv_undo_tablespaces_upgrade() { for (const auto space_id : *trx_sys_undo_spaces) { undo::Tablespace undo_space(space_id); - fil_space_close(undo_space.id()); + dberr_t err = fil_delete_tablespace(undo_space.id(), BUF_REMOVE_ALL_NO_WRITE); + if (err != DB_SUCCESS) { + ib::info() << "Deletion of 5.7 undo tablespace: " << undo_space.file_name() << " failed"; + } - os_file_delete_if_exists(innodb_data_file_key, undo_space.file_name(), - NULL); } /* Remove the tracking of these undo tablespaces from TRX_SYS page and