diff options
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index c0a5e2ff55c..11f684a8010 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -174,7 +174,7 @@ redo: } -plugin_ref ha_lock_engine(THD *thd, handlerton *hton) +plugin_ref ha_lock_engine(THD *thd, const handlerton *hton) { if (hton) { @@ -299,13 +299,14 @@ handler *get_ha_partition(partition_info *part_info) #endif -const char **handler_errmsgs; +static const char **handler_errmsgs; - -const char **get_handler_errmsgs() +C_MODE_START +static const char **get_handler_errmsgs() { return handler_errmsgs; } +C_MODE_END /** @@ -642,9 +643,13 @@ static my_bool closecon_handlerton(THD *thd, plugin_ref plugin, there's no need to rollback here as all transactions must be rolled back already */ - if (hton->state == SHOW_OPTION_YES && hton->close_connection && - thd_get_ha_data(thd, hton)) - hton->close_connection(hton, thd); + if (hton->state == SHOW_OPTION_YES && thd_get_ha_data(thd, hton)) + { + if (hton->close_connection) + hton->close_connection(hton, thd); + /* make sure ha_data is reset and ha_data_lock is released */ + thd_set_ha_data(thd, hton, NULL); + } return FALSE; } @@ -3548,7 +3553,7 @@ int handler::index_next_same(uchar *buf, const uchar *key, uint keylen) } -void handler::get_dynamic_partition_info(PARTITION_INFO *stat_info, +void handler::get_dynamic_partition_info(PARTITION_STATS *stat_info, uint part_id) { info(HA_STATUS_CONST | HA_STATUS_TIME | HA_STATUS_VARIABLE | |