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
The order of the CHARACTER SET and the COLLATE clauses is not strict on the table and the database level.
If COLLATE goes before CHARACTER SET, the COLLATE is ignored.
CREATE OR REPLACE TABLE t1 (a CHAR) COLLATE latin1_bin CHARACTER SET latin1; |
SHOW CREATE TABLE t1; |
+-------+---------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+---------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`a` char(1) DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+---------------------------------------------------------------------------------------+
|
Notice, the COLLATE latin1_bin was ignored.
CREATE OR REPLACE DATABASE d1 COLLATE latin1_bin CHARACTER SET latin1; |
SHOW CREATE DATABASE d1; |
+----------+---------------------------------------------------------------+
|
| Database | Create Database |
|
+----------+---------------------------------------------------------------+
|
| d1 | CREATE DATABASE `d1` /*!40100 DEFAULT CHARACTER SET latin1 */ |
|
+----------+---------------------------------------------------------------+
|
Notice, the COLLATE latin1_bin was ignored.
Attachments
Issue Links
- blocks
-
MDEV-27009 Add UCA-14.0.0 collations
- Closed
- causes
-
MDEV-30003 Assertion failure upon 2nd execution of SP trying to set collation on non-existing database
- Closed
- relates to
-
MDEV-7387 [PATCH] Alter table xxx CHARACTER SET utf8, CONVERT TO CHARACTER SET latin1 should fail
- Closed
-
MDEV-27009 Add UCA-14.0.0 collations
- Closed
-
MDEV-27906 CREATE TABLE/DATABASE .. CHARSET .. COLLATE is not consistent on errors
- Closed
-
MDEV-28644 Unexpected error on ALTER TABLE t1 CONVERT TO CHARACTER SET utf8mb3, DEFAULT CHARACTER SET utf8mb4
- Closed