mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
fil_name_process(): Treat FILE_CREATE in the same way as FILE_MODIFY that led to a FIL_LOAD_DEFER return. Remove the parameter lsn, and return file_name_t& in which the caller may assign create_lsn when processing a FILE_CREATE record. deferred_spaces.reinit_all(): Never create anything for deleted tablespaces. Doing so could cause a legitimate file to be deleted if files are being deleted and re-created with the same name. deferred_space.create(): Remove some duplicated code. Missing tablespace files will be created in fil_node_open_file_low() starting with commit759e3523e3(MDEV-38026). deferred_spaces::item::lsn: Remove. Starting with commit37d8577aee(MDEV-40728) each FILE_ record is parsed only once. recv_sys_t::parse_store_if_exists(): Tell the caller to skip tablespaces for which both FILE_CREATE and FILE_DELETE was parsed. This improves performance, not correctness. recv_validate_tablespace(): Avoid duplicated tablespace lookup and remove a redundant deferred_spaces.add(); fil_name_process already keeps deferred_spaces in sync with recv_spaces. fil_space_t::rename(): If !log, assert !replace and that the target file name does not exist. os_file_rename_func(): Do not check that the target path does not exist. This is already checked by every caller. This fixes a debug assertion failure that could otherwise occur when recovering from a crash in fil_space_t::rename() between the write of the FILE_RENAME and the actual rename. Reviewed by: Thirunarayanan Balathandayuthapani Tested by: Saahil Alam (cherry picked from commitbdff5b8f24)