Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Defined2014 opened this issue Jun 11, 2024 · 1 comment · Fixed by #53974
Closed

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

Defined2014 opened this issue Jun 11, 2024 · 1 comment · Fixed by #53974
Assignees
Labels
component/tablepartition This issue is related to Table Partition of TiDB. feature/developing the related feature is in development severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@Defined2014
Copy link
Contributor

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)

@Defined2014 Defined2014 added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra severity/major component/tablepartition This issue is related to Table Partition of TiDB. feature/developing the related feature is in development labels Jun 11, 2024
@Defined2014 Defined2014 self-assigned this Jun 11, 2024
@Defined2014
Copy link
Contributor Author

Only affects IndexReader, it returns tblID instead of partitionID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. feature/developing the related feature is in development severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant