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 join returns wrong result #42065

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

executor: global index join returns wrong result #42065

L-maple opened this issue Mar 9, 2023 · 0 comments · Fixed by #41992
Labels
feature/developing the related feature is in development sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@L-maple
Copy link
Contributor

L-maple commented Mar 9, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

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

create table t1 (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 t1 add unique idx(id);
insert into t1 values (1,3), (3,4), (5,6), (7,9);
create table t2 (id int, c int);
insert into t2 values (1, 3);
select /*+ INL_JOIN(t1, t2) */ * from t1 partition(p0) inner join t2 on t1.id = t2.id;
select /*+ INL_JOIN(t1, t2) */ t1.id from t1 partition(p0) inner join t2 on t1.id = t2.id;

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

The first select result: 1 3 1 3
The second select result: 1

3. What did you see instead (Required)

The first select result: empty set
The second select result: empty set
image

4. What is your TiDB version? (Required)

                                                            |

+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v6.7.0-alpha-205-g29adb0aa8-dirty
Edition: Community
Git Commit Hash: 29adb0a
Git Branch: HEAD
UTC Build Time: 2023-03-09 09:40:00
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/developing the related feature is in development sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
3 participants