| Bug #47845 | Delete without overlaped keys prevent insertion | ||
|---|---|---|---|
| Submitted: | 6 Oct 8:59 | Modified: | 9 Oct 2:11 |
| Reporter: | Meiji KIMURA | ||
| Status: | Open | ||
| Category: | Server: InnoDB | Severity: | S3 (Non-critical) |
| Version: | 5.0.x, 5.1.x, 5.4.x | OS: | Any |
| Assigned to: | Marko Mäkelä | Target Version: | |
| Triage: | Needs Triage: D4 (Minor) | ||
[6 Oct 8:59]
Meiji KIMURA
[6 Oct 16:15]
Michael Izioumtchenko
this looks like a feature related to gap locks, still assigning for a closer look.
[6 Oct 16:25]
Heikki Tuuri
I do not know the exact setting in this bug report. Does EXPLAIN tell that MySQL is actually using the assumed access path to the table? It is quite normal for InnoDB record and gap locks to spill over the range defined in the WHERE clause. MySQL typically specifies the range to the engine like this: "fetch all records in an index where index_value >= 12345" It does NOT specify the last record in the range. When InnoDB fetches the first record that is NOT in the range, InnoDB has to lock that record and the gap before it. Also, only physical records in an index cvan carry lock information. If we have records 1 and 100, and the user wants to lock all records in the range [1, 50), then InnoDB locks the whole 'gap' between 1 and 100.
