[MDEV-28068] Change NATIONAL from utf8mb3 to utf8mb4 Created: 2022-03-15  Updated: 2024-02-06

Status: Open
Project: MariaDB Server
Component/s: Character Sets
Fix Version/s: 10.11

Type: New Feature Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-29414 Map utf8 OS locales to utf8mb4 Open

 Description   

Data types NCHAR and NVARCHAR use CHARACTER SET utf8mb3.
With the general intent to switch from utf8mb3 to utf8mb4, this should also be fixed:

  • either to hard-coded utf8mb4
  • or according to UTF8_IS_UTF8MB3

CREATE OR REPLACE TABLE t1 (a NCHAR);
SHOW CREATE TABLE t1;

+-------+-------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                |
+-------+-------------------------------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `a` char(1) CHARACTER SET utf8mb3 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+-------------------------------------------------------------------------------------------------------------+


Generated at Thu Feb 08 09:57:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.