Bug #77089 Misleading innochecksum error for compressed tables with key_block_size=16
Submitted: 19 May 2015 10:27 Modified: 19 May 2015 11:48
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:up to 5.6, 5.5.45, 5.6.26 OS:Any
Assigned to: CPU Architecture:Any
Tags: compression, innochecksum

[19 May 2015 10:27] Laurynas Biveinis
Description:
innochecksum prints

Fail; page 0 invalid (fails log sequence number check)

instead of

Error; This file contains compressed pages

for tables compressed with KEY_BLOCK_SIZE=16.

The incorrect error message suggests that there is something wrong with the innochecksum'ed file, which may mislead the user into restoring a backup etc.

How to repeat:
innodb_file_per_table=ON

CREATE TABLE foo (...) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16

shutdown server

innochecksum foo.ibd

Suggested fix:
Remove assumption in the source that a table is compressed iff logical_page_size != physical_page_size. Make get_page_size store the compression flag in a separate variable instead and use that.
[19 May 2015 11:48] MySQL Verification Team
Hello Laurynas,

Thank you for the bug report.

Thanks,
Umesh
[19 May 2015 11:48] MySQL Verification Team
//  Server started with --innodb_file_per_table=1 --innodb_file_format=barracuda

CREATE DATABASE IF NOT EXISTS test;
USE test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT PRIMARY KEY)ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;

// 5.5.45

[umshastr@hod03]/export/umesh/server/binaries/mysql-5.5.45: bin/innochecksum 77089/test/t1.ibd
page 0 invalid (fails log sequence number check)

// 5.6.26

[umshastr@hod03]/export/umesh/server/binaries/mysql-5.6.26: bin/innochecksum 77089/test/t1.ibd
InnoDB offline file checksum utility.
Fail; page 0 invalid (fails log sequence number check)