Bug #2494 | LOW_PRIORITY WRITE LOCK AFFECTING SUBSEQUENT WRITE LOCKS | ||
---|---|---|---|
Submitted: | 23 Jan 2004 11:31 | Modified: | 3 Feb 2004 2:22 |
Reporter: | Matthew Lord | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.17 | OS: | Windows (windows 2000) |
Assigned to: | Konstantin Osipov | CPU Architecture: | Any |
[23 Jan 2004 11:31]
Matthew Lord
[3 Feb 2004 2:22]
Konstantin Osipov
Though we can make the particular example given in the bug report work as expected, it's not easy to implement a solution for general case of writers starvation when low priority and ordinary write locks are combined. A sample scenario given by Monty is: connection 0: LOCK TABLES t1 READ; connection 1: LOCK TABLES t2 WRITE, t1 LOW_PRIORITY WRITE; connection 2: LOCK TABLES t2 WRITE; In this case no locks on t2 will be given until there are no readers of t1. Monty says: The lock code was not meant for mixing different priority locks. You should always use same kind of locks on the same table. We don't want to fix this simple case because it is the only one which can be fixed, and the rule above is simplier to document and understand. I'm filing a docs-request to have this issue covered in the documentation.