summaryrefslogtreecommitdiff
path: root/extra/mariabackup
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mariabackup')
-rw-r--r--extra/mariabackup/backup_copy.cc35
-rw-r--r--extra/mariabackup/xtrabackup.cc2
2 files changed, 21 insertions, 16 deletions
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index bc37f347532..0b501970efa 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -46,6 +46,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <ut0mem.h>
#include <srv0start.h>
#include <fil0fil.h>
+#include <trx0sys.h>
#include <set>
#include <string>
#include <mysqld.h>
@@ -1680,26 +1681,30 @@ copy_back()
ut_crc32_init();
/* copy undo tablespaces */
- if (srv_undo_tablespaces > 0) {
- dst_dir = (srv_undo_dir && *srv_undo_dir)
- ? srv_undo_dir : mysql_data_home;
- ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
+ dst_dir = (srv_undo_dir && *srv_undo_dir)
+ ? srv_undo_dir : mysql_data_home;
- for (ulong i = 1; i <= srv_undo_tablespaces; i++) {
- char filename[20];
- sprintf(filename, "undo%03lu", i);
- if (!(ret = copy_or_move_file(filename, filename,
- dst_dir, 1))) {
- goto cleanup;
- }
- }
+ ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
- ds_destroy(ds_data);
- ds_data = NULL;
+ for (uint i = 1; i <= TRX_SYS_MAX_UNDO_SPACES; i++) {
+ char filename[20];
+ sprintf(filename, "undo%03u", i);
+ if (!file_exists(filename)) {
+ break;
+ }
+ if (!(ret = copy_or_move_file(filename, filename,
+ dst_dir, 1))) {
+ goto cleanup;
+ }
}
+ ds_destroy(ds_data);
+ ds_data = NULL;
+
+ /* copy redo logs */
+
dst_dir = (srv_log_group_home_dir && *srv_log_group_home_dir)
? srv_log_group_home_dir : mysql_data_home;
@@ -1825,7 +1830,7 @@ copy_back()
}
}
- /* copy buufer pool dump */
+ /* copy buffer pool dump */
if (innobase_buffer_pool_filename) {
const char *src_name;
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index a6bc4dab552..de32b5b864f 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -2838,7 +2838,7 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
/* We found a symlink or a file */
if (strlen(fileinfo.name) > 4) {
bool is_isl= false;
- if (ends_with(fileinfo.name, ".ibd") || ((is_isl = ends_with(fileinfo.name, ".ibd"))))
+ if (ends_with(fileinfo.name, ".ibd") || ((is_isl = ends_with(fileinfo.name, ".isl"))))
(*callback)(dbinfo.name, fileinfo.name, is_isl);
}
}