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:
None 
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
Description:
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.

connection1;
create table x(i int);
create table y(i int);
lock table x write, y write
connection2;
insert x select * from y;
connection1;
drop table y;
<deadlock>
[3 Mar 2003 7:58] Sinisa Milivojevic
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 
    http://www.mysql.com/doc/en/Installing_source_tree.html

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.