[MDEV-13105] InnoDB fails to load a table with PAGE_COMPRESSION_LEVEL after upgrade from 10.1.20 Created: 2017-06-15 Updated: 2017-07-05 Resolved: 2017-07-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.1.26, 10.2.7, 10.3.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
To reproduce:
Then start 10.2 on the same datadir, observe errors in the error log and
If you don't want to install 10.1.20, you can download the datadir prepared as described above from here: |
| Comments |
| Comment by Marko Mäkelä [ 2017-07-05 ] |
|
The upgrade part of the previous fix The problem is that the tablespace flags 0x1e1 appear valid in Datafile::read_first_page(). Why? The function fsp_flags_is_valid() is identical between 10.1 and 10.2. The remaining nonzero bits 7<<6 in the buggy MariaDB 10.1.0‥10.1.20 format indicate PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=3, as expected. In MariaDB 10.0 and 10.2, these bits would be interpreted as PAGE_SSIZE=7, indicating innodb_page_size=64k. The validity check for the PAGE_SSIZE was made as strict as possible, only allowing the values 0 (16k), 3 (4k), 4 (8k), 6 (32k), and 7 (64k). It looks like PAGE_COMPRESSION_LEVEL=2 and PAGE_COMPRESSION_LEVEL=0 (if it is allowed) could create false page size matches as well. We can make a special case for .ibd files and innodb_page_size=16k. When the PAGE_SSIZE bits are nonzero in this case, assume that the flags are in the buggy MariaDB 10.1.0 format. This should also fix |