Skip to content

Commit

Permalink
executor: update test since DELETE FROM ... AS ... syntax is now supp…
Browse files Browse the repository at this point in the history
…orted (#11184)
  • Loading branch information
kennytm authored and bb7133 committed Jul 19, 2019
1 parent ddb6132 commit 4b928a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions executor/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1764,8 +1764,9 @@ func (s *testSuite4) TestQualifiedDelete(c *C) {
r := tk.MustQuery("select * from t1")
c.Assert(r.Rows(), HasLen, 0)

_, err := tk.Exec("delete from t1 as a where a.c1 = 1")
c.Assert(err, NotNil)
tk.MustExec("insert into t1 values (1, 3)")
tk.MustExec("delete from t1 as a where a.c1 = 1")
tk.CheckExecResult(1, 0)

tk.MustExec("insert into t1 values (1, 1), (2, 2)")
tk.MustExec("insert into t2 values (2, 1), (3,1)")
Expand All @@ -1776,7 +1777,7 @@ func (s *testSuite4) TestQualifiedDelete(c *C) {
tk.MustExec("delete a, b from t1 as a join t2 as b where a.c2 = b.c1")
tk.CheckExecResult(2, 0)

_, err = tk.Exec("delete t1, t2 from t1 as a join t2 as b where a.c2 = b.c1")
_, err := tk.Exec("delete t1, t2 from t1 as a join t2 as b where a.c2 = b.c1")
c.Assert(err, NotNil)
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require (
github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e
github.com/pingcap/kvproto v0.0.0-20190703131923-d9830856b531
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596
github.com/pingcap/parser v0.0.0-20190710072914-6cd203114f2d
github.com/pingcap/parser v0.0.0-20190719041739-ff945b25f903
github.com/pingcap/pd v0.0.0-20190712044914-75a1f9f3062b
github.com/pingcap/tidb-tools v2.1.3-0.20190321065848-1e8b48f5c168+incompatible
github.com/pingcap/tipb v0.0.0-20190428032612-535e1abaa330
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ github.com/pingcap/kvproto v0.0.0-20190703131923-d9830856b531/go.mod h1:QMdbTAXC
github.com/pingcap/log v0.0.0-20190214045112-b37da76f67a7/go.mod h1:xsfkWVaFVV5B8e1K9seWfyJWFrIhbtUTAD8NV1Pq3+w=
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596 h1:t2OQTpPJnrPDGlvA+3FwJptMTt6MEPdzK1Wt99oaefQ=
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596/go.mod h1:WpHUKhNZ18v116SvGrmjkA9CBhYmuUTKL+p8JC9ANEw=
github.com/pingcap/parser v0.0.0-20190710072914-6cd203114f2d h1:vOZjn1ami1LIjtIj0i5QunGh/sHawbhiBCb1qPx373w=
github.com/pingcap/parser v0.0.0-20190710072914-6cd203114f2d/go.mod h1:1FNvfp9+J0wvc4kl8eGNh7Rqrxveg15jJoWo/a0uHwA=
github.com/pingcap/parser v0.0.0-20190719041739-ff945b25f903 h1:mRZH1M//ZhlpJ9ByB6TyEFErVO5vsfeWyA8a0SklkF0=
github.com/pingcap/parser v0.0.0-20190719041739-ff945b25f903/go.mod h1:1FNvfp9+J0wvc4kl8eGNh7Rqrxveg15jJoWo/a0uHwA=
github.com/pingcap/pd v0.0.0-20190712044914-75a1f9f3062b h1:oS9PftxQqgcRouKhhdaB52tXhVLEP7Ng3Qqsd6Z18iY=
github.com/pingcap/pd v0.0.0-20190712044914-75a1f9f3062b/go.mod h1:3DlDlFT7EF64A1bmb/tulZb6wbPSagm5G4p1AlhaEDs=
github.com/pingcap/tidb-tools v2.1.3-0.20190321065848-1e8b48f5c168+incompatible h1:MkWCxgZpJBgY2f4HtwWMMFzSBb3+JPzeJgF3VrXE/bU=
Expand Down

0 comments on commit 4b928a5

Please sign in to comment.