[MDEV-24674] CREATE TABLE allows COLLATE in non-character-string data types Created: 2021-01-25 Updated: 2021-01-25 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5, 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Looks wrong. COLLATE should be applicable only to character string data types:
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:
The best way to fix this is to add a new method into Type_handler, to test COLLATE clause applicability. |
| Comments |
| Comment by Elena Stepanova [ 2021-01-25 ] |
|
I don't think we can realistically prohibit it, though. |