Bug: Fix sort_merge_join hint crash when used at query block level
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by tracing is_compound_hint(), get_complex_hints(), and Opt_hints_table::get_compound_key_hint() for SORT_MERGE_JOIN_HINT_ENUM, then inspect its opt_hint_info registration. Re-run the supplied query-block-level SORT_MERGE_JOIN example; done means get_complex_hints() no longer crashes and the hint is classified with the intended query-block and compound-hint behavior.
Written by the indexing model from the issue text.
Description
Description:
SORT_MERGE_JOIN hint was incorrectly registered as a non-QB-level,
non-switch hint (false, false in opt_hint_info), and was also
incorrectly treated as a compound hint in is_compound_hint() and
get_complex_hints(). When SORT_MERGE_JOIN was used at query block
level (e.g., /+sort_merge_join()/), calling get_complex_hints()
would crash because the hint type was routed to the compound hint
path (via Opt_hints_table::get_compound_key_hint()), which
returned an invalid pointer for SORT_MERGE_JOIN_HINT_ENUM.
How to repeat:
create table t1 (c int, b int);
create table t2 (a int, b int);
create table t3 (b int, c int);
insert into t1 values (10,1);
insert into t1 values (3 ,1);
insert into t1 values (3 ,2);
insert into t2 values (2, 1);
insert into t2 values (3, 1);
insert into t3 values (1, 3);
insert into t3 values (1,10);
ANALYZE TABLE t1, t2, t3;
select /*+sort_merge_join()*/ *
from t1
inner join t2 on t1.b=t2.b
inner join t3 on t3.c = t1.c and t3.b = t2.b;
- Dominant language
- C++
- Stars
- 712
- Forks
- 428
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenTenBase/TXSQL
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenTenBase/TXSQL#95 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenTenBase/TXSQL#57 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
OpenTenBase/TXSQL#119 ·
-
InnoDB Linux 原生 AIO 完成路径在持有数组互斥锁的状态下做页解密/解压,导致所有 I/O 线程串行化Possibly taken @puli2300 claimed this 82 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 32/100
OpenTenBase/TXSQL#113 ·
-
[optimization] Add AVX-512 VPCLMULQDQ accelerated CRC32-C for TXSQL 8.0.30Possibly taken @lgkw22 claimed this 44 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
OpenTenBase/TXSQL#112 ·
All issues in OpenTenBase/TXSQL
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
telefonicaid/fiware-orion#4836 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 2 days
-
nixd exits at startup when its parent process belongs to another userPossibly taken @conao3 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nix-community/nixd#930 ·
Maintainers usually reply within 2 days
-
refactor topic-ui topic-weather
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Command-Install Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
microsoft/winget-cli#6718 ·
Maintainers usually reply within 2 days