[MDEV-14169] MariaDB 10.0/10.1 fail to start with datadir created by MariaDB 5.5 using innodb-page-size != 16K Created: 2017-10-27 Updated: 2017-11-06 Resolved: 2017-11-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - XtraDB |
| Affects Version/s: | 10.0, 10.1, 10.1.26, 10.0.32, 10.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Oliver Bock | Assignee: | Marko Mäkelä |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | upstream-5.5 | ||
| Environment: |
Debian Jessie (MariaDB 10.0) / Debian Stretch (MariaDB 10.1) |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Sprint: | 10.1.29 | ||||||||||||||||
| Description |
|
I'm trying to migrate from MariaDB 5.5 to 10.1 via 10.0 with innodb-page-size = 8192. I first got this error when I migrated to 10.0.32 and only then came across the original bug report. Now I still get the same known error, despite having upgraded to 10.1.26 and the original error said to be fixed in 10.1.21:
|
| Comments |
| Comment by Oliver Bock [ 2017-10-27 ] | ||||||||||||||||||
|
FYI, I just tested vanilla 10.1.28+maria-1~stretch instead of Debian's 10.1.26-0+deb9u1 but the error still persists. Thus it's not a Debian-only issue. | ||||||||||||||||||
| Comment by Elena Stepanova [ 2017-10-30 ] | ||||||||||||||||||
|
Thanks for the report.
5.5 datadir pre-created in the described way is attached. | ||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-11-06 ] | ||||||||||||||||||
|
This message caught my attention:
In the attached dataset, the doublewrite buffer contains a copy for the first page of the data file.
There are quite a few doublewrite entries for the system tablespace:
There is only one copy of the first page:
Note the FIL_PAGE_LSN=0x0dba60.
Same FIL_PAGE_LSN, but the FIL_PAGE_FILE_FLUSH_LSN differs, because when it is written at shutdown, the doublewrite buffer is being bypassed. The failure seems to be worse. Let us look at fil_user_tablespace_restore_page():
The field flags=0 indicates that the tablespace is in the old innodb_page_size=16k format. An XtraDB start-up parameter innodb_page_size was introduced in MariaDB 5.1.47, 5.2.1, 5.3.0, 5.5.20. Theoretically, an upgrade from 5.5 with non-default innodb_page_size is possible if the tablespace flags at byte offset 54 are adjusted. In this case, I believe that the correct flags would be 256, which corresponds to 4<<6, for 512<<4 = 8192.
I wonder how upstream supports such upgrades. Maybe not at all? For another compatibility problem that XtraDB 5.5 introduced (innodb_fast_checksum) there exists a work-around of rewriting all page checksums by using the MariaDB 10.2 innochecksum tool. A possible fix would be to introduce an innochecksum option for updating the tablespace flags. | ||||||||||||||||||
| Comment by Marko Mäkelä [ 2017-11-06 ] | ||||||||||||||||||
|
According to the MariaDB documentation on InnoDB and XtraDB parameters, Percona deprecated the parameter innodb_page_size in XtraDB 5.5.30-30.2. This seemed to ‘fix’ the upgrade problem for them. It is technically possible to implement an option in the innochecksum tool that is included in MariaDB 10.2 or later, to set the tablespace flags in the first page of each InnoDB tablespace. But given that the option was marked experimental and also deprecated in XtraDB 5.5, I would prefer to not do that unless requested by a customer. |