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


23.18.1 bas_ext

Purpose

Defines the file extensions used by the storage engine.

Synopsis

virtual const char ** bas_ext (

);

;

Description

This is the bas_ext method. It is called to provide the MySQL server with a list of file extensions used by the storage engine. The list returned is a null-terminated string array.

By providing a list of extensions, storage engines can in many cases omit the [custom-engine.html#custom-engine-api-reference-delete_table delete_table()] method as the MySQL server will close all references to the table and delete all files with the specified extension.

Parameters

There are no parameters for this method.

Return Values

  • Return value is a null-terminated string array of storage engine extensions. The following is an example from the CSV engine:

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

Usage

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

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

Default Implementation

static const char *ha_example_exts[] = {
   NullS
 };

const char **ha_example::bas_ext() const
 {
   return ha_example_exts;
 }

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