diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-12-02 14:35:10 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-12-02 14:35:10 +0200 |
commit | 9d9a2253c6b41a70de9314118ac067f1f869ff8d (patch) | |
tree | 06c295ab42075e7985b278273fef5c75845443ec /extra | |
parent | 8d2a57b4b7b9f6c7894ebf285a5c390e40fdc806 (diff) | |
parent | c6ed37b88a36bdadb5dbd47dc5ce84bbe847faba (diff) | |
download | mariadb-git-9d9a2253c6b41a70de9314118ac067f1f869ff8d.tar.gz |
Merge remote-tracking branch 10.2 into 10.3
Conflicts:
mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt
mysql-test/suite/innodb/r/innodb-mdev-7513.result
mysql-test/suite/innodb/t/innodb-mdev-7513.test
mysql-test/suite/wsrep/disabled.def
storage/innobase/ibuf/ibuf0ibuf.cc
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/backup_copy.cc | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index 161486fbe39..929319927e5 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -1666,6 +1666,9 @@ ibx_copy_incremental_over_full() } } + if (!(ret = backup_files_from_datadir(xtrabackup_incremental_dir))) + goto cleanup; + /* copy buffer pool dump */ if (innobase_buffer_pool_filename) { const char *src_name; @@ -2177,20 +2180,26 @@ static bool backup_files_from_datadir(const char *dir_path) if (info.type != OS_FILE_TYPE_FILE) continue; - const char *pname = strrchr(info.name, IF_WIN('\\', '/')); + const char *pname = strrchr(info.name, OS_PATH_SEPARATOR); if (!pname) pname = info.name; - /* Copy aria log files, and aws keys for encryption plugins.*/ - const char *prefixes[] = { "aria_log", "aws-kms-key" }; - for (size_t i = 0; i < array_elements(prefixes); i++) { - if (starts_with(pname, prefixes[i])) { - ret = copy_file(ds_data, info.name, info.name, 1); - if (!ret) { - break; - } - } - } + if (!starts_with(pname, "aws-kms-key") && + !starts_with(pname, "aria_log")) + /* For ES exchange the above line with the following code: + (!xtrabackup_prepare || !xtrabackup_incremental_dir || + !starts_with(pname, "aria_log"))) + */ + continue; + + if (xtrabackup_prepare && xtrabackup_incremental_dir && + file_exists(info.name)) + unlink(info.name); + + std::string full_path(dir_path); + full_path.append(1, OS_PATH_SEPARATOR).append(info.name); + if (!(ret = copy_file(ds_data, full_path.c_str() , info.name, 1))) + break; } os_file_closedir(dir); return ret; |