diff --git a/.travis.yml b/.travis.yml index c473d1d6443dc..d81c12ae3b407 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,3 +17,4 @@ before_install: script: - make dev - ./hack/check-tidy.sh + - ./hack/check_parser_replace.sh diff --git a/circle.yml b/circle.yml index 3af846f7e2ac1..3912f3ae2fd3c 100644 --- a/circle.yml +++ b/circle.yml @@ -13,3 +13,6 @@ jobs: - run: name: "Go mod tidy" command: ./hack/check-tidy.sh + - run: + name: "Check go mod replace is removed" + command: ./hack/check_parser_replace.sh diff --git a/go.mod b/go.mod index a97df5cc881c3..c1ed756e0b4b8 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/pingcap/errors v0.11.0 github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e github.com/pingcap/kvproto v0.0.0-20181105061835-1b5d69cd1d26 - github.com/pingcap/parser v0.0.0-20181206123229-b006f4e22d98 + github.com/pingcap/parser v0.0.0-20181210061630-27e9d3e251d4 github.com/pingcap/pd v2.1.0-rc.4+incompatible github.com/pingcap/tidb-tools v0.0.0-20181112132202-4860a0d5de03 github.com/pingcap/tipb v0.0.0-20181012112600-11e33c750323 @@ -85,5 +85,3 @@ require ( sourcegraph.com/sourcegraph/appdash v0.0.0-20180531100431-4c381bd170b4 sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 ) - -replace github.com/pingcap/parser => github.com/winkyao/parser v0.0.0-20181207053352-37ef416fe2a0 diff --git a/go.sum b/go.sum index c191c40545c16..6a8c51c3ac0a9 100644 --- a/go.sum +++ b/go.sum @@ -107,8 +107,8 @@ github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e h1:P73/4dPCL96rG github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw= github.com/pingcap/kvproto v0.0.0-20181105061835-1b5d69cd1d26 h1:JK4VLNYbSn36QSbCnqALi2ySXdH0DfcMssT/zmLf4Ls= github.com/pingcap/kvproto v0.0.0-20181105061835-1b5d69cd1d26/go.mod h1:0gwbe1F2iBIjuQ9AH0DbQhL+Dpr5GofU8fgYyXk+ykk= -github.com/pingcap/parser v0.0.0-20181206123229-b006f4e22d98 h1:KsFKFW+PqU2y8xChYPrxMHQfkcbAe2SzsrVhMNAMRCg= -github.com/pingcap/parser v0.0.0-20181206123229-b006f4e22d98/go.mod h1:1FNvfp9+J0wvc4kl8eGNh7Rqrxveg15jJoWo/a0uHwA= +github.com/pingcap/parser v0.0.0-20181210061630-27e9d3e251d4 h1:2rCHDk4h8VZw0fiC2CFJffOlXU3iMuz1kOt5wTMCemY= +github.com/pingcap/parser v0.0.0-20181210061630-27e9d3e251d4/go.mod h1:1FNvfp9+J0wvc4kl8eGNh7Rqrxveg15jJoWo/a0uHwA= github.com/pingcap/pd v2.1.0-rc.4+incompatible h1:/buwGk04aHO5odk/+O8ZOXGs4qkUjYTJ2UpCJXna8NE= github.com/pingcap/pd v2.1.0-rc.4+incompatible/go.mod h1:nD3+EoYes4+aNNODO99ES59V83MZSI+dFbhyr667a0E= github.com/pingcap/tidb-tools v0.0.0-20181112132202-4860a0d5de03 h1:xVuo5U+l6XAWHsb+xhkZ8zz3jerIwDfCHAO6kR2Kaog= @@ -162,7 +162,6 @@ github.com/ugorji/go/codec v0.0.0-20181127175209-856da096dbdf h1:BLcwkDfQ8QPXNXB github.com/ugorji/go/codec v0.0.0-20181127175209-856da096dbdf/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d h1:ggUgChAeyge4NZ4QUw6lhHsVymzwSDJOZcE0s2X8S20= github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d/go.mod h1:tu82oB5W2ykJRVioYsB+IQKcft7ryBr7w12qMBUPyXg= -github.com/winkyao/parser v0.0.0-20181207053352-37ef416fe2a0/go.mod h1:R7TohkGdsluhClCn0ZTwhHDjjjqoiBr6DFFAPTaFvUI= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 h1:MPPkRncZLN9Kh4MEFmbnK4h3BD7AUmskWv2+EeZJCCs= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= diff --git a/hack/check_parser_replace.sh b/hack/check_parser_replace.sh new file mode 100755 index 0000000000000..959a2748b55a4 --- /dev/null +++ b/hack/check_parser_replace.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -uo pipefail + +grep "replace.*github.com/pingcap/parser" go.mod +grep_ret=$? + +if [ $grep_ret -eq 0 ];then + exit 1 +else + exit 0 +fi diff --git a/planner/core/logical_plan_test.go b/planner/core/logical_plan_test.go index 486b1a93034c4..0b483943a0d7c 100644 --- a/planner/core/logical_plan_test.go +++ b/planner/core/logical_plan_test.go @@ -991,13 +991,6 @@ func (s *testPlanSuite) TestColumnPruning(c *C) { 3: {"a"}, }, }, - //issue 7833 - { - sql: "drop view if exists v", - ans: map[int][]string{ - 1: {}, - }, - }, } for _, tt := range tests { comment := Commentf("for %s", tt.sql)