diff --git a/ddl/db_integration_test.go b/ddl/db_integration_test.go index 59a721166aa1e..18193ab7a770e 100644 --- a/ddl/db_integration_test.go +++ b/ddl/db_integration_test.go @@ -762,7 +762,7 @@ func (s *testIntegrationSuite4) TestChangingTableCharset(c *C) { tk.MustExec("USE test") tk.MustExec("create table t(a char(10)) charset latin1 collate latin1_bin") - tk.MustGetErrCode("alter table t charset gbk", errno.ErrUnknownCharacterSet) + tk.MustGetErrCode("alter table t charset unknown_cs", errno.ErrUnknownCharacterSet) tk.MustGetErrCode("alter table t charset ''", errno.ErrUnknownCharacterSet) tk.MustGetErrCode("alter table t charset utf8mb4 collate '' collate utf8mb4_bin;", errno.ErrUnknownCollation) diff --git a/executor/executor_test.go b/executor/executor_test.go index 099c539a94e11..007e701669cff 100644 --- a/executor/executor_test.go +++ b/executor/executor_test.go @@ -252,8 +252,9 @@ func (s *testSuiteP1) TestShow(c *C) { "utf8 UTF-8 Unicode utf8_bin 3", "utf8mb4 UTF-8 Unicode utf8mb4_bin 4", "ascii US ASCII ascii_bin 1", - "latin1 Latin1 latin1_bin 1", - "binary binary binary 1")) + "latin1 cp1252 West European latin1_bin 1", + "binary Binary pseudo charset binary 1", + "gbk GBK Simplified Chinese gbk_chinese_ci 1")) c.Assert(len(tk.MustQuery("show master status").Rows()), Equals, 1) tk.MustQuery("show create database test_show").Check(testkit.Rows("test_show CREATE DATABASE `test_show` /*!40100 DEFAULT CHARACTER SET utf8mb4 */")) tk.MustQuery("show privileges").Check(testkit.Rows("Alter Tables To alter the table", diff --git a/executor/infoschema_reader_test.go b/executor/infoschema_reader_test.go index 51eb2e165a31f..4f21d8f464d5b 100644 --- a/executor/infoschema_reader_test.go +++ b/executor/infoschema_reader_test.go @@ -221,12 +221,12 @@ func (s *testInfoschemaTableSuite) TestCharacterSetCollations(c *C) { // The description column is not important tk.MustQuery("SELECT default_collate_name, maxlen FROM information_schema.character_sets ORDER BY character_set_name").Check( - testkit.Rows("ascii_bin 1", "binary 1", "latin1_bin 1", "utf8_bin 3", "utf8mb4_bin 4")) + testkit.Rows("ascii_bin 1", "binary 1", "gbk_chinese_ci 1", "latin1_bin 1", "utf8_bin 3", "utf8mb4_bin 4")) // The is_default column is not important // but the id's are used by client libraries and must be stable tk.MustQuery("SELECT character_set_name, id, sortlen FROM information_schema.collations ORDER BY collation_name").Check( - testkit.Rows("ascii 65 1", "binary 63 1", "latin1 47 1", "utf8 83 1", "utf8mb4 46 1")) + testkit.Rows("ascii 65 1", "binary 63 1", "gbk 28 1", "latin1 47 1", "utf8 83 1", "utf8mb4 46 1")) tk.MustQuery("select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY where COLLATION_NAME='utf8mb4_bin';").Check( testkit.Rows("utf8mb4_bin utf8mb4")) diff --git a/go.mod b/go.mod index 59aa265a1c3c2..aa67868998f20 100644 --- a/go.mod +++ b/go.mod @@ -77,3 +77,5 @@ require ( ) go 1.13 + +replace github.com/pingcap/parser => github.com/spongedu/parser v0.0.0-20200413061525-2b6c2eb15c23 diff --git a/go.sum b/go.sum index 2f4d1ff23d2f8..4c25352e76fd2 100644 --- a/go.sum +++ b/go.sum @@ -269,8 +269,6 @@ github.com/pingcap/kvproto v0.0.0-20200409034505-a5af800ca2ef/go.mod h1:IOdRDPLy github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20200117041106-d28c14d3b1cd h1:CV3VsP3Z02MVtdpTMfEgRJ4T9NGgGTxdHpJerent7rM= github.com/pingcap/log v0.0.0-20200117041106-d28c14d3b1cd/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= -github.com/pingcap/parser v0.0.0-20200413043052-ef80f4de418c h1:8guNDWaL4d4Nsl+ptn2Z6ND/twrPtVYqy4+HxwSFPt8= -github.com/pingcap/parser v0.0.0-20200413043052-ef80f4de418c/go.mod h1:9v0Edh8IbgjGYW2ArJr19E+bvL8zKahsFp+ixWeId+4= github.com/pingcap/pd/v4 v4.0.0-beta.1.0.20200305072537-61d9f9cc35d3 h1:Yrp99FnjHAEuDrSBql2l0IqCtJX7KwJbTsD5hIArkvk= github.com/pingcap/pd/v4 v4.0.0-beta.1.0.20200305072537-61d9f9cc35d3/go.mod h1:25GfNw6+Jcr9kca5rtmTb4gKCJ4jOpow2zV2S9Dgafs= github.com/pingcap/sysutil v0.0.0-20200206130906-2bfa6dc40bcd/go.mod h1:EB/852NMQ+aRKioCpToQ94Wl7fktV+FNnxf3CX/TTXI= @@ -330,6 +328,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spongedu/parser v0.0.0-20200413061525-2b6c2eb15c23 h1:pRJhudJDUx4oCOm3VcZ5+6T05xOvNdayJrT23T/EX+Y= +github.com/spongedu/parser v0.0.0-20200413061525-2b6c2eb15c23/go.mod h1:9v0Edh8IbgjGYW2ArJr19E+bvL8zKahsFp+ixWeId+4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=