diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.cc | 17 | ||||
-rw-r--r-- | sql/handler.h | 1 | ||||
-rw-r--r-- | sql/mysqld.cc | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 4beef164ee1..01f73347397 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -510,6 +510,23 @@ int ha_init() DBUG_RETURN(error); } +int ha_end() +{ + int error= 0; + DBUG_ENTER("ha_end"); + + + /* + This should be eventualy based on the graceful shutdown flag. + So if flag is equal to HA_PANIC_CLOSE, the deallocate + the errors. + */ + if (ha_finish_errors()) + error= 1; + + DBUG_RETURN(error); +} + static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin, void *path) { diff --git a/sql/handler.h b/sql/handler.h index 5e26d9c7b63..56c34b8b75e 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1654,6 +1654,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type) /* basic stuff */ int ha_init(void); +int ha_end(void); int ha_initialize_handlerton(st_plugin_int *plugin); int ha_finalize_handlerton(st_plugin_int *plugin); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b5e4115c376..877a2d5e220 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1193,6 +1193,7 @@ void clean_up(bool print_message) #endif } plugin_shutdown(); + ha_end(); if (tc_log) tc_log->close(); xid_cache_free(); |