10bet网址
MySQL Internals Manual


23.7 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 theCSVengine:

static const char *ha_tina_exts[] = { ".CSV", NullS };

This array is returned when the [custom-engine.html#custom-engine-api-reference-bas_extbas_ext()] method is called:

const char **ha_tina::bas_ext() const { return ha_tina_exts; }

By providing extension information you can also omit implementingDROP TABLEfunctionality as the MySQL server will implement it for you by closing the table and deleting all files with the extensions you specify.