MySQL Internals Manual  /  ...  /  MyISAM Files

21.2.1 MyISAM Files

Some notes about MyISAM file handling:

  • If a table is never updated, MySQL will never touch the table files, so it would never be marked as closed or corrupted.

  • If a table is marked readonly by the OS, it will only be opened in readonly mode. Any updates to it will fail.

  • When a normal table is opened for reading by a SELECT, MySQL will open it in read/write mode, but will not write anything to it.

  • A table can be closed during one of the following events:

    • Out of space in table cache

    • Someone executed flush tables

    • MySQL was shut down

    • flush_time expired (which causes an automatic flush-tables to be executed)

  • When MySQL opens a table, it checks if the table is clean. If it isn't and the server was started with the --myisam-recover option, check the table and try to recover it if it's crashed. (The safest automatic recover option is probably --myisam-recover=BACKUP.)


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.