1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Marko Mäkelä
2017-02-06 18:44:35 +02:00
parent b40a1fbc93
commit 92bbf4ad04
3 changed files with 3 additions and 4 deletions

View File

@ -86,11 +86,10 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
FOUND /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err FOUND /len 22; hex 38000000000012860cb7809781e800066269676f7400; asc 8 bigot ;/ in mysqld.1.err
# Minimal MariaDB 10.1.21 encrypted redo log # 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' SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');
1 1
0 1
ib_buffer_pool ib_buffer_pool
ib_logfile0 ib_logfile0
ib_logfile1 ib_logfile1

View File

@ -1,8 +1,6 @@
--let $no_cleanup=1 --let $no_cleanup=1
--source ../../innodb/t/log_corruption.test --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' SELECT COUNT(*) `1` FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED'); AND support IN ('YES', 'DEFAULT', 'ENABLED');

View File

@ -872,6 +872,8 @@ recv_log_format_0_recover(lsn_t lsn)
% univ_page_size.physical()), % univ_page_size.physical()),
OS_FILE_LOG_BLOCK_SIZE, buf, NULL); 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) if (log_block_calc_checksum_format_0(buf)
!= log_block_get_checksum(buf)) { != log_block_get_checksum(buf)) {
ib::error() << NO_UPGRADE_RECOVERY_MSG ib::error() << NO_UPGRADE_RECOVERY_MSG