Details
Description
Currently MariaDB reduces SHOW CREATE TABLE output: COLLATE clause is not displayed if the collation is default for its character set.
CREATE OR REPLACE TABLE t1 ( |
a VARCHAR(10), |
b VARCHAR(10) CHARACTER SET ucs2 |
) CHARACTER SET utf8mb4; |
SHOW CREATE TABLE t1; |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
| t1 | CREATE TABLE `t1` (
|
`a` varchar(10) DEFAULT NULL,
|
`b` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 |
|
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
Notice:
- the definition of the column `b` does not have a COLLATE clause, because it's collation is ucs2_general_ci, which is default for the character set ucs2.
- the table option does not have a COLLATE clause, because it's collation is utf8mb4_general_ci, which is default for the chracter set utf8mb4.
Under terms of MDEV-19123, we're going to change the default collation for Unicode charcter sets to uca1400_ai_ci.
This will break dump-restore:
mariadb-dump | mariadb
|
e.g. utf8mb4_general_ci will be erroneously replaced to uca1400_ai_ci.
To avoid this, SHOW CREATE TABLE should always diplay collations after CHARACTER SET clause, even default ones.
Attachments
Issue Links
- blocks
-
MDEV-19123 Change default charset from latin1 to utf8mb4
-
- Closed
-
- causes
-
MDEV-29561 SHOW CREATE TABLE produces syntactically incorrect structure
-
- Closed
-
-
MDEV-30101 Some tests still need result updates after MDEV-29446
-
- Open
-
-
MDEV-34700 Connect SQLite3 MTR test fails due to various charset/collation related output changes
-
- Closed
-
- relates to
-
MDEV-33788 HEX(COLUMN_CREATE(.. AS CHAR ...)) fails with --view-protocol
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue blocks |
Priority | Major [ 3 ] | Critical [ 2 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Alexander Barkov [ bar ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Alexander Barkov [ bar ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Link |
This issue causes |
issue.field.resolutiondate | 2022-09-21 08:42:37.0 | 2022-09-21 08:42:37.811 |
Fix Version/s | 10.3.37 [ 28404 ] | |
Fix Version/s | 10.4.27 [ 28405 ] | |
Fix Version/s | 10.5.18 [ 28421 ] | |
Fix Version/s | 10.6.11 [ 28441 ] | |
Fix Version/s | 10.7.7 [ 28442 ] | |
Fix Version/s | 10.8.6 [ 28443 ] | |
Fix Version/s | 10.9.4 [ 28444 ] | |
Fix Version/s | 10.10.2 [ 28410 ] | |
Fix Version/s | 10.11.0 [ 28411 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Link | This issue causes MDEV-30101 [ MDEV-30101 ] |
Link |
This issue relates to |
Link |
This issue causes |