Bug #43685 | Lock table affects other non-related tables | ||
---|---|---|---|
Submitted: | 17 Mar 2009 2:41 | Modified: | 7 Mar 2010 12:49 |
Reporter: | Adam Dixon | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S3 (Non-critical) |
Version: | 5.0.78,5.1.32 | OS: | Any |
Assigned to: | Jon Olav Hauglid | CPU Architecture: | Any |
[17 Mar 2009 2:41]
Adam Dixon
[17 Mar 2009 2:54]
Adam Dixon
The same can be repeated by simply this; Window 1: lock tables t1 write; Window 1: analyze table t1; Window 2: lock table t2 write; Window 2: flush table t2; (hang until Window 1 unlock tables).
[19 Apr 2009 12:27]
Konstantin Osipov
A member of the bug verification team: please verify the bug.
[27 May 2009 11:56]
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/75044 2912 Konstantin Osipov 2009-05-27 A tentative fix for Bug#43685 "Lock table affects other non-related tables" FLUSH TABLE <table_list> in 5.1 would wait for all tables with old versions to go away from the table definition cache, rather than only waiting for tables in the <table_list>. The fix is to back-port a more elaborate FLUSH TABLES implementation from 6.0. modified: sql/sql_base.cc
[3 Jun 2009 20:33]
Konstantin Osipov
The patch can lead to deadlocks if we have LOCK TABLE t1 READ; FLUSH TABLES in a concurrent connection. Something gotta give, in 6.0 we prohibited FLUSH TABLES with LOCK TABLES.. READ, this is how this solution, that I backported from 6.0, became possible. But then again in 6.0 Bug#42465. The patch, however, should be good enough as a solution for an individual customer.
[22 Aug 2009 9:09]
Konstantin Osipov
See also Bug#33278.
[14 Jan 2010 10:30]
Konstantin Osipov
Hello, This should be gone in next-4284. Please try to repeat, if not repeatable, add a test case, and close this bug (set to patch queued).
[15 Jan 2010 11:47]
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/97048 3052 Jon Olav Hauglid 2010-01-15 Bug #43685 Lock table affects other non-related tables The problem was that FLUSH TABLE <table_list> would block, waiting for all tables with old versions to be removed from the table definition cache, rather than waiting for only the tables in <table_list>. This could happen if FLUSH TABLE was used in combination with LOCK TABLES. With the new MDL code, this problem is no longer repeatable. Regression test case added to lock.test. This commit contains no code changes.
[15 Jan 2010 11:50]
Jon Olav Hauglid
Test case pushed to mysql-next-4284 and merged to mysql-6.0-codebase-4284.
[16 Feb 2010 16:49]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100216101445-2ofzkh48aq2e0e8o) (version source revid:jon.hauglid@sun.com-20100115114912-d7w1m5oeb6mktu86) (merge vers: 6.0.14-alpha) (pib:16)
[16 Feb 2010 16:59]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100216101208-33qkfwdr0tep3pf2) (version source revid:jon.hauglid@sun.com-20100115114722-q1df7xd2o3fvg0v3) (pib:16)
[3 Mar 2010 2:04]
Paul DuBois
Noted in 6.0.14 changelog. When used in conjunction with LOCK TABLES, FLUSH TABLE tbl_list waited for all tables with old versions to clear from the table definition list, rather than only the named tables. Setting report to Need Merge pending push of Celosia to release tree.
[6 Mar 2010 10:59]
Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20100216221947-luyhph0txl2c5tc8) (merge vers: 5.5.99-m3) (pib:16)
[7 Mar 2010 12:49]
Paul DuBois
Noted in 5.5.3 changelog.