diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-07 17:08:49 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-07 17:08:49 +0200 |
commit | 58e62d701e9d1c0a5ebb88f8a8779011c59ee735 (patch) | |
tree | 33aac572b65ffe713b1cf09bae10903eb1e4f5ab /storage/example | |
parent | 09ece94fac5fc160e11e6bd46208e6c0be86e7e6 (diff) | |
download | mariadb-git-58e62d701e9d1c0a5ebb88f8a8779011c59ee735.tar.gz |
* move bas_ext from the handler to the handlerton
* provide a default bas_ext value of the empty list
Diffstat (limited to 'storage/example')
-rw-r--r-- | storage/example/ha_example.cc | 49 | ||||
-rw-r--r-- | storage/example/ha_example.h | 5 |
2 files changed, 22 insertions, 32 deletions
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 81f6cbe707f..dac1ff81c10 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -229,6 +229,27 @@ static void init_example_psi_keys() #endif +/** + @brief + If frm_error() is called then we will use this to determine + the file extensions that exist for the storage engine. This is also + used by the default rename_table and delete_table method in + handler.cc and by the default discover_many method. + + For engines that have two file name extentions (separate meta/index file + and data file), the order of elements is relevant. First element of engine + file name extentions array should be meta/index file extention. Second + element - data file extention. This order is assumed by + prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued. + + @see + rename_table method in handler.cc and + delete_table method in handler.cc +*/ + +static const char *ha_example_exts[] = { + NullS +}; static int example_init_func(void *p) { DBUG_ENTER("example_init_func"); @@ -247,6 +268,7 @@ static int example_init_func(void *p) example_hton->flags= HTON_CAN_RECREATE; example_hton->table_options= example_table_option_list; example_hton->field_options= example_field_option_list; + example_hton->tablefile_extensions= ha_example_exts; DBUG_RETURN(0); } @@ -355,33 +377,6 @@ ha_example::ha_example(handlerton *hton, TABLE_SHARE *table_arg) /** @brief - If frm_error() is called then we will use this to determine - the file extensions that exist for the storage engine. This is also - used by the default rename_table and delete_table method in - handler.cc. - - For engines that have two file name extentions (separate meta/index file - and data file), the order of elements is relevant. First element of engine - file name extentions array should be meta/index file extention. Second - element - data file extention. This order is assumed by - prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued. - - @see - rename_table method in handler.cc and - delete_table method in handler.cc -*/ - -static const char *ha_example_exts[] = { - NullS -}; - -const char **ha_example::bas_ext() const -{ - return ha_example_exts; -} - -/** - @brief Used for opening tables. The name will be the name of the file. @details diff --git a/storage/example/ha_example.h b/storage/example/ha_example.h index 9be370edfe3..d3d31893781 100644 --- a/storage/example/ha_example.h +++ b/storage/example/ha_example.h @@ -73,11 +73,6 @@ public: const char *index_type(uint inx) { return "HASH"; } /** @brief - The file extensions. - */ - const char **bas_ext() const; - - /** @brief This is a list of flags that indicate what functionality the storage engine implements. The current table flags are documented in handler.h */ |