diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-08-13 10:02:37 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-08-13 10:02:37 +0200 |
commit | 99b1d5ea24860396ef564e5a20620ee6f91f07fd (patch) | |
tree | 5be2ac6dbb0ca842064f6f0e013f7d34e794c1e9 /sql/events.cc | |
parent | 82759db0cc67bfb1454c5f7cf1c5aaa8f8559404 (diff) | |
download | mariadb-git-99b1d5ea24860396ef564e5a20620ee6f91f07fd.tar.gz |
Bug #54105 assert in MDL_context::release_locks_stored_before
The problem was that SHOW CREATE EVENT released all metadata locks
held by the current transaction. This made any exisiting savepoints
invalid, triggering the assert when ROLLBACK TO SAVEPOINT later
was executed.
This patch fixes the problem by making sure SHOW CREATE EVENT only
releases metadata locks acquired by the statement itself.
Test case added to event_trans.test.
Diffstat (limited to 'sql/events.cc')
-rw-r--r-- | sql/events.cc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sql/events.cc b/sql/events.cc index 5379ec2c9eb..3dc6a46bb66 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -699,7 +699,6 @@ send_show_create_event(THD *thd, Event_timed *et, Protocol *protocol) bool Events::show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name) { - Open_tables_backup open_tables_backup; Event_timed et; bool ret; @@ -722,9 +721,7 @@ Events::show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name) deadlock can occur please refer to the description of 'system table' flag. */ - thd->reset_n_backup_open_tables_state(&open_tables_backup); ret= db_repository->load_named_event(thd, dbname, name, &et); - thd->restore_backup_open_tables_state(&open_tables_backup); if (!ret) ret= send_show_create_event(thd, &et, thd->protocol); |