[MDEV-11623] MariaDB 10.1 fails to start datadir created with MariaDB 10.0/MySQL 5.6 using innodb-page-size!=16K Created: 2016-12-21  Updated: 2023-09-14  Resolved: 2017-01-19

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB
Affects Version/s: 10.1
Fix Version/s: 10.1.21, 10.2.4

Type: Bug Priority: Major
Reporter: Jan Lindström (Inactive) Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-9581 [PATCH] Innodb in Mariadb-10.1.x is u... Closed
PartOf
includes MDEV-11202 InnoDB 10.1 -> 10.2 migration does no... Closed
includes MDEV-11799 InnoDB can abort if the doublewrite b... Closed
Problem/Incident
causes MDEV-15333 MariaDB (still) slow start Closed
Relates
relates to MDEV-11816 Disallow CREATE TEMPORARY TABLE…ROW_F... Closed
relates to MDEV-14169 MariaDB 10.0/10.1 fail to start with ... Closed
relates to MDEV-18097 Indicate which InnoDB data files are ... Closed
relates to MDEV-11596 Testing for live upgrade with compres... Closed
relates to MDEV-12530 MariaDB 10.1.22 has slower speed of s... Closed
relates to MDEV-13105 InnoDB fails to load a table with PAG... Closed
relates to MDEV-14076 InnoDB: Failing assertion when access... Closed
Sprint: 10.2.4-5, 10.1.21

 Description   

Error log will contain:

InnoDB: Error: Current page size 8192 !=  page size on page 16384
Error: JAN: pageno 8191 offset 3772
2016-12-21 14:08:08 140182760941440 [ERROR] InnoDB: innodb-page-size mismatch in data file ./ibdata1



 Comments   
Comment by Jan Lindström (Inactive) [ 2016-12-21 ]

http://lists.askmonty.org/pipermail/commits/2016-December/010324.html

Comment by Marko Mäkelä [ 2016-12-27 ]

I think that more testing and a detailed plan of how to upgrade from 10.1 to 10.2 is needed.

Comment by Jan Lindström (Inactive) [ 2016-12-29 ]

bb-10.1-jplindst

or

http://lists.askmonty.org/pipermail/commits/2016-December/010356.html

Comment by Jan Lindström (Inactive) [ 2016-12-30 ]

10.2 will use same flags as fixed 10.1.

Comment by Marko Mäkelä [ 2017-01-11 ]

The latest patch looks good to me, patch looks great to me, except for one thing: I think that we should write the corrected flags back to the data file.

Given that 10.1 is already in GA status, we should consider our options carefully. My preference would be (1) below:

(1) If we adjust 10.1.21 so that it writes back corrected flags for both old and new data files, then older 10.1.x would be unable to open the files (if compression, DATA_DIRECTORY or non-default innodb_page_size was used).

(2) If we adjust 10.1.21 so that it writes correct flags for new data files (like the current patch does), then older 10.1.x would not be able to read those created-with-newer-version data files.

(3) If we adjust 10.2 only, so that it writes the correct flags for new files and also adjusts the flags in old files, then we would seem to have a clear upgrade path.

Whatever we choose, I would like to remove the flag-adjustment code from 10.3 or 10.4. This would mean that an upgrade (or import) directly from 10.1 is only possible if the problematic features (DATA_DIRECTORY, compression, non-standard innodb_page_size) were not used. Otherwise the upgrade would have to be done through 10.2.

Comment by Marko Mäkelä [ 2017-01-11 ]

After some discussion, it seems that (3) would be the path of least surprise for users.
This would mean that the work is to be done in MDEV-11202 only, and this ticket can be closed as ‘won’t fix’.

Comment by Marko Mäkelä [ 2017-01-12 ]

After some more discussion, we decided to go with (1), that is, fix this file format compatibility problem already in the 10.1 series, and keep the adjustment code also in 10.2, but possibly remove it from later release series.

To allow downgrade from the fixed 10.1 to earlier (buggy) 10.1 releases, an innochecksum option will be implemented to convert tablespace flags to the buggy 10.1 format.

Comment by Jan Lindström (Inactive) [ 2017-01-12 ]

Read the current status and accept the direction this is going.

Comment by Marko Mäkelä [ 2017-01-13 ]

bb-10.1-mdev-11623 is rebased on the latest 10.1 branch.
There are a few minor differences to the commits in the bb-10.1-jplindst branch:

diff -I^@@ -I^index <(git diff origin/bb-10.1-mdev-11623{~,}) <(git diff origin/bb-10.1-jplindst{~16,})

The above command displays 105 lines of output.

Comment by Marko Mäkelä [ 2017-01-14 ]

Today, I did a test merge to 10.2 and pushed it to bb-10.2-mdev-11623.
Given the amount of adjustments and conflict resolution needed, that merge probably should be reviewed as well.

Comment by Jan Lindström (Inactive) [ 2017-01-14 ]

Ok to push

Comment by Marko Mäkelä [ 2017-01-15 ]

In response to the failure https://gist.github.com/elenst/c0a11433d6146f21675f68f19021eb71
I fixed two bugs in the doublewrite buffer code. Please review the latest commit in the bb-10.1-mdev-11623 branch.

Comment by Jan Lindström (Inactive) [ 2017-01-15 ]

Ok to push.

Comment by Marko Mäkelä [ 2017-01-15 ]

I filed MDEV-11799 for the non-flags-related fix of buf_dblwr_process().
I think that we should fix that one separately already in 10.0, to make the InnoDB doublewrite buffer a more useful.

Comment by Marko Mäkelä [ 2017-01-15 ]

The fix has been pushed to 10.1.21. I will keep this open until the fix is in 10.2 as well.

Comment by Marko Mäkelä [ 2017-01-19 ]

The merge to 10.2 was challenging due to the refactoring of tablespace code and changes to tablespace discovery in crash recovery.

Generated at Thu Feb 08 07:51:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.