Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5, 10.1, 10.2, 10.3, 10.4, 10.5
-
None
-
None
-
None
Description
CREATE OR REPLACE TABLE t1 (a INT COLLATE latin1_bin); |
Query OK, 0 rows affected (0.020 sec)
|
Looks wrong. COLLATE should be applicable only to character string data types:
- CHAR
- VARCHAR
- TEXT (and its variants)
- ENUM
- SET
COLLATE with non-character-string data types should return an error.
Note, this includes binary strings. COLLATE with a binary string data type should also return an error:
- BINARY
- VARBINARY
- BLOB (and its variants)
The best way to fix this is to add a new method into Type_handler, to test COLLATE clause applicability.