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 /mysql-test/r/events_trans.result | |
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 'mysql-test/r/events_trans.result')
-rw-r--r-- | mysql-test/r/events_trans.result | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result index 16ec64b4c50..37951c30787 100644 --- a/mysql-test/r/events_trans.result +++ b/mysql-test/r/events_trans.result @@ -116,3 +116,22 @@ OK: create event: database does not exist delete from t1; commit work; drop database events_test; +# +# Bug#54105 assert in MDL_context::release_locks_stored_before +# +USE test; +DROP TABLE IF EXISTS t1, t2; +DROP EVENT IF EXISTS e1; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +CREATE TABLE t2 (a INT); +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +SAVEPOINT A; +SHOW CREATE EVENT e1; +Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation +e1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `e1` ON SCHEDULE EVERY 1 DAY STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci +SELECT * FROM t2; +a +ROLLBACK WORK TO SAVEPOINT A; +DROP TABLE t1, t2; |