Bug #66416 | DDL hangs on "Waiting for table metadata lock" even after database restart. | ||
---|---|---|---|
Submitted: | 16 Aug 2012 8:57 | Modified: | 6 Sep 2012 18:55 |
Reporter: | Besh Mag | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S2 (Serious) |
Version: | 5.5.16 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | "Waiting for table metadata lock" DDL |
[16 Aug 2012 8:57]
Besh Mag
[18 Aug 2012 20:33]
Valeriy Kravchuk
Please, check if the same problem ever happens with a newer version, 5.5.27.
[30 Aug 2012 17:33]
Michael Morse
are any foreign keys constraints pointing towards these tables and/or have you made any changes to foreign keys related to the table? Not to say this is the cause, but we are investigating a similar issue and we are looking at this as a possibility as we were making changes to foreign key definitions when this was noticed..
[30 Aug 2012 20:19]
Besh Mag
It appeared that the problem is much simpler. We had this database as a slave, and the slave seems that it failed in the middle of a transaction, so it kept locking these objects, even when we restarted, these objects' metadata kept locked, after we stopped the slave, we can drop the tables.
[6 Sep 2012 18:55]
Sveta Smirnova
Thank you for the feedback. Closed as "Not a Bug", because this is usage issue (DDL waits a lock for 1 year by default), not MySQL bug.
[11 Mar 2013 19:30]
Chris Calender
FLUSH TABLES is a nice work-around to eliminate the metadata lock while you troubleshoot where it is originating from.