content_image/699948.jpg
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. 

• --write= name , -w num 

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: 

• 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. 

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 : 

innochecksum -w crc32 ../data/test/tab1.ibd 

In this example, a crc32  checksum is rewritten to replace an invalid crc32  checksum: 

innochecksum --no-check --write crc32 ../data/test/tab1.ibd 

• --page-type-summary , -S 

Display a count of each page type in a tablespace. Example usage: 

innochecksum --page-type-summary ../data/test/tab1.ibd 

Sample output for --page-type-summary : 

File::../data/test/tab1.ibd ================PAGE TYPE SUMMARY============== #PAGE_COUNT PAGE_TYPE 

<img src='content_image/699948.jpg'>

