7.12 REPAIR TABLE syntax

REPAIR TABLE tbl_name[,tbl_name...] [TYPE = QUICK]

REPAIR TABLE only works on MyISAM tables and is the same things as running myisamchk -r table_name on the table.

Repair the corrupted table. The command returns a table with the following columns:

Table Table name
Op Always 'repair'
Msg_type One of status, error, info or warning.
Msg_text The message.

Note that you can get many rows of information for each repaired table. The last one row will be of Msg_type status and should normally be OK. If you don't get OK, you should try repairing the table with myisamchk -o, as REPAIR TABLE does not yet implement all the options of myisamchk. In the near future, we will make it more flexible.

If TYPE=QUICK is given then MySQL will try to do a REPAIR of only the index tree.