innochecksum — Offline InnoDB File Checksum Utility With  --allow-mismatches  set to 1, if there is a mismatch at page 600 and another at page 700 on a file with 1000 pages, the checksum is updated for pages 0-599 and 601-699. Because  --allow- mismatches  is set to 1, the checksum tolerates the first mismatch and terminates on the second mismatch, leaving page 600 and pages 700-999 unchanged. Rewrite a checksum. When rewriting an invalid checksum, the  --no-check  option must be used together with the  --write  option. The  --no-check  option tells  innochecksum  to ignore verification of the invalid checksum. You do not have to specify the  --no-check  option if the current checksum is valid. An algorithm must be specified when using the  --write  option. Possible values for the  --write  option are: The  --write  option rewrites entire pages to disk. If the new checksum is identical to the existing checksum, the new checksum is not written to disk in order to minimize I/O. innochecksum  obtains an exclusive lock when the  --write  option is used. In this example, a  crc32  checksum is written for  tab1.ibd : In this example, a  crc32  checksum is rewritten to replace an invalid  crc32  checksum: Display a count of each page type in a tablespace. Example usage: Sample output for  --page-type-summary : • --write= name ,  -w  num • innodb : A checksum calculated in software, using the original algorithm from  InnoDB . • crc32 : A checksum calculated using the  crc32  algorithm, possibly done with a hardware assist. • none : A constant number. • --page-type-summary ,  -S innochecksum --page-type-summary ../data/test/tab1.ibd innochecksum --no-check --write crc32 ../data/test/tab1.ibd innochecksum -w crc32 ../data/test/tab1.ibd File::../data/test/tab1.ibd ================PAGE TYPE SUMMARY============== #PAGE_COUNT PAGE_TYPE =============================================== 2 Index page 0 Undo log page 1 Inode page 0 Insert buffer free list page 2 Freshly allocated page 1 Insert buffer bitmap 0 System page 0 Transaction system page 1 File Space Header 0 Extent descriptor page 0 BLOB page 0 Compressed BLOB page 0 Other type of page =============================================== 558