Check the table(s) for errors. The command returns a table with the following
@code{CHECK TABLE} only works on @code{MyISAM} tables and is the same things
columns:
as running @code{myisamchk -m table_name} on the table.
Check the table(s) for errors and updates the key statistics for the table.
The command returns a table with the following columns:
@multitable @columnfractions .35 .65
@multitable @columnfractions .35 .65
@item Table @tab Table name
@item Table @tab Table name
...
@@ -16805,16 +16812,21 @@ columns:
...
@@ -16805,16 +16812,21 @@ columns:
@item Msg_text @tab The message.
@item Msg_text @tab The message.
@end multitable
@end multitable
Note that you can get many rows of information for each checked table. The
Note that you can get many rows of information for each checked
last one row will be of @code{Msg_type status} and should normally be
table. The last one row will be of @code{Msg_type status} and should
@code{OK}. If you don't get @code{OK}, you should normally run a repair of
normally be @code{OK}. If you don't get @code{OK}, or @code{Not
the table. @xref{Table maintenance}.
checked} you should normally run a repair of the table. @xref{Table
maintenance}. @code{Not checked} means that the table the given @code{TYPE}
told @code{MySQL} that there wasn't any need to check the table.
If @code{TYPE=QUICK} is given then @strong{MySQL} will not scan the rows
The different check types stands for the following:
for table with fixed size records.
@code{CHECK TABLE} only works on @code{MyISAM} tables and is the same things
@multitable @columnfractions .20 .80
as running @code{myisamchk -m table_name} on the table.
@item @code{QUICK} @tab Don't scan the rows for fixed size record tables.
@item @code{FAST} @tab Only check tables which hasn't been closed properly.
@item @code{CHANGED} @tab Only check tables which has been changed since last check or hasn't been closed properly.
@item @code{EXTENDED} @tab Do a full key lookup for all keys for each row. This enasures that the table is 100 % consistent, but will take a long time!