Bug #66779 innochecksum does not work with compressed tables
Submitted: 11 Sep 2012 22:54 Modified: 3 Jul 2013 11:58
Reporter: Sveta Smirnova Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S3 (Non-critical)
Version:5.1.65, 5.5.29, 5.7.0 OS:Any
Assigned to: CPU Architecture:Any

[11 Sep 2012 22:54] Sveta Smirnova
Description:
Verifying bug #66738 I found that innochecksum does not work with compressed tables

How to repeat:
1. Start server with options: --innodb_file_per_table --innodb_file_format=barracuda
(you can use test case from bug #66738)
2. Connect to MySQL CLI and run:

mysql> CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
Query OK, 0 rows affected (0.60 sec)

mysql> CREATE TABLE t2(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ;
Query OK, 0 rows affected (0.49 sec)

mysql> flush tables;
Query OK, 0 rows affected (0.01 sec)

3. Run innochecksum on both tables.

Version 5.5.29:

[sveta@delly mysql-test]$ ../extra/innochecksum -v var/mysqld.1/data/test/t1.ibd 
file var/mysqld.1/data/test/t1.ibd = 65536 bytes (4 pages)...
checking pages in range 0 to 3
page 0 invalid (fails log sequence number check)
[sveta@delly mysql-test]$ ../extra/innochecksum -v var/mysqld.1/data/test/t2.ibd 
file var/mysqld.1/data/test/t2.ibd = 98304 bytes (6 pages)...
checking pages in range 0 to 5

Version 5.7.0:

[sveta@delly mysql-test]$ ../extra/innochecksum -v var/mysqld.1/data/test/t1.ibd 
InnoDB offline file checksum utility.
120912  1:44:29 InnoDB: CPU supports crc32 instructions

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
verbose                           TRUE
debug                             FALSE
count                             FALSE
start-page                        0
end-page                          0
page                              0
Error; This file contains compressed pages
[sveta@delly mysql-test]$ ../extra/innochecksum -v var/mysqld.1/data/test/t2.ibd 
InnoDB offline file checksum utility.
120912  1:44:34 InnoDB: CPU supports crc32 instructions

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
verbose                           TRUE
debug                             FALSE
count                             FALSE
start-page                        0
end-page                          0
page                              0
file var/mysqld.1/data/test/t2.ibd = 98304 bytes (6 pages)...
InnoChecksum; checking pages in range 0 to 5
[20 Sep 2012 12:28] zhai weixiang
facebook had  fixed this bug here:(http://bazaar.launchpad.net/~mysqlatfacebook/mysqlatfacebook/5.1/revision/3813)
[3 Jul 2013 11:58] Bugs System
Added a changelog entry for 5.7.2:

"innochecksum" would return an error when run on compressed tables."
[5 Feb 2014 0:23] James Day
This is fixed in the 5.7.2 package so a solution is to download that and use the version of innochecksum from there.

James Day, MySQL Senior Principal Support Engineer, Oracle