[MDEV-24932] SELECT under IF statement locks records with READ COMMITTED isolation level for InnoDB Created: 2021-02-20 Updated: 2021-02-23 Resolved: 2021-02-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.3.27, 10.5.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Andrey | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 18.04 x64 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
I have a problem with blocking records when using SELECT and READ COMMITTED isolation level for InnoDB. The Document https://dev.mysql.com/doc/refman/8.0/en/innodb-consistent-read.htm says that READ COMMITTED isolation level provide non-blocking read, but MariaDB 10.5.8 violates this rule.
I made a simple test to check the deadlock. There are two attached files:
Run scripts from locks_test_script.sql under two sessions. Run the script for session 1 first and after that run script for session 2:
There are two locks after call READ_PROCEDURE:
And the script for session 2 hangs up:
call "SHOW ENGINE INNODB STATUS;" after UPDATE `test_table` ...
|
| Comments |
| Comment by Alice Sherepa [ 2021-02-22 ] |
|
MDEV-18044 is about the same problem |