mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user