diff --git a/expression/integration_test.go b/expression/integration_test.go index bc65f74708..147658a50f 100755 --- a/expression/integration_test.go +++ b/expression/integration_test.go @@ -6350,6 +6350,13 @@ func (s *testIntegrationSerialSuite) TestCollateStringFunction(c *C) { tk.MustQuery("select FIND_IN_SET('a','b,a ,c,d' collate utf8mb4_bin);").Check(testkit.Rows("2")) tk.MustQuery("select FIND_IN_SET('a','b,A,c,d' collate utf8mb4_general_ci);").Check(testkit.Rows("2")) tk.MustQuery("select FIND_IN_SET('a','b,a ,c,d' collate utf8mb4_general_ci);").Check(testkit.Rows("2")) + + tk.MustExec("set names utf8mb4 collate utf8mb4_general_ci;") + tk.MustQuery("select collation(cast('a' as char));").Check(testkit.Rows("utf8mb4_general_ci")) + tk.MustQuery("select collation(cast('a' as binary));").Check(testkit.Rows("binary")) + tk.MustQuery("select collation(cast('a' collate utf8mb4_bin as char));").Check(testkit.Rows("utf8mb4_general_ci")) + tk.MustQuery("select collation(cast('a' collate utf8mb4_bin as binary));").Check(testkit.Rows("binary")) + tk.MustQuery("select FIND_IN_SET('a','b,A,c,d' collate utf8mb4_unicode_ci);").Check(testkit.Rows("2")) tk.MustQuery("select FIND_IN_SET('a','b,a ,c,d' collate utf8mb4_unicode_ci);").Check(testkit.Rows("2"))