Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
winoros committed Aug 23, 2022
1 parent b1a0dce commit 37b6894
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions planner/core/rule_join_reorder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func TestLeadingJoinHint(t *testing.T) {
tk.MustExec("create table t6(a int, b int, key(a));")
tk.MustExec("create table t7(a int, b int, key(a));")
tk.MustExec("create table t8(a int, b int, key(a));")
tk.MustExec("set @@tidb_enable_outer_join_reorder=true")
runJoinReorderTestData(t, tk, "TestLeadingJoinHint")

// test cases for outer join
Expand Down Expand Up @@ -117,6 +118,8 @@ func TestJoinOrderHint(t *testing.T) {
tk.MustExec("create table t7(a int, b int, key(a));")
tk.MustExec("create table t8(a int, b int, key(a));")

tk.MustExec("set @@tidb_enable_outer_join_reorder=true")

// test cases for using the leading hint and straight_join hint at the same time
tk.MustExec("select /*+ leading(t1) straight_join() */ * from t1 join t2 on t1.a=t2.a join t3 on t2.b=t3.b")
tk.MustQuery("show warnings").Check(testkit.Rows("Warning 1815 We can only use the straight_join hint, when we use the leading hint and straight_join hint at the same time, all leading hints will be invalid"))
Expand Down

0 comments on commit 37b6894

Please sign in to comment.