summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-01-08 09:24:13 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-01-08 09:44:40 +0200
commit16d308e21d91b880f1a59ab964a86e39643cdf1e (patch)
treeb387310b261c2be93587a8360dbaa8b2e42fcdf2 /extra
parent3a22d6c136ff5a03012102d9a852c5e16ac612d4 (diff)
downloadmariadb-git-16d308e21d91b880f1a59ab964a86e39643cdf1e.tar.gz
MDEV-14874 innodb_encrypt_log corrupts the log when the LSN crosses 32-bit boundary
This bug affects both writing and reading encrypted redo log in MariaDB 10.1, starting from version 10.1.3 which added support for innodb_encrypt_log. That is, InnoDB crash recovery and Mariabackup will sometimes fail when innodb_encrypt_log is used. MariaDB 10.2 or Mariabackup 10.2 or later versions are not affected. log_block_get_start_lsn(): Remove. This function would cause trouble if a log segment that is being read is crossing a 32-bit boundary of the LSN, because this function does not allow the most significant 32 bits of the LSN to change. log_blocks_crypt(), log_encrypt_before_write(), log_decrypt_after_read(): Add the parameter "lsn" for the start LSN of the block. log_blocks_encrypt(): Remove (unused function).
Diffstat (limited to 'extra')
-rw-r--r--extra/mariabackup/xtrabackup.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 437fc4aa7f9..38312086ec1 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -2698,7 +2698,7 @@ xtrabackup_scan_log_recs(
if (srv_encrypt_log) {
log_encrypt_before_write(scanned_checkpoint_no,
- log_sys->buf, write_size);
+ log_sys->buf, start_lsn, write_size);
}
if (ds_write(dst_log_file, log_sys->buf, write_size)) {