OpenTenBase / OpenTenBase/TXSQL
Bug: Fix sort_merge_join hint crash when used at query block level
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 337
- Fork
- 234
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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;
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando is_compound_hint(), get_complex_hints() e Opt_hints_table::get_compound_key_hint() per SORT_MERGE_JOIN_HINT_ENUM, quindi esamina la relativa registrazione in opt_hint_info. Esegui nuovamente la query di esempio SORT_MERGE_JOIN fornita a livello di blocco di query; il lavoro è completato quando get_complex_hints() non va più in crash e l’hint viene classificato con il comportamento previsto per il blocco di query e il compound-hint.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, sql
- Ambito
- databases
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100