summaryrefslogtreecommitdiff
path: root/extra/mariabackup
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-09-25 17:29:43 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-09-25 17:29:43 +0300
commit304857764b7a79740644f533968f9aa6d4285798 (patch)
treea31b29165c21fba259c23a89bf290a0c1af963d3 /extra/mariabackup
parentd913f6611cb8d42d551f65a0940b478662ed58df (diff)
parentfc34e4c067ff6c043ff15a2b7ddd4bb0e2c1ca13 (diff)
downloadmariadb-git-304857764b7a79740644f533968f9aa6d4285798.tar.gz
MDEV-13564 Mariabackup does not work with TRUNCATE
Implement undo tablespace truncation via normal redo logging. Implement TRUNCATE TABLE as a combination of RENAME to #sql-ib name, CREATE, and DROP.
Diffstat (limited to 'extra/mariabackup')
-rw-r--r--extra/mariabackup/xtrabackup.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 9d7596b0b33..d55eae6f743 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -4222,9 +4222,6 @@ old_format:
goto log_fail;
}
- ut_ad(!((log_sys->log.format ^ LOG_HEADER_FORMAT_CURRENT)
- & ~LOG_HEADER_FORMAT_ENCRYPTED));
-
const byte* buf = log_sys->checkpoint_buf;
reread_log_header:
@@ -4241,9 +4238,6 @@ reread_log_header:
goto old_format;
}
- ut_ad(!((log_sys->log.format ^ LOG_HEADER_FORMAT_CURRENT)
- & ~LOG_HEADER_FORMAT_ENCRYPTED));
-
log_group_header_read(&log_sys->log, max_cp_field);
if (checkpoint_no_start != mach_read_from_8(buf + LOG_CHECKPOINT_NO)) {
@@ -4271,6 +4265,8 @@ reread_log_header:
byte MY_ALIGNED(OS_FILE_LOG_BLOCK_SIZE) log_hdr[OS_FILE_LOG_BLOCK_SIZE];
memset(log_hdr, 0, sizeof log_hdr);
mach_write_to_4(LOG_HEADER_FORMAT + log_hdr, log_sys->log.format);
+ mach_write_to_4(LOG_HEADER_SUBFORMAT + log_hdr,
+ log_sys->log.subformat);
mach_write_to_8(LOG_HEADER_START_LSN + log_hdr, checkpoint_lsn_start);
strcpy(reinterpret_cast<char*>(LOG_HEADER_CREATOR + log_hdr),
"Backup " MYSQL_SERVER_VERSION);