Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
Table and database level CHARACTER SET and COLLATE clauses can go in any order. So both these syntaxes are correct:
- CHARACTER SET .. COLLATE
- COLLATE .. CHARACTER SET
But they can produce errors differently:
CREATE OR REPLACE TABLE t1 (a CHAR) COLLATE latin1_bin CHARACTER SET DEFAULT; |
ERROR 1302 (HY000): Conflicting declarations: 'CHARACTER SET latin1' and 'CHARACTER SET DEFAULT'
|
CREATE OR REPLACE TABLE t1 (a CHAR) CHARACTER SET DEFAULT COLLATE latin1_bin; |
Query OK, 0 rows affected (0.014 sec)
|
The same problem is repeatable on the database level:
CREATE OR REPLACE DATABASE db1 COLLATE latin1_bin CHARACTER SET DEFAULT; |
ERROR 1302 (HY000): Conflicting declarations: 'CHARACTER SET latin1' and 'CHARACTER SET DEFAULT'
|
CREATE OR REPLACE DATABASE db1 CHARACTER SET DEFAULT COLLATE latin1_bin; |
Query OK, 0 rows affected (0.014 sec)
|
Attachments
Issue Links
- relates to
-
MDEV-27896 Wrong result upon `COLLATE latin1_bin CHARACTER SET latin1` on the table or the database level
- Closed
-
MDEV-28117 Multiple conflicting table COLLATE clauses are not rejected
- Closed
-
MDEV-27009 Add UCA-14.0.0 collations
- Closed