15.6. Defining Filename Extensions
Storage engines are required to provide the MySQL server with a
list of extensions used by the storage engine with regard to a
given table, its data and indexes.
Extensions are expected in the form of a null-terminated string
array. The following is the array used by the
CSV
engine:
static const char *ha_tina_exts[] = {
".CSV",
NullS
};
This array is returned when the
bas_ext()
function is called:
const char **ha_tina::bas_ext() const
{
return ha_tina_exts;
}
By providing extension information you can also omit implementing
DROP TABLE
functionality as the MySQL server
will implement it for you by closing the table and deleting all
files with the extensions you specify.