Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
wshwsh12 committed Dec 6, 2021
1 parent 1b1d936 commit ce01dee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions expression/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10669,3 +10669,15 @@ func (s *testIntegrationSuite) TestIssue30101(c *C) {
tk.MustExec("insert into t1 values(9223372036854775808, 9223372036854775809);")
tk.MustQuery("select greatest(c1, c2) from t1;").Sort().Check(testkit.Rows("9223372036854775809"))
}

func (s *testIntegrationSuite) TestIssue30326(c *C) {
tk := testkit.NewTestKit(c, s.store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t;")
tk.MustExec("create table t(a int);")
tk.MustExec("insert into t values(1),(1),(2),(2);")
tk.MustExec("set tidb_window_concurrency = 1;")
err := tk.QueryToErr("select (FIRST_VALUE(1) over (partition by v.a)) as c3 from (select a from t where t.a = (select a from t t2 where t.a = t2.a)) as v;")
c.Assert(err, NotNil)
c.Assert(err.Error(), Equals, "[executor:1242]Subquery returns more than 1 row")
}

0 comments on commit ce01dee

Please sign in to comment.