diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-05-28 09:47:58 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-05-28 09:47:58 +0400 |
commit | 4e633ec2342754594fad8937a2d12615e5e5cb96 (patch) | |
tree | 88543c956886365a2376e01ce26a0436c38a4454 /sql/handler.cc | |
parent | 87dfc8ef1ddf9cfebf535fbfce70152ce3ee6c23 (diff) | |
parent | f54464035a4bfae7c7297e7fe1a8ba7e76ea6585 (diff) | |
download | mariadb-git-4e633ec2342754594fad8937a2d12615e5e5cb96.tar.gz |
Auto-merge from mysql-trunk.
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 8b56921a3a1..844c7305825 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) { @@ -642,9 +642,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; } |