Bug #54282 | Crash in MDL_context::upgrade_shared_lock_to_exclusive | ||
---|---|---|---|
Submitted: | 7 Jun 2010 10:08 | Modified: | 12 Jul 2010 17:13 |
Reporter: | Jon Olav Hauglid | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S3 (Non-critical) |
Version: | mysql-trunk-runtime | OS: | Any |
Assigned to: | Jon Olav Hauglid | CPU Architecture: | Any |
[7 Jun 2010 10:08]
Jon Olav Hauglid
[7 Jun 2010 13:15]
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/110351 3041 Jon Olav Hauglid 2010-06-07 Bug #54282 Crash in MDL_context::upgrade_shared_lock_to_exclusive This crash happened if a table was listed twice in a DROP TABLE statement, and the statement was executed while in LOCK TABLES mode. Since the two tables were identical, they were assigned the same MDL lock ticket. When the ticket of the first table was set to NULL, the server crashed when trying to read the ticket of the second table. Listing the same table twice should give an an ER_NONUNIQ_TABLE error. However, this did not happen as the check for unique table names was skipped due to the tables being set up to be locked using TL_IGNORE. Previously the tables were locked using TL_UNLOCK which caused the unique check to be performed. This bug was a regression introduced by a pre-requisite patch for Bug#51263 "Deadlock between transactional SELECT and ALTER TABLE ... REBUILD PARTITION". The regression only existed in an internal team tree and never in any released code. This patch reverts DROP TABLE (and DROP VIEW) to the old behavior of taking TL_UNLOCK locks. Test case added to drop.test.
[7 Jun 2010 15:27]
Dmitry Lenev
It is OK to push this patch after making adjustments to ChangeSet comment (which were discussed on IRC).
[7 Jun 2010 15:27]
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/110371 3045 Jon Olav Hauglid 2010-06-07 Bug #54282 Crash in MDL_context::upgrade_shared_lock_to_exclusive This crash happened if a table was listed twice in a DROP TABLE statement, and the statement was executed while in LOCK TABLES mode. Since the two elements of table list were identical, they were assigned the same TABLE object. During processing of the first table element, the TABLE instance was destroyed and the second table list element was left with a dangling reference. When this reference was later accessed, the server crashed. Listing the same table twice in DROP TABLES should give an ER_NONUNIQ_TABLE error. However, this did not happen as the check for unique table names was skipped due to the lock type for table list elements being set to TL_IGNORE. Previously TL_UNLOCK was used and the unique check was performed. This bug was a regression introduced by a pre-requisite patch for Bug#51263 "Deadlock between transactional SELECT and ALTER TABLE ... REBUILD PARTITION". The regression only existed in an internal team tree and never in any released code. This patch reverts DROP TABLE (and DROP VIEW) to the old behavior of using TL_UNLOCK locks. Test case added to drop.test.
[7 Jun 2010 15:28]
Jon Olav Hauglid
Pushed to mysql-trunk-runtime (Ver 5.5.5-m3).
[22 Jun 2010 13:08]
Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100622130139-u05awgya93zvbsop) (version source revid:marko.makela@oracle.com-20100603095032-v5ptkkzt1bhz0m1d) (merge vers: 5.1.48) (pib:16)
[22 Jun 2010 13:10]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100622130623-r7yhm89fz9n5t9nb) (version source revid:alik@sun.com-20100622130528-187gd949sa9b6pa6) (pib:16)
[12 Jul 2010 17:13]
Paul DuBois
Noted in 5.5.5 changelog. A crash occurred if a table that was locked with LOCK TABLES was listed twice in a DROP TABLE statement.