Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed Aug 21, 2023
1 parent 5895273 commit 8aaa96b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions planner/core/casetest/hint/hint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,3 +647,16 @@ func TestInvalidHint(t *testing.T) {
tk.MustQuery(tt).Check(testkit.Rows(output[i].Plan...))
}
}

func TestIssue46160(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)

tk.MustExec("use test")
tk.MustExec(`create table t1 (a int, key(a))`)
tk.MustExec(`create table t2 (a int, key(a))`)

query := `select /*+ tidb_inlj(bb) */ aa.* from (select * from t1) as aa left join
(select t2.a, t2.a*2 as a2 from t2) as bb on aa.a=bb.a;`
tk.HasPlan(query, "IndexJoin")
}

0 comments on commit 8aaa96b

Please sign in to comment.