-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
IndexHashJoin may produce redundant rows for anti semi left outer join #52902
Labels
affects-5.4
This bug affects 5.4.x versions.
affects-6.1
affects-6.5
affects-7.1
affects-7.5
affects-8.1
severity/critical
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Comments
Merged
13 tasks
/severity critical |
ti-chi-bot
bot
added
severity/critical
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
may-affects-8.1
labels
Apr 26, 2024
/label affects-8.1 |
/label affects-7.5 |
/label affects-7.1 |
/label affects-6.5 |
/label affects-6.1 |
/label affects-5.4 |
ti-chi-bot
bot
added
affects-5.4
This bug affects 5.4.x versions.
and removed
may-affects-5.4
This bug maybe affects 5.4.x versions.
labels
Apr 26, 2024
This was referenced Apr 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-5.4
This bug affects 5.4.x versions.
affects-6.1
affects-6.5
affects-7.1
affects-7.5
affects-8.1
severity/critical
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Because it is difficult to generate IndexHashJoin executor, we need to hack the tidb planner code to enforce it generate IndexHashJoin executor using the attached hack.txt:
hack.txt
Then using the hacked tidb, we can run sqls:
use test;
create table t1 (x int, y int);
create table t0 (a int, b int, key (
b
));insert into t1 values(103, 600);
insert into t1 values(100, 200);
insert into t0 values( 105, 400);
insert into t0 values( 104, 300);
insert into t0 values( 103, 300);
insert into t0 values( 102, 200);
insert into t0 values( 101, 200);
insert into t0 values( 100, 200);
select * from t1 where 1 = 1 and case when t1.x < 1000 then 1 = 1 when t1.x < 2000 then not exists (select 1 from t0 where t0.b = t1.y) else 1 = 1 end;
2. What did you expect to see? (Required)
+------+------+
| 100 | 200 |
| 103 | 600 |
+------+------+
3. What did you see instead (Required)
+------+------+
| 100 | 200 |
| 100 | 200 |
| 100 | 200 |
| 103 | 600 |
+------+------+
4. What is your TiDB version? (Required)
| Release Version: v8.1.0-alpha-143-g111abf32b4-dirty
Edition: Community
Git Commit Hash: 111abf3
Git Branch: mpp_join_issue_52828
UTC Build Time: 2024-04-26 03:20:49
GoVersion: go1.21.0
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
The text was updated successfully, but these errors were encountered: