From 4b928a52c0bcbdea3b3e3e1779ac4c7ef6f7e1a0 Mon Sep 17 00:00:00 2001 From: kennytm Date: Fri, 19 Jul 2019 17:58:58 +0800 Subject: [PATCH] executor: update test since DELETE FROM ... AS ... syntax is now supported (#11184) --- executor/write_test.go | 7 ++++--- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/executor/write_test.go b/executor/write_test.go index 69874534a57bd..3a60e95c97bd0 100644 --- a/executor/write_test.go +++ b/executor/write_test.go @@ -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)") @@ -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) } diff --git a/go.mod b/go.mod index 0fd738a958d1f..5950f1dc2f5c0 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 726d1d63d51be..10bd3f3646065 100644 --- a/go.sum +++ b/go.sum @@ -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=