MySQL :: MySQL 8.4 Reference Manual :: 18.2.1 MyISAM Startup Options (original) (raw)

18.2.1 MyISAM Startup Options

The following options to mysqld can be used to change the behavior of MyISAM tables. For additional information, see Section 7.1.7, “Server Command Options”.

The following system variables affect the behavior ofMyISAM tables. For additional information, seeSection 7.1.8, “Server System Variables”.

Automatic recovery is activated if you startmysqld with themyisam_recover_options system variable set. In this case, when the server opens aMyISAM table, it checks whether the table is marked as crashed or whether the open count variable for the table is not 0 and you are running the server with external locking disabled. If either of these conditions is true, the following happens:

If the recovery wouldn't be able to recover all rows from previously completed statements and you didn't specifyFORCE in the value of themyisam_recover_options system variable, automatic repair aborts with an error message in the error log:

Error: Couldn't repair table: test.g00pages

If you specify FORCE, a warning like this is written instead:

Warning: Found 344 of 354 rows when repairing ./test/g00pages

If the automatic recovery value includesBACKUP, the recovery process creates files with names of the form_`tblname-datetime`_.BAK. You should have a cron script that automatically moves these files from the database directories to backup media.