Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.4-1, 10.2.4-2
Description
WL#8845 introduced a redo log format identifier in MySQL 5.7.9.
The MariaDB extension innodb_encrypt_log should distinguish encrypted redo logs from cleartext ones by the redo log format tag. In this way, an attempt to start up MySQL 5.7 after a crash of MariaDB with innodb_encrypt_log=1 will result in a clear error message rather than some strange-looking crash.
Attachments
Issue Links
- blocks
-
MDEV-12041 Implement key rotation for innodb_encrypt_log
-
- Closed
-
- causes
-
MDEV-13061 innodb_encrypt_log recovery is spamming the error log
-
- Closed
-
-
MDEV-13834 10.2 wrongly recognizes 10.1.10 innodb_encrypt_log=ON data as after-crash and refuses to start
-
- Closed
-
- includes
-
MDEV-12061 Allow innodb_log_files_in_group=1
-
- Closed
-
- is part of
-
MDEV-11873 Unnecessary InnoDB warnings upon bootstrap
-
- Closed
-
- relates to
-
MDEV-12103 Reduce the time of looking for MLOG_CHECKPOINT during crash recovery
-
- Closed
-
-
MDEV-12288 Reset DB_TRX_ID when the history is removed, to speed up MVCC
-
- Closed
-
-
MDEV-14874 innodb_encrypt_log corrupts the log when the LSN crosses 32-bit boundary
-
- Closed
-
-
MDEV-9011 Redo log encryption does not work
-
- Closed
-
-
MDEV-11432 Change the informational redo log format tag to say "MariaDB 10.2.3"
-
- Closed
-
-
MDEV-13253 After rebuilding redo logs, InnoDB can leak data from redo log buffer
-
- Closed
-
-
MDEV-13318 Crash recovery failure after the server is killed during innodb_encrypt_log startup
-
- Closed
-
As part of this task, we must test if MariaDB can be upgraded from 10.1 to 10.2 when log encryption is in use. Here is my test on Debian GNU/Linux Sid:
sudo apt install mariadb-server-10.1
mkdir /dev/shm/f; cd /dev/shm/f; cat > logkey.txt << EOF
1;36D6CB74CA7D4586CCC7261E174079CC5639E5F681D500ADFA887C165AD49301
2;F51F5108CF6048B4C9C88BA6CE1C13F9F1CBEE82080F7FA0F979DEF5D4B94509
EOF
/usr/sbin/mysqld --file-key-management-filename=logkey.txt --plugin-load=file_key_management.so --basedir=/usr --datadir=/dev/shm/f --innodb --innodb-encrypt-log
After shutting down the 10.1 server (for me, it would should shut down because another mysqld instance was already started on port 3306), start 10.2 in gdb on the same files:
break recv_log_format_0_recover
run --gdb --datadir=/dev/shm/f --file-key-management-filename=logkey.txt --plugin-dir=/dev/shm/t/plugin/file_key_management --plugin-load=file_key_management.so --innodb --innodb-encrypt-log --lc-messages-dir=/dev/shm/t/sql/share
continue
Observe that the following message is displayed:
2017-01-24 10:18:21 140737353952960 [ERROR] InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5.7.9, and it appears corrupted. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading.html
I think that the message should be revised to refer to MariaDB 10.2.2, and that we should attempt to decrypt the data. Upgrade with a clean encrypted redo log from 10.1 should definitely be allowed.