• Marko Mäkelä's avatar
    MDEV-16124 fil_rename_tablespace() times out and crashes server during table-rebuilding ALTER TABLE · 55abcfa7
    Marko Mäkelä authored
    InnoDB insisted on closing the file handle before renaming a file.
    Renaming a file should never be a problem on POSIX systems. Also on
    Windows it should work if the file was opened in FILE_SHARE_DELETE
    mode.
    
    fil_space_t::stop_ios: Remove. We no longer need to stop file access
    during rename operations.
    
    fil_mutex_enter_and_prepare_for_io(): Remove the wait for stop_ios.
    
    fil_rename_tablespace(): Remove the retry logic; do not close the
    file handle. Remove the unused fault injection that was added along
    with the DATA DIRECTORY functionality (MySQL WL#5980).
    
    os_file_create_simple_func(), os_file_create_func(),
    os_file_create_simple_no_error_handling_func(): Include FILE_SHARE_DELETE
    in the share_mode. (We will still prevent multiple InnoDB instances
    from using the same files by not setting FILE_SHARE_WRITE.)
    55abcfa7
fil0fil.cc 172 KB