Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
zz-jason committed Aug 6, 2018
1 parent 0ee08ad commit 59a2dea
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions executor/join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,19 @@ func (s *testSuite) TestIndexLookupJoin(c *C) {
`1.01`,
`2.02`,
))

tk.MustExec(`drop table if exists t;`)
tk.MustExec(`create table t(a bigint, b bigint, unique key idx1(a, b));`)
tk.MustExec(`insert into t values(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6);`)
tk.MustExec(`set @@tidb_max_chunk_size = 2;`)
tk.MustQuery(`select /*+ TIDB_INLJ(t1) */ * from t t1 left join t t2 on t1.a = t2.a and t1.b = t2.b + 4;`).Check(testkit.Rows(
`1 1 <nil> <nil>`,
`1 2 <nil> <nil>`,
`1 3 <nil> <nil>`,
`1 4 <nil> <nil>`,
`1 5 1 1`,
`1 6 1 2`,
))
}

func (s *testSuite) TestMergejoinOrder(c *C) {
Expand Down

0 comments on commit 59a2dea

Please sign in to comment.