diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-03 16:24:22 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-03 16:46:38 +0200 |
commit | 7158edcba3af3766e9329f9927ce4adfd2a40bf8 (patch) | |
tree | 6a930e143a5d8a716800973a4260fd8c7c5862d9 /extra/mariabackup/xtrabackup.h | |
parent | 3ba3f81ae0d4c1a74e98bbeaba70d2fd1e63a76a (diff) | |
download | mariadb-git-7158edcba3af3766e9329f9927ce4adfd2a40bf8.tar.gz |
MDEV-18129 Backup fails for encrypted tables: mariabackup: Database page corruption detected at page 1
If an encrypted table is created during backup, then
mariabackup --backup could wrongly fail.
This caused a failure of the test mariabackup.huge_lsn once on buildbot.
This is due to the way how InnoDB creates .ibd files. It would first
write a dummy page 0 with no encryption information. Due to this,
xb_fil_cur_open() could wrongly interpret that the table is not encrypted.
Subsequently, page_is_corrupted() would compare the computed page
checksum to the wrong checksum. (There are both "before" and "after"
checksums for encrypted pages.)
To work around this problem, we introduce a Boolean option
--backup-encrypted that is enabled by default. With this option,
Mariabackup will assume that a nonzero key_version implies that the
page is encrypted. We need this option in order to be able to copy
encrypted tables from MariaDB 10.1 or 10.2, because unencrypted pages
that were originally created before MySQL 5.1.48 could contain nonzero
garbage in the fields that were repurposed for encryption.
Later, MDEV-18128 would clean up the way how .ibd files are created,
to remove the need for this option.
page_is_corrupted(): Add missing const qualifiers, and do not check
space->crypt_data unless --skip-backup-encrypted has been specified.
xb_fil_cur_read(): After a failed page read, output a page dump.
Diffstat (limited to 'extra/mariabackup/xtrabackup.h')
-rw-r--r-- | extra/mariabackup/xtrabackup.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h index 2af5396fa06..e870ecbe2eb 100644 --- a/extra/mariabackup/xtrabackup.h +++ b/extra/mariabackup/xtrabackup.h @@ -129,6 +129,7 @@ extern my_bool opt_no_backup_locks; extern my_bool opt_decompress; extern my_bool opt_remove_original; extern my_bool opt_extended_validation; +extern my_bool opt_backup_encrypted; extern char *opt_incremental_history_name; extern char *opt_incremental_history_uuid; |