Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5.40, 10.0.14
-
None
Description
mysql> SELECT COLLATION(CAST('a' AS CHAR BINARY));
|
+-------------------------------------+
|
| COLLATION(CAST('a' AS CHAR BINARY)) |
|
+-------------------------------------+
|
| utf8_general_ci |
|
+-------------------------------------+
|
1 row in set (0.00 se
|
The expected result is utf8_bin.
It would be inline with the same syntax in CREATE TABLE:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a CHAR BINARY) CHARSET=utf8;
|
SHOW CREATE TABLE t1;
|
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`a` char(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
|
+-------+-------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|