[MDEV-30835] Inconsistent blocking of UPDATE and DELETE with the same WHERE clause Created: 2023-03-12 Updated: 2023-03-13 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.7.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | John Jove | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | transactions | ||
| Environment: |
OS: Ubuntu-20.04 LTS |
||
| Issue Links: |
|
||||||||
| Description |
|
Isolation Level: Read Uncommitted & Read Committed. Test Case 1:
Test Case 2:
We expect UPDATE statement in test case 1 to be blocked. |
| Comments |
| Comment by Marko Mäkelä [ 2023-03-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
thiru, can you please post your mtr test of this and your findings? As far as I understand, the reason why the locks are being relaxed for UPDATE is the "semi-consistent read" that I originally implemented in MySQL Bug #3300. Implementing it for DELETE was not considered at that time. I would expect that once MDEV-16232 allows UPDATE and DELETE to rely on implicit locks, the lock conflicts would be reduced, or possibly avoided altogether. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Thirunarayanan Balathandayuthapani [ 2023-03-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Update test case:
Delete test case:
For update statement, prebuilt->row_read_type is ROW_READ_TRY_SEMI_CONSISTENT. {{ table->file->try_semi_consistent_read(1);}} is being called only for update statment. |