[MDEV-18532] Upgrade from MariaDB 10.1.37 to MariaDB 10.2.21 fails with: [ERROR] InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10.2.2, and it appears corrupted. Created: 2019-02-11  Updated: 2019-05-02  Resolved: 2019-04-30

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Tomas Mozes Assignee: Marko Mäkelä
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

Linux Gentoo


Attachments: Text File log.txt    

 Description   

MariaDB failed to start after upgrading from 10.1.37 to 10.2.21:
1) upgrade package to MariaDB 10.2.21
2) SET GLOBAL innodb_fast_shutdown=0;
3) /etc/init.d/mysql restart

2019-02-11 7:18:59 139738772682560 [ERROR] InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10.2.2, and it appears corrupted. Please follow the instructions at https://mariadb.com/kb/en/library/upgrading/
2019-02-11 7:18:59 139738772682560 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2019-02-11 7:19:00 139738772682560 [Note] InnoDB: Starting shutdown...
2019-02-11 7:19:00 139738772682560 [ERROR] Plugin 'InnoDB' init function returned error.
2019-02-11 7:19:00 139738772682560 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-02-11 7:19:00 139738772682560 [Note] CONNECT: Version 1.06.0008 October 06, 2018
2019-02-11 7:19:00 139738772682560 [Note] Plugin 'FEEDBACK' is disabled.
2019-02-11 7:19:00 139738772682560 [ERROR] Unknown/unsupported storage engine: InnoDB
2019-02-11 7:19:00 139738772682560 [ERROR] Aborting

[mysqld]
binlog_checksum = CRC32
innodb_checksum_algorithm = crc32
innodb_file_format = Barracuda
innodb_file_per_table
innodb_flush_log_at_trx_commit = 1
innodb_log_checksum_algorithm = crc32
log_slave_updates = 1
master_verify_checksum = 1
slave_parallel_threads = 5
slave_sql_verify_checksum = 1
sync_binlog = 1

After removing ib_logfile* it started fine.



 Comments   
Comment by Elena Stepanova [ 2019-02-14 ]

Thanks for the report.
The culprit is innodb_log_checksum_algorithm = crc32. It had been an experimental feature in 10.0-10.1, which was deprecated in 10.2 and removed in 10.3. Apparently, at some point 10.2 stopped recognizing logs created with it. I'll leave it to marko to decide what can and should be done about it.

Comment by Marko Mäkelä [ 2019-04-30 ]

The innodb_log_checksum_algorithm was an XtraDB option, not InnoDB.

I would rather not fix this. A simple workaround exists: If the earlier version was shut down successfully, you can manually delete the ib_logfile* and start MariaDB Server 10.2 or later.

Similarly, the XtraDB 5.5 option innodb_fast_checksum will prevent any upgrade to later versions. The only remedy for that might be to use innochecksum from MariaDB 10.2 or MySQL 5.7 to recompute the page checksums in all data files.

Comment by Tomas Mozes [ 2019-05-02 ]

I think it would be enough to document this in https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102/ to avoid surprises.

Generated at Thu Feb 08 08:44:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.