Description:
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.
Description: 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.