1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

introduce hton->drop_table() method

first step in moving drop table out of the handler.
todo: other methods that don't need an open table

for now hton->drop_table is optional, for backward compatibility
reasons
This commit is contained in:
Sergei Golubchik
2020-06-13 21:23:19 +02:00
parent f17f7a43ba
commit c55c292832
9 changed files with 70 additions and 95 deletions

View File

@ -1484,6 +1484,7 @@ struct handlerton
void (*close_cursor_read_view)(handlerton *hton, THD *thd, void *read_view);
handler *(*create)(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root);
void (*drop_database)(handlerton *hton, char* path);
int (*drop_table)(handlerton *hton, const char* path);
int (*panic)(handlerton *hton, enum ha_panic_function flag);
int (*start_consistent_snapshot)(handlerton *hton, THD *thd);
bool (*flush_logs)(handlerton *hton);
@ -3453,7 +3454,6 @@ public:
int ha_enable_indexes(uint mode);
int ha_discard_or_import_tablespace(my_bool discard);
int ha_rename_table(const char *from, const char *to);
int ha_delete_table(const char *name);
void ha_drop_table(const char *name);
int ha_create(const char *name, TABLE *form, HA_CREATE_INFO *info);
@ -4673,13 +4673,14 @@ protected:
provide useful functionality.
*/
virtual int rename_table(const char *from, const char *to);
public:
/**
Delete a table in the engine. Called for base as well as temporary
tables.
*/
virtual int delete_table(const char *name);
public:
bool check_table_binlog_row_based();
bool prepare_for_row_logging();
int prepare_for_insert(bool do_create);