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

executor: global index scan returns wrong result when specify partition #41991

Closed
L-maple opened this issue Mar 7, 2023 · 0 comments · Fixed by #41992
Closed

executor: global index scan returns wrong result when specify partition #41991

L-maple opened this issue Mar 7, 2023 · 0 comments · Fixed by #41992
Labels
affects-7.0 affects-7.1 component/tablepartition This issue is related to Table Partition of TiDB. feature/developing the related feature is in development severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@L-maple
Copy link
Contributor

L-maple commented Mar 7, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

premise:
set enable-global-index = true in config/config.toml.example

SQL:

use test
drop table if exists p;
create table p (id int, c int) partition by range (c) (
    partition p0 values less than (4),
    partition p1 values less than (7),
    partition p2 values less than (10));
alter table p add unique idx(id);
insert into p values (1,3), (3,4), (5,6), (7,9);
select id from p partition(p0) use index (idx);

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

1

3. What did you see instead (Required)

1
3
5
7
image

4. What is your TiDB version? (Required)

----+
| Release Version: v6.7.0-alpha-139-g6c1674cb1-dirty
Edition: Community
Git Commit Hash: 6c1674c
Git Branch: local/fix_truncate_drop_partition_for_global_index
UTC Build Time: 2023-03-02 03:19:49
GoVersion: go1.19.4
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

@L-maple L-maple added the type/bug The issue is confirmed as a bug. label Mar 7, 2023
@Defined2014 Defined2014 added 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 Mar 7, 2023
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 labels Mar 7, 2023
@Defined2014 Defined2014 removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.1 may-affects-6.5 labels Mar 7, 2023
@xhebox xhebox added sig/execution SIG execution and removed sig/sql-infra SIG: SQL Infra labels Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.0 affects-7.1 component/tablepartition This issue is related to Table Partition of TiDB. feature/developing the related feature is in development severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
5 participants