From 2ed1ed2d4cfab2c893a369ab5c8f3412f61d264d Mon Sep 17 00:00:00 2001 From: xiongjiwei Date: Tue, 14 Dec 2021 10:49:10 +0800 Subject: [PATCH] add a test --- executor/executor_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/executor/executor_test.go b/executor/executor_test.go index c821901d5a18d..1bb3357a768d5 100644 --- a/executor/executor_test.go +++ b/executor/executor_test.go @@ -5794,6 +5794,23 @@ func (s *testSuiteWithCliBaseCharset) TestCharsetFeature(c *C) { " `a` char(10) DEFAULT NULL\n" + ") ENGINE=InnoDB DEFAULT CHARSET=gbk COLLATE=gbk_chinese_ci", )) + + collate.SetNewCollationEnabledForTest(false) + tk.MustQuery("show charset").Check(testkit.Rows( + "ascii US ASCII ascii_bin 1", + "binary binary binary 1", + "gbk Chinese Internal Code Specification gbk_chinese_ci 2", + "latin1 Latin1 latin1_bin 1", + "utf8 UTF-8 Unicode utf8_bin 3", + "utf8mb4 UTF-8 Unicode utf8mb4_bin 4", + )) + tk.MustQuery("show collation").Check(testkit.Rows( + "utf8mb4_bin utf8mb4 46 Yes Yes 1", + "latin1_bin latin1 47 Yes Yes 1", + "binary binary 63 Yes Yes 1", + "ascii_bin ascii 65 Yes Yes 1", + "utf8_bin utf8 83 Yes Yes 1", + )) } func (s *testSuiteWithCliBaseCharset) TestCharsetFeatureCollation(c *C) {