summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
Diffstat (limited to 'extra')
-rw-r--r--extra/mariabackup/xtrabackup.cc13
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);