Documentation Home
MySQL Internals Manual
Download this Manual
EPUB - 0.8Mb

22.18.5 delete_table


Delete all files with extension from [custom-engine.html#custom-engine-api-reference-bas_ext bas_ext()].


virtual int delete_table (


const char *

name ;


This is the delete_table method.

Used to delete a table. By the time delete_table() has been called all opened references to this table will have been closed (and your globally shared references released). The variable name will be the name of the table. You will need to remove any files you have created at this point.

If you do not implement this, the default delete_table() is called from, and it will delete all files with the file extensions returned by bas_ext(). We assume that the handler may return more extensions than were actually used for the file.

Called from by delete_table and ha_create_table(). Only used during create if the table_flagHA_DROP_BEFORE_CREATE was specified for the storage engine.


  • name : Base name of table

Return Values

  • 0 if we successfully deleted at least one file from base_ext and didn't get any other errors than ENOENT

  • # : Error


Most storage engines can omit implementing this method.

Download this Manual
EPUB - 0.8Mb
User Comments
Sign Up Login You must be logged in to post a comment.