[MDEV-27882] Innodb - recognise MySQL-8.0 innodb flags and give a specific error message Created: 2022-02-18  Updated: 2022-12-13  Resolved: 2022-11-10

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2
Fix Version/s: 10.11.2, 10.3.38, 10.4.28, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None


 Description   

2022-02-18  7:31:50 0 [ERROR] InnoDB: Invalid flags 0x4800 in ./ibdata1
2022-02-18  7:31:50 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption

Could leave the use impression that MariaDB has broken their data (as happen to this reddit user).

A more friendly message indicating that we know its not our data could save user's from blaming us or abandoning hope for their data.

Range of flags for different MySQL-8.0 innodb-page-size:
4k 0x48c0
8k 0x4900
16k 0x4800
32k 0x4980
64k 0x49c0

generator of flags

$ for a in 4k 8k 16k 32k 64k; do podman volume create m108$a; podman run --rm -e MYSQL_RANDOM_ROOT_PASSWORD=1 -v m108$a:/var/lib/mysql -d --name my$a mysql:8.0 --innodb-page-size=$a; done
m1084k
36d1dde5e43216d7363aa70b1c22aa6e99bcf36bb91cf8960b95663feecc501e
m1088k
1e5ab0cd56c0770d4c922e605aae9060bab2a3dc3576ce5d0160f567e14a4397
m10816k
8bf0319cac106671363db703af4040dd141e3b64bb4789d4d59f7a65976b23ff
m10832k
4c3fe2a0dc3c4e9732a02c29b3c400cd3aa7bb6260d2fed14ef7f9c9f10fcdd1
m10864k
6aa900095c35716b55487fcf67206b787397037d2dee4eb53fca656ca81a9361
 
$ for a in 4k 8k 16k 32k 64k; do podman kill my$a; echo volume  m108$a; podman run --rm -v m108$a:/var/lib/mysql mariadb:10.2 --innodb-page-size=$a; done
volume m1084k
...
(output extracted above)



 Comments   
Comment by Marko Mäkelä [ 2022-11-07 ]

Can you try creating encrypted tables as well? And see what happens on ALTER TABLE…IMPORT TABLESPACE?

Comment by Marko Mäkelä [ 2022-11-10 ]

This looks OK to me after some final adjustments.

Comment by Daniel Black [ 2022-11-10 ]

Thanks Marko. Currently doesn't have an encryption test, but does test the flags.

Generated at Thu Feb 08 09:56:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.