CHECKSUM TABLE tbl_name [, tbl_name] ... [QUICK | EXTENDED]
CHECKSUM TABLE reports a table
This statement requires the
SELECT privilege for the table.
This statement is not supported for views. If you run
CHECKSUM TABLE against a view,
Checksum value is always
NULL, and a warning is returned.
For a nonexistent table,
NULL and generates a
During the checksum operation, the table is locked with a read
QUICK, the live table checksum is
reported if it is available, or
otherwise. This is very fast. A live checksum is enabled by
CHECKSUM=1 table option when
you create the table; currently, this is supported only for
MyISAM tables. The
method is not supported with
See Section 13.1.17, “CREATE TABLE Syntax”.
EXTENDED, the entire table is read row
by row and the checksum is calculated. This can be very slow for
EXTENDED is specified, MySQL returns a live
checksum if the table storage engine supports it and scans the
In MySQL 5.5,
TABLE returns 0 for partitioned tables unless you
EXTENDED option. This issue is
resolved in MySQL 5.6. (Bug #11933226, Bug #60681)
The checksum value depends on the table row format. If the row
format changes, the checksum also changes. For example, the
storage format for temporal types such as
TIMESTAMP changes in MySQL 5.6
prior to MySQL 5.6.5, so if a 5.5 table is upgraded to MySQL
5.6, the checksum value may change.
If the checksums for two tables are different, then it is
almost certain that the tables are different in some way.
However, because the hashing function used by
CHECKSUM TABLE is not
guaranteed to be collision-free, there is a slight chance that
two tables which are not identical can produce the same