Documentation Home
MySQL Internals Manual

MySQL Internals Manual  /  ...  /  The myisam Directory

A.1.15 The myisam Directory

The MyISAM table handler.

The C files in this subdirectory come in six main groups:

  • ft*.c files --- ft stands for "Full Text", code contributed by Sergei Golubchik

  • mi*.c files --- mi stands for "My Isam", these are the main programs for Myisam

  • myisam*.c files --- for example, "myisamchk" utility routine functions source

  • rt*.c files --- rt stands for "rtree", some code was written by Alexander Barkov

  • sp*.c files --- sp stands for "spatial", some code was written by Ramil Kalimullin

  • sort.c --- this is a single file that sorts keys for index-create purposes

The "full text" and "rtree" and "spatial" program sets are for special purposes, so this document focuses only on the mi*.c "myisam" C programs. They are:

  • mi_cache.c --- for reading records from a cache

  • mi_changed.c --- a single routine for setting a "changed" flag (very short)

  • mi_check.c --- for checking and repairing tables. Used by the myisamchk program and by the MySQL server.

  • mi_checksum.c --- calculates a checksum for a row

  • mi_close.c --- close database

  • mi_create.c --- create a table

  • mi_dbug.c --- support routines for use with "dbug" (see \dbug description)

  • mi_delete.c --- delete a row

  • mi_delete_all.c --- delete all rows

  • mi_delete_table.c --- delete a table (very short)

  • mi_dynrec.c --- functions to handle space-packed records and blobs

  • mi_extra.c --- setting options and buffer sizes when optimizing

  • mi_info.c --- return useful base information for an open table

  • mi_key.c --- for handling keys

  • mi_keycache.c --- for handling key caches

  • mi_locking.c --- lock database

  • mi_log.c --- save commands in a log file which myisamlog program can read. Can be used to exactly replay a set of changes to a table.

  • mi_open.c --- open database

  • mi_packrec.c --- read from a data file compressed with myisampack

  • mi_page.c --- read and write pages containing keys

  • mi_panic.c --- the mi_panic routine, probably for sudden shutdowns

  • mi_preload.c --- preload indexes into key cache

  • mi_range.c --- approximate count of how many records lie between two keys

  • mi_rename.c --- rename a table

  • mi_rfirst.c --- read first row through a specific key (very short)

  • mi_rkey.c --- read a record using a key

  • mi_rlast.c --- read last row with same key as previously-read row

  • mi_rnext.c --- read next row with same key as previously-read row

  • mi_rnext_same.c --- same as mi_rnext.c, but abort if the key changes

  • mi_rprev.c --- read previous row with same key as previously-read row

  • mi_rrnd.c --- read a row based on position

  • mi_rsame.c --- find current row using positional read or key-based read

  • mi_rsamepos.c --- positional read

  • mi_scan.c --- read all rows sequentially

  • mi_search.c --- key-handling functions

  • mi_static.c --- static variables (very short)

  • mi_statrec.c --- functions to handle fixed-length records

  • mi_test1.c --- testing basic functions

  • mi_test2.c --- testing database and storing results

  • mi_test3.c --- testing locking

  • mi_unique.c --- functions to check if a row is unique

  • mi_update.c --- update an existing row

  • mi_write.c --- insert a new row

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.