diff options
author | unknown <knielsen@knielsen-hq.org> | 2010-05-31 10:43:34 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2010-05-31 10:43:34 +0200 |
commit | 0fc39acb8125fae95062e7b680b022b075a308c3 (patch) | |
tree | cf991484ab999e60eb9b33d81733fca16b368cf9 /sql/handler.cc | |
parent | e6eab96555d8cf70cbe6c8a94956855a0b5eca43 (diff) | |
parent | 80ba8556e772fd7e4eb369c64bb32ca44f93e221 (diff) | |
download | mariadb-git-0fc39acb8125fae95062e7b680b022b075a308c3.tar.gz |
Automerge MariaDB 5.1.47 release into main.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index b817673ed23..b7903468b69 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -159,7 +159,7 @@ redo: } -plugin_ref ha_lock_engine(THD *thd, handlerton *hton) +plugin_ref ha_lock_engine(THD *thd, const handlerton *hton) { if (hton) { @@ -601,9 +601,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; } |