Bug #88195 | 8.0 crash recovery fails for upgraded 5.7 compressed tables with size < 96k | ||
---|---|---|---|
Submitted: | 24 Oct 2017 6:04 | Modified: | 8 Nov 2017 20:40 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
Version: | 8.0.3 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[24 Oct 2017 6:04]
Shane Bester
[24 Oct 2017 6:21]
MySQL Verification Team
Workaround is to find the 64k tables and rebuild them in 8.0 before a crash recovery is needed... e.g. mysql> select name,file_size from information_schema.INNODB_TABLESPACES where file_size<96*1024 and file_size>0; +--------+-----------+ | name | file_size | +--------+-----------+ | test/t | 65536 | +--------+-----------+ 1 row in set (0.00 sec) mysql> mysql> optimize table test.t; +--------+----------+----------+-------------------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +--------+----------+----------+-------------------------------------------------------------------+ | test.t | optimize | note | Table does not support optimize, doing recreate + analyze instead | | test.t | optimize | status | OK | +--------+----------+----------+-------------------------------------------------------------------+ 2 rows in set (0.15 sec) mysql> select name,file_size from information_schema.INNODB_TABLESPACES where name='test/t'; +--------+-----------+ | name | file_size | +--------+-----------+ | test/t | 98304 | +--------+-----------+ 1 row in set (0.00 sec)
[8 Nov 2017 20:40]
Daniel Price
Posted by developer: Fixed as of the upcoming 8.0.4 release, and here's the changelog entry: The InnoDB recovery process failed with a tablespace size error for a compressed table that was previously upgraded from MySQL 5.7 to MySQL 8.0.
[9 Nov 2017 8:52]
Naga Satyanarayana Bodapati
Posted by developer: Dan, can you also update the doc to include the following aspects as well. Compressed tables will now use its physical page size instead of the database page size for its initial size. This would mean reduction of size for empty compressed tables that are created in 8.0. For example, with innodb-page-size=16k, CREATE TABLE t1(a INT) KEY_BLOCK_SIZE=1; in 5.7 : 65536 (64K) in 8.0.4: 7168 (7K)
[16 Nov 2017 13:56]
Daniel Price
Posted by developer: The changelog entry was revised as follows: The InnoDB recovery process failed with a tablespace size error for a compressed table that was previously upgraded from MySQL 5.7 to MySQL 8.0. The tablespace file for a compressed table is now created using the physical page size instead of the InnoDB page size, which makes the initial size of a tablespace file for an empty compressed table smaller than in previous MySQL releases. An update was also made to: https://dev.mysql.com/doc/refman/8.0/en/innodb-compression-usage.html