diff options
author | lars-erik.bjork@sun.com <> | 2009-12-09 14:41:56 +0100 |
---|---|---|
committer | lars-erik.bjork@sun.com <> | 2009-12-09 14:41:56 +0100 |
commit | 1642f67b4019c1191ecd8fa5e53302171ef6aba4 (patch) | |
tree | 2b72d9b7cd78b582ca256ff503ffc91e69354f8e /sql/sql_handler.cc | |
parent | fb545cf9d8f2cc38afe35640534f51e6281dee38 (diff) | |
download | mariadb-git-1642f67b4019c1191ecd8fa5e53302171ef6aba4.tar.gz |
Backport of revno: 2617.68.36
---------------------------------------------
This is a patch for bug#47098 assert in MDL_context::destroy on
HANDLER <damaged merge table> OPEN.
The assert occurs in MDL_context::destroy when the connection is terminated,
because all mdl_tickets have not been released.
MERGE tables do not support being opened using the HANDLER ... OPEN command,
and trying to do so will result in an error. In the event of an error, all
tables that are opened, should be closed again. The fix for bug#45781 made
sure that this also works for MERGE tables, which causes multiple tables to
be opened.
This fix extends the fix for bug#45781, by ensuring that also all locks are
released, when MERGE tables are involved.
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r-- | sql/sql_handler.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 94f6b248e45..cf178342b51 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -321,6 +321,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen) can close a single table only. */ close_thread_tables(thd); + thd->mdl_context.release_all_locks(); my_error(ER_ILLEGAL_HA, MYF(0), hash_tables->alias); error= TRUE; } |