defines a database table descriptor. A table can exist in an open or
closed state. In order to be used in the server, it has to be opened.
Whenever this happens, a table descriptor is created, and placed in the
table cache to be reused later when another request is made that
references the same table.
frequently referenced in the parser, optimizer, access control, and
query cache code. It glues things together in a number of ways. Studying
its members is a good way to become acquainted to a degree with the
low-level details of the server implementation.
This structure is defined in sql/table.h as
st_table, but then is aliased
TABLE with a
Note that in version 5.1
was refactored, and portions of it were moved to
TABLE_SHARE class, which is shared between the
instances of the same physical table.
TABLE_SHAREs are cached in the table
TABLE is a large structure. We
will cover only the most essential parts. Table 3-3 lists some of
Table 3-3. Members of the TABLE class
Pointer to the storage engine (handler) object for this table. The object is used for all low-level data storage and retrieval operations.
Array of field descriptors for each field in this
table. The number of fields in the
A hash for locating fields by name. Will be used if
the number of fields is at least