Skip to content

Commit

Permalink
We want to note that table will be copied only after it has been open…
Browse files Browse the repository at this point in the history
…ed and loaded to cache;

moving ddl_tracker->add_table to the correct spot
  • Loading branch information
aybek committed Mar 6, 2024
1 parent b1b16d3 commit a8bb867
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions storage/innobase/fil/fil0fil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11519,10 +11519,6 @@ std::tuple<dberr_t, space_id_t> fil_open_for_xtrabackup(
ddl_tracker->add_renamed_table(space_id, path);
}

if (ddl_tracker && (err == DB_PAGE_IS_BLANK || err == DB_SUCCESS)) {
ddl_tracker->add_table(space_id, path);
}

if (err == DB_PAGE_IS_BLANK) {
/* allow corrupted first page for xtrabackup, it could be just
zero-filled page, which we'll restore from redo log later */
Expand Down Expand Up @@ -11582,6 +11578,9 @@ std::tuple<dberr_t, space_id_t> fil_open_for_xtrabackup(
}

xb::error() << "Failed to open tablespace " << space->name;
} else if (ddl_tracker) {
/* Note that we have opened and loaded the table to cache for copying */
ddl_tracker->add_table(space_id, path);
}

if (!srv_backup_mode || srv_close_files) {
Expand Down

0 comments on commit a8bb867

Please sign in to comment.