diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-01-10 19:35:45 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-01-10 19:35:45 +0100 |
commit | 7331c661dbb71b0826bfaf28e3fbe34411c6f8e4 (patch) | |
tree | 8d7ea5bf926f4ec0eaa5c7d7ec52ae0fff8720f2 /extra | |
parent | 4a872ae1e725b8d17f8266a9ca33a2aca4285c00 (diff) | |
download | mariadb-git-7331c661dbb71b0826bfaf28e3fbe34411c6f8e4.tar.gz |
MDEV-18201 : mariabackup- fix processing of rename/create sequence in prepare
Fix one more bug in "DDL redo" phase in prepare
If table was renamed, and then new table was created with the old name,
prepare can be confused, and .ibd can end up with wrong name.
Fix the order of how DDL fixup is applied , once again - ".new" files
should be processed after renames.
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index e0013979901..4d5fc98fcd6 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -5503,6 +5503,14 @@ xtrabackup_prepare_func(char** argv) fil_path_to_mysql_datadir = "."; + /* Fix DDL for prepare. Process .del,.ren, and .new files. + The order in which files are processed, is important + (see MDEV-18185, MDEV-18201) + */ + xb_process_datadir(xtrabackup_incremental_dir ? xtrabackup_incremental_dir : ".", + ".del", prepare_handle_del_files); + xb_process_datadir(xtrabackup_incremental_dir? xtrabackup_incremental_dir:".", + ".ren", prepare_handle_ren_files); if (xtrabackup_incremental_dir) { xb_process_datadir(xtrabackup_incremental_dir, ".new.meta", prepare_handle_new_files); xb_process_datadir(xtrabackup_incremental_dir, ".new.delta", prepare_handle_new_files); @@ -5510,11 +5518,6 @@ xtrabackup_prepare_func(char** argv) else { xb_process_datadir(".", ".new", prepare_handle_new_files); } - xb_process_datadir(xtrabackup_incremental_dir ? xtrabackup_incremental_dir : ".", - ".del", prepare_handle_del_files); - xb_process_datadir(xtrabackup_incremental_dir? xtrabackup_incremental_dir:".", - ".ren", prepare_handle_ren_files); - int argc; for (argc = 0; argv[argc]; argc++) {} encryption_plugin_prepare_init(argc, argv); |