Bug #72273 innochecksum does not work with crc32 algorithm
Submitted: 8 Apr 2014 11:32 Modified: 8 Apr 2014 19:06
Reporter: Hao Liu Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any

[8 Apr 2014 11:32] Hao Liu
The innochecksum utility does not work with crc32 checksum algorithm. It check the old method of checksumming wrong, and will print an error like below´╝Ü

$./innochecksum --debug /u01/my3928/data/test/sbtest1.ibd
InnoDB offline file checksum utility.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
verbose                           TRUE
debug                             TRUE
count                             FALSE
start-page                        0
end-page                          0
page                              0
file /u01/my3928/data/test/sbtest1.ibd = 9437184 bytes (576 pages)...
InnoChecksum; checking pages in range 0 to 575
page 0: log sequence number: first = 2710716; second = 2710716
page 0: old style: calculated = 1130663741; recorded = 3133506548
Fail;  page 0 invalid (fails old style checksum)

How to repeat:
1. set the global variable innodb_checksum_algorithm to strict_crc32, such as:
root@(none) 07:21:47>show global variables like "innodb_checksum%";
| Variable_name             | Value        |
| innodb_checksum_algorithm | strict_crc32 |
| innodb_checksums          | ON           |
2. insert some rows into an innodb table;
3. shutdown the mysqld;
4. use the innochecksum utility to check the table , you will see the result as above.

Suggested fix:
I think we can use the buf_page_is_corrupted function to judge whether the checksum is right like 5.7, but I am not very sure because I have not compiled a 5.7 version to verify it.
[8 Apr 2014 19:06] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #70344