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


22.18.5 delete_table

Purpose

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

Synopsis

virtual int delete_table (

name);

const char *

name ;

Description

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 handler.cc, 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 handler.cc by delete_table and ha_create_table(). Only used during create if the table_flagHA_DROP_BEFORE_CREATE was specified for the storage engine.

Parameters

  • 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

Usage

Most storage engines can omit implementing this method.


User Comments
Sign Up Login You must be logged in to post a comment.