Repairing tables
When a table is damaged, sometimes replacing it with a backup is not necessary. It is certainly a solution, but it implies some data loss unless the table is unchanged since the last backup. When possible, repairing the damaged table is a better solution.
The procedure we must follow to repair the table depends on the storage engine.
InnoDB has a recovery process that is launched on server startup. While this process is automatic, it must be configured by the DBA.
MyISAM and Aria also have an automatic recovery process on startup. But they also support recovery via the REPAIR TABLE SQL
statement or when the server is stopped, via specific tools distributed with MariaDB.
Other storage engines also support REPAIR TABLE
.
Note
Some repairing ...
Get Mastering MariaDB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.