Skip to content

Commit

Permalink
PXB-3269 : Fix debug assertion failure on prepare_handle_ren() files.
Browse files Browse the repository at this point in the history
It is possible that a space_id.ren with content of desired filename,
the destination file name could already exist.

If the source and desitnation to be renamed is same, skip rename.
  • Loading branch information
satya-bodapati committed Sep 18, 2024
1 parent 284e035 commit 7d82843
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions storage/innobase/xtrabackup/src/ddl_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,15 @@ bool prepare_handle_ren_files(const datadir_entry_t &entry, void *) {
return false;
}

// space_id.ren is already with the desired name. Nothing to do.
if (source_path != nullptr && dest_path != nullptr &&
strcmp(source_path, dest_path) == 0) {
xb::info() << "prepare_handle_ren_files: ren_file: " << ren_path
<< " already has desired file name: " << dest_path
<< " source path is: " << source_path;
return true;
}

ut_ad(!os_file_exists(dest_path));

xb::info() << "prepare_handle_ren_files: renaming " << fil_space->name
Expand Down

0 comments on commit 7d82843

Please sign in to comment.