OpenTenBase / OpenTenBase/TXSQL
Bug: Fix sort_merge_join hint crash when used at query block level
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 337
- フォーク
- 234
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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;
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず SORT_MERGE_JOIN_HINT_ENUM に対する is_compound_hint()、get_complex_hints()、Opt_hints_table::get_compound_key_hint() を追跡し、次にその opt_hint_info の登録を確認します。提供されているクエリブロックレベルの SORT_MERGE_JOIN の例のクエリを再実行します。get_complex_hints() がクラッシュしなくなり、意図したクエリブロックおよび compound-hint の動作で hint が分類されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp, sql
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100