Bug #114 Bug in LOCK TABLE followed by DROP TABLE
Submitted: 2 Mar 2003 9:30 Modified: 3 Mar 2003 11:05
Reporter: Peter Zaitsev (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:3.23 and 4.0 OS:
Assigned to: Michael Widenius CPU Architecture:Any

[2 Mar 2003 9:30] Peter Zaitsev
The folowing sequence of commands leads to deadlock,
one is connections can be killed in order to break deadlock which makes it less serious: 

How to repeat:
Notice order of tables is important to reproduce deadlock.

create table x(i int);
create table y(i int);
lock table x write, y write
insert x select * from y;
drop table y;
[3 Mar 2003 7:58] MySQL Verification Team
A bug is fixed in 3.23.56, and a fix will be merged in 4.0.12

A patch is too large for this database.
[3 Mar 2003 11:05] Michael Widenius
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at 

This bug was not fixed by the LOCK TABLE patch we added to 3.23.
To fix this problem we had to introduce new ways to abort locks that we don't want to introduce in the stable 3.23 branch.
In other words, this bug is fixed in the 4.0 tree but will not be fixed in 3.23. I will update the manual to reflect this.