[MDEV-21449] Wrong collation for new table when all defaults set. Created: 2020-01-09 Updated: 2023-12-15 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Frank Forte | Assignee: | Joe Cotellese |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | collation | ||
| Environment: |
Linux and Windows |
||
| Issue Links: |
|
||||
| Description |
|
If the database collation is 'utf8mb4_unicode_520_ci', I expect new tables with character set utf8mb4 will have that same collation. However, the new table created has collation 'utf8mb4_general_ci';
why? |
| Comments |
| Comment by Frank Forte [ 2020-01-09 ] |
|
Because of the unexpected collation, I get this error with some queries: "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_520_ci,IMPLICIT) for operation 'like'" |
| Comment by Elena Stepanova [ 2020-01-13 ] |
|
This is actually documented behavior:
It seems reasonable, since you could just as well try to create a table with CHARSET=latin1, for example, and it would be weird to use the default database collation for that. However, documentation for this subject, while quite detailed, could use some revising and clarification, as it's contradictory in different parts.
And here it also says
So I'm switching it to documentation. |