Commit 92bbf4ad authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-11782 WIP: Support upgrade from MariaDB 10.1.

recv_log_format_0_recover(): Invoke log_decrypt_after_read() after
reading the old-format redo log buffer.

With this change, we will upgrade to an encrypted redo log that
is misleadingly carrying a MySQL 5.7.9 compatible format tag while
the log blocks (other than the header and the checkpoint blocks)
are in an incompatible, encrypted format.
That needs to be fixed by introducing a new redo log format tag that
indicates that the entire redo log is encrypted.
parent b40a1fbc
......@@ -86,11 +86,10 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log
# FIXME: Upgrade from a clean encrypted redo log should actually work!
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
1
0
1
ib_buffer_pool
ib_logfile0
ib_logfile1
......
--let $no_cleanup=1
--source ../../innodb/t/log_corruption.test
--echo # FIXME: Upgrade from a clean encrypted redo log should actually work!
SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
......
......@@ -872,6 +872,8 @@ recv_log_format_0_recover(lsn_t lsn)
% univ_page_size.physical()),
OS_FILE_LOG_BLOCK_SIZE, buf, NULL);
log_decrypt_after_read(buf, OS_FILE_LOG_BLOCK_SIZE);
if (log_block_calc_checksum_format_0(buf)
!= log_block_get_checksum(buf)) {
ib::error() << NO_UPGRADE_RECOVERY_MSG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment