Bug #56655 | Background DROP TABLE in 5.1 with innodb_file_per_table=1 | ||
---|---|---|---|
Submitted: | 8 Sep 2010 14:15 | Modified: | 27 Oct 2010 20:54 |
Reporter: | James Day | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: InnoDB Plugin storage engine | Severity: | S3 (Non-critical) |
Version: | 5.1 | OS: | Any |
Assigned to: | Inaam Rana | CPU Architecture: | Any |
[8 Sep 2010 14:15]
James Day
[8 Sep 2010 14:21]
Davi Arnaut
So this is not exactly related to LOCK_open, but a more general request to make InnoDB do the actual heavy lifting (unlink and such) of drop table in the background. This should "speed up" drop table even in 5.5 (where LOCK_open is not held).
[8 Sep 2010 14:35]
James Day
Davi, right. It looks like a reasonable and useful request and seems to be causing significant production disruption for some people. LOCK_open is in there because that's what blocks the other operations in 5.1, so moving the heavy lifting out of the time when the lock is held should help. Please feel free to change the bug title to something you think more suitable if you like. The focus here is on 5.1 because that's where it's hurting but if it's of benefit for 5.5 as well that'd be a very good thing. The workarounds are practical for smaller installations but not at really large places with a very diverse set of applications.
[8 Sep 2010 18:17]
Davi Arnaut
Implementation wise, the idea is to do the absolutely minimum amount of work under a exclusive lock (LOCK_open in 5.1): unlink the frm file and queue a background drop table within InnoDB. Given a file per table, it should be relatively easy to rename the files (to avoid conflicts) and unlink them asynchronously.
[4 Oct 2010 22:49]
Sunny Bains
See also Bug #57232
[7 Oct 2010 15:50]
Konstantin Osipov
I can't assess risk/effort of this in 5.1.
[8 Oct 2010 20:51]
Mark Callaghan
Note that TRUNCATE has a similar problem -- http://bugs.mysql.com/bug.php?id=56696 A patch to fix this in 5.1: http://bazaar.launchpad.net/~mysqlatfacebook/mysqlatfacebook/5.1/revision/3584 http://bazaar.launchpad.net/~mysqlatfacebook/mysqlatfacebook/5.1/revision/3585
[27 Oct 2010 20:57]
Omer Barnir
Issue addressed in 5.5 and will not be fixed in 5.1