Bug #9459 | deadlock with flush with lock, and lock table write | ||
---|---|---|---|
Submitted: | 29 Mar 2005 16:55 | Modified: | 8 Aug 2005 16:06 |
Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.10a | OS: | Any (*) |
Assigned to: | Ingo Strüwing | CPU Architecture: | Any |
[29 Mar 2005 16:55]
Martin Friebe
[3 Aug 2005 9:16]
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/internals/27841
[3 Aug 2005 9:30]
Ingo Strüwing
The patch fixes the deadlock. The rest of the bug report describes expected behaviour. Please understand that FLUSH TABLES WITH READ LOCK acquires a global read lock, which is a different mechanism than LOCK TABLE. A LOCK TABLE releases previous locks from LOCK TABLE, but does not influence the global read lock. UNLOCK TABLE, however, does releases previous locks from LOCK TABLE *and* the global read lock (if it is held by the current session). While the global read lock is in effect, read locks are allowed on tables (implicit and by LOCK TABLE), but write locks are not.
[5 Aug 2005 13:37]
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/internals/27919
[7 Aug 2005 20:36]
Ingo Strüwing
Pushed to 4.1.14 and 5.0.12.
[8 Aug 2005 16:06]
Mike Hillyer
Documented in 4.1.14 and 5.0.12 changelogs: <listitem><para><literal>FLUSH TABLES WITH READ LOCK</literal> combined with <literal>LOCK TABLE .. WRITE</literal> caused deadlock. (Bug #9459)</para></listitem>