Bug #46747 | Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table | ||
---|---|---|---|
Submitted: | 16 Aug 2009 16:34 | Modified: | 7 Mar 2010 1:54 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S2 (Serious) |
Version: | 5.4 | OS: | Any |
Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[16 Aug 2009 16:34]
Philip Stoev
[19 Aug 2009 12:28]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/81068 2867 Dmitry Lenev 2009-08-19 Fix for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". Server crashed when one tried to drop trigger which had its subject table shadowed by a temporary table with the same name. This problem occured because in such situation DROP TRIGGER has opened temporary table instead of base table on which trigger was defined. Attempt to upgrade metadata lock on this temporary table led to crash (we don't acquire metadata locks for temporary tables). This fix ensures that DROP TRIGGER ignores temporary tables when trying to open table on which trigger to be dropped is defined. @ mysql-test/r/trigger.result Added test case for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". @ mysql-test/t/trigger.test Added test case for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". @ sql/sql_trigger.cc Prevent DROP TRIGGER from opening temporary table which might shadow base table on which trigger to be dropped is defined.
[19 Aug 2009 14:13]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/81080 2868 Dmitry Lenev 2009-08-19 Fix for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". Server crashed when one tried to drop trigger which had its subject table shadowed by a temporary table with the same name. This problem occured because in such situation DROP TRIGGER has opened temporary table instead of base table on which trigger was defined. Attempt to upgrade metadata lock on this temporary table led to crash (we don't acquire metadata locks for temporary tables). This fix ensures that DROP TRIGGER ignores temporary tables when trying to open table on which trigger to be dropped is defined. @ mysql-test/r/trigger.result Added test case for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". @ mysql-test/t/trigger.test Added test case for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". @ sql/sql_trigger.cc Prevent DROP TRIGGER from opening temporary table which might shadow base table on which trigger to be dropped is defined.
[19 Aug 2009 14:16]
Dmitry Lenev
Fix for this bug was pushed into mysql-next-bugfixing team (?) tree.
[24 Aug 2009 13:54]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090824135126-2rngffvth14a8bpj) (version source revid:dlenev@mysql.com-20090819141227-63cx8rw3qv6lbnmc) (merge vers: 5.4.4-alpha) (pib:11)
[28 Aug 2009 2:06]
Paul DuBois
Noted in 5.4.4 changelog. The server crashed for attempts to drop a trigger for which the subject table was shadowed by a temporary table with the same name.
[9 Dec 2009 9:38]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/93285 3011 Konstantin Osipov 2009-12-09 Backport of: ------------------------------------------------------------ revno: 2617.69.32 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-next-bg46747 timestamp: Wed 2009-08-19 18:12:27 +0400 message: Fix for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". Server crashed when one tried to drop trigger which had its subject table shadowed by a temporary table with the same name. This problem occured because in such situation DROP TRIGGER has opened temporary table instead of base table on which trigger was defined. Attempt to upgrade metadata lock on this temporary table led to crash (we don't acquire metadata locks for temporary tables). This fix ensures that DROP TRIGGER ignores temporary tables when trying to open table on which trigger to be dropped is defined. @ mysql-test/r/trigger.result Added test case for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". @ mysql-test/t/trigger.test Added test case for bug #46747 "Crash in MDL_ticket::upgrade_shared_lock_to_exclusive on TRIGGER + TEMP table". @ sql/sql_trigger.cc Prevent DROP TRIGGER from opening temporary table which might shadow base table on which trigger to be dropped is defined.
[16 Feb 2010 16:49]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100216101445-2ofzkh48aq2e0e8o) (version source revid:kostja@sun.com-20091211154405-c9yhiewr9o5d20rq) (merge vers: 6.0.14-alpha) (pib:16)
[16 Feb 2010 16:58]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100216101208-33qkfwdr0tep3pf2) (version source revid:kostja@sun.com-20091209093754-jpm3ypi2tjfyc1cu) (pib:16)
[16 Feb 2010 18:47]
Dmitry Lenev
Closing this bug as it is not repeatable in any publicly available tree with version < 6.0.
[6 Mar 2010 10:54]
Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20100216221947-luyhph0txl2c5tc8) (merge vers: 5.5.99-m3) (pib:16)
[7 Mar 2010 1:54]
Paul DuBois
No changelog entry needed.