TiDB locks the record which is filtered by the non-index condition in point-get plan at RC isolation
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
RC isolation
### 1. Minimal reproduce step (Required)
create table t1(id1 int, id2 int, id3 int, PRIMARY KEY(id1), UNIQUE KEY udx_id2 (id2));
INSERT INTO t1 VALUES(1,1,1);
-- session1
begin;
select * from t1 where id1 = 1 and id2 = 2 for update;
-- session2
begin
select * from t1 where id1 = 1 for update;
### 2. What did you expect to see? (Required)
session2 returns the result immediately.
### 3. What did you see instead (Required)
session2 was blocked by the lock of the key whose values is ```
### 4. What is your TiDB version? (Required)
Release Version: v6.2.0
Edition: Community
Git Commit Hash: daf2b17cdfe30c02ce282361009fb5bdb05f2b0e
Contributor guide
Assessment
This issue has not been assessed yet.