Skip to content

select for update can't work with global index #53929

@Defined2014

Description

@Defined2014

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a int, b int, unique index(b), primary key(a)) partition by hash(a) partitions 5;
insert into t values (1,1),(2,2),(3,3),(4,4),(5,5);
begin;
select * from t use index(b) where b = 2 order by b limit 1 for update;

-- create another session
update t set b = 7 where b = 2;

2. What did you expect to see? (Required)

update blocked

3. What did you see instead (Required)

update success

4. What is your TiDB version? (Required)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions