From e3fd359fe519b08bc2888badbd45317feb97b4d7 Mon Sep 17 00:00:00 2001 From: winkyao Date: Mon, 12 Nov 2018 12:12:47 +0800 Subject: [PATCH] replace go module --- ddl/column_test.go | 2 +- ddl/db_change_test.go | 2 +- ddl/db_test.go | 2 +- go.mod | 2 ++ go.sum | 4 ++++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ddl/column_test.go b/ddl/column_test.go index b5a1e3edb2a64..9ed50707e565d 100644 --- a/ddl/column_test.go +++ b/ddl/column_test.go @@ -915,7 +915,7 @@ func (s *testColumnSuite) TestModifyColumn(c *C) { {"int", "int unsigned", errUnsupportedModifyColumn.GenWithStackByArgs("length 10 is less than origin 11")}, {"varchar(10)", "text", nil}, {"varbinary(10)", "blob", nil}, - {"text", "blob", errUnsupportedModifyCharset.GenWithStackByArgs("charset from utf8 to binary")}, + {"text", "blob", errUnsupportedModifyCharset.GenWithStackByArgs("charset from utf8mb4 to binary")}, {"varchar(10)", "varchar(8)", errUnsupportedModifyColumn.GenWithStackByArgs("length 8 is less than origin 10")}, {"varchar(10)", "varchar(11)", nil}, {"varchar(10) character set utf8 collate utf8_bin", "varchar(10) character set utf8", nil}, diff --git a/ddl/db_change_test.go b/ddl/db_change_test.go index 58d49cfd388fb..4ccbbae213791 100644 --- a/ddl/db_change_test.go +++ b/ddl/db_change_test.go @@ -376,7 +376,7 @@ func (s *testStateChangeSuite) TestAppendEnum(c *C) { c.Assert(err.Error(), Equals, "[ddl:203]unsupported modify column the number of enum column's elements is less than the original: 2") failAlterTableSQL2 := "alter table t change c2 c2 int default 0" _, err = s.se.Execute(context.Background(), failAlterTableSQL2) - c.Assert(err.Error(), Equals, "[ddl:208]unsupported modify charset from utf8 to binary") + c.Assert(err.Error(), Equals, "[ddl:208]unsupported modify charset from utf8mb4 to binary") alterTableSQL := "alter table t change c2 c2 enum('N','Y','A') DEFAULT 'A'" _, err = s.se.Execute(context.Background(), alterTableSQL) c.Assert(err, IsNil) diff --git a/ddl/db_test.go b/ddl/db_test.go index 5d441589d5e12..5beb912755a49 100644 --- a/ddl/db_test.go +++ b/ddl/db_test.go @@ -26,6 +26,7 @@ import ( . "github.com/pingcap/check" "github.com/pingcap/errors" "github.com/pingcap/parser/ast" + "github.com/pingcap/parser/charset" "github.com/pingcap/parser/model" "github.com/pingcap/parser/mysql" tmysql "github.com/pingcap/parser/mysql" @@ -45,7 +46,6 @@ import ( "github.com/pingcap/tidb/tablecodec" "github.com/pingcap/tidb/types" "github.com/pingcap/tidb/util/admin" - "github.com/pingcap/tidb/util/charset" "github.com/pingcap/tidb/util/mock" "github.com/pingcap/tidb/util/testkit" "github.com/pingcap/tidb/util/testleak" diff --git a/go.mod b/go.mod index 3906a25895fc2..8e3692a753ab5 100644 --- a/go.mod +++ b/go.mod @@ -48,3 +48,5 @@ require ( google.golang.org/grpc v1.16.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0 ) + +replace github.com/pingcap/parser => github.com/winkyao/parser v0.0.0-20181112035727-04e30ab49120 diff --git a/go.sum b/go.sum index 02271d68a0a68..be1fe030cd33c 100644 --- a/go.sum +++ b/go.sum @@ -295,6 +295,10 @@ github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d/go.mod h1:tu82oB5W github.com/urfave/negroni v0.3.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/winkyao/parser v0.0.0-20181105094001-d4464cdde59f h1:go055dFjiXKeRhPJpSw/NZKYqkI3ak2j+mPO7gA/YK0= +github.com/winkyao/parser v0.0.0-20181105094001-d4464cdde59f/go.mod h1:R7TohkGdsluhClCn0ZTwhHDjjjqoiBr6DFFAPTaFvUI= +github.com/winkyao/parser v0.0.0-20181112035727-04e30ab49120 h1:7aaQMMs2d67LVC9KkzyapCy5VMm2HS/k3PHD/nB0G2Q= +github.com/winkyao/parser v0.0.0-20181112035727-04e30ab49120/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= github.com/zimulala/parser v0.0.0-20181108115726-650caa67be64 h1:QYGszvB1bmVsjvH6Id0AAnYXK9KUzSlbD8sbfaSf+Rw=