diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-11-05 17:44:46 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-11-05 17:44:46 +0200 |
commit | 1845b2e7f69f1fdfca7f27bff380b8488eba3c91 (patch) | |
tree | 17c2660ab175d0c0a559035c1b8fd72f56894191 /innobase/fil | |
parent | 69a5b3e8c896491d69b643376dbac5a08a3abb30 (diff) | |
download | mariadb-git-1845b2e7f69f1fdfca7f27bff380b8488eba3c91.tar.gz |
fil0fil.c:
Do renames based on space id in log replay of ibbackup
innobase/fil/fil0fil.c:
Do renames based on space id in log replay of ibbackup
Diffstat (limited to 'innobase/fil')
-rw-r--r-- | innobase/fil/fil0fil.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index 7bfe7277afa..a9ae59fbd50 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -1681,7 +1681,12 @@ fil_op_log_parse_or_replay( ut_a(fil_delete_tablespace(space_id)); } } else if (type == MLOG_FILE_RENAME) { - if (fil_get_space_id_for_table(name) == space_id) { + /* We do the rename based on space id, not old file name; + this should guarantee that after the log replay each .ibd file + has the correct name for the latest log sequence number; the + proof is left as an exercise :) */ + + if (fil_tablespace_exists_in_mem(space_id)) { /* Create the database directory for the new name, if it does not exist yet */ fil_create_directory_for_tablename(new_name); @@ -1693,11 +1698,6 @@ fil_op_log_parse_or_replay( == ULINT_UNDEFINED) { ut_a(fil_rename_tablespace(name, space_id, new_name)); - } else { - fprintf(stderr, -"InnoDB: Warning: in log replay cannot rename tablespace\n" -"InnoDB: %s with id %lu to %s, because it exists already.\n", - name, space_id, new_name); } } } else { |