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, planner: IndexJoin error with limit #15691

Closed
fzhedu opened this issue Mar 25, 2020 · 3 comments · Fixed by #15742
Closed

executor, planner: IndexJoin error with limit #15691

fzhedu opened this issue Mar 25, 2020 · 3 comments · Fixed by #15742
Assignees
Labels
severity/moderate sig/execution SIG execution sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@fzhedu
Copy link
Contributor

fzhedu commented Mar 25, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. What did you do?

download the file with all DDLs
randgen_index_merge_join.txt

source randgen_index_merge_join.txt
SELECT   /*+INL_JOIN(table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12)*/ distinct  table2 . `col_int_key` AS field1 FROM   W AS table1  RIGHT  JOIN I AS table2 ON  table1 . `col_int_key` =  table2 . `col_int`   LEFT  JOIN N AS table3 ON  table2 . `col_varchar_1024_utf8` =  table3 . `col_varchar_1024_latin1`  WHERE table1 . `col_int` IS NOT NULL   ORDER BY field1  LIMIT 4 ;

2. What did you expect to see?

MySQL
+--------+
| field1 |
+--------+
| NULL |
| 0 |
| 1 |
| 2 |
+--------+

3. What did you see instead?

+--------+
| field1 |
+--------+
| NULL |
| NULL |
| 0 |
| 1 |
+--------+

4. What version of TiDB are you using? (tidb-server -V or run select tidb_version(); on TiDB)

5.7.25-TiDB-v4.0.0-beta-523-g7eba696bb

@fzhedu fzhedu added type/bug The issue is confirmed as a bug. sig/execution SIG execution sig/planner SIG: Planner labels Mar 25, 2020
@XuHuaiyu XuHuaiyu self-assigned this Mar 26, 2020
@XuHuaiyu
Copy link
Contributor

I can not reproduce this.

@fzhedu
Copy link
Contributor Author

fzhedu commented Mar 26, 2020

I can not reproduce this.

set tidb_max_chunk_size=2 like #15696

@XuHuaiyu
Copy link
Contributor

StreamAgg will cause this bug, HashAgg works fine.
The root cause of this issue may be the same as #15690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/execution SIG execution sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants