Syntax\n------\n\nREPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE\n    tbl_name [, tbl_name] ...\n    [QUICK] [EXTENDED] [USE_FRM] FORCE\n\nDescription\n-----------\n\nREPAIR TABLE repairs a possibly corrupted table. By default, it has the same effect as\n\n``sql\nmyisamchk --recover tbl_name\n`\n\nor\n\n`sql\naria_chk --recover tbl_name\n`\n\nSee [aria_chk and myisamchk for more.\n\nREPAIR TABLE works for Archive, Aria, CSV, and MyISAM tables. For InnoDB, see recovery modes. For CSV, see also Checking and Repairing CSV Tables. For Archive, this statement also improves compression. If the storage engine does not support this statement, a warning is issued.\n\nThis statement requires SELECT and INSERT privileges for the table.\n\nBy default, REPAIR TABLE statements are written to the binary log and will be replicated. The NO_WRITE_TO_BINLOG keyword (LOCAL is an alias) will ensure the statement is not written to the binary log.\n\nREPAIR TABLE statements are not logged to the binary log if read_only is set. See also Read-Only Slaves.\n\nREPAIR TABLE statements are logged to the binary log.\n\nWhen an index is recreated, the storage engine may use a configurable buffer in the process. Incrementing the buffer speeds up the index creation. Aria and MyISAM allocate a buffer whose size is defined by aria_sort_buffer_size or myisam_sort_buffer_size, also used for ALTER TABLE.\n\nQUICK\n\nWhen specified, REPAIR TABLE will not modify the data file, only attempting to repair the index file. The same behavior can be achieved with myisamchk --recover --quick.\n\nEXTENDED\n\nCreates the index row by row rather than sorting and creating a single index. Similar to myisamchk --safe-recover.\n\nUSE_FRM\n\nFor use only when the index file is missing or its header corrupted. MariaDB then attempts to recreate it using the .frm file. There is no equivalent myisamchk option.\n\nFORCE\n\nThe FORCE argument allows to first run internal repair to fix damaged blocks and then follow it up with ALTER TABLE (MDEV-33449).\n\nThe FORCE option is not available.\n\nPartitioned Tables\n\nREPAIR TABLE is also supported for partitioned tables with the ALTER TABLE ... REPAIR PARTITION statement. However, the USE_FRM` option cannot be used with this statement on a partitioned table. See Repairing Partitions for details.\n\nProgress Reporting\n\nThe Aria storage engine supports progress reporting for this statement.\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/table-statements/repair-table