[MDEV-27284] CLI client for 10.5 does not recognize utf8mb3 but server does Created: 2021-12-15  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Character Sets, Scripts & Clients
Affects Version/s: 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Major
Reporter: Rob Schwyzer Assignee: Rucha Deodhar
Resolution: Unresolved Votes: 0
Labels: None
Environment:

CentOS Linux release 7.9.2009 (Core) in AWS VM



 Description   

Setting the below works as expected for 10.6 (despite being 10.5) and enables forward-looking customers to prepare their configuration files for a future 10.6+ upgrade-

[server]
character_set_server=utf8mb3

At runtime, the server detects-

SELECT @@character_set_server, @@collation_server;
+------------------------+--------------------+
| @@character_set_server | @@collation_server |
+------------------------+--------------------+
| utf8                   | utf8_general_ci    |
+------------------------+--------------------+

However, when configuring the MariaDB CLI client like-

[client]
default_character_set=utf8mb3

The below error occurs when invoking mariadb-

ERROR 2019 (00000): Can't initialize character set utf8mb3 (path: compiled_in)

Note this also occurs for-

mariadb --default-character-set='utf8mb3'

Please note these CLI configurations work fine in Server 10.6.5.

Would it be possible to backport enablement of this from 10.6 to 10.5 (and any other versions for which character_set_server=utf8mb3 is valid syntax?

This is particularly important for MariaDB client configurations. While server configurations tend to be centralized to the MariaDB backend servers and managed by dedicated teams, client configurations and runtime parameters tend to be much more decentralized, and it can take significant time for client organizations to wrangle these into spec. By enabling 10.6+ syntax for client configurations in versions prior to 10.6, customers can start this process now, making them better prepared to move to 10.6, and even better prepared to handle what occurs when we inevitably change the default character set defined by utf8 from utf8mb3 to utf8mb4.



 Comments   
Comment by Sergei Golubchik [ 2021-12-16 ]

Note that utf8mb3 is an alias for utf8. And

SET NAMES utf8mb3;

works, while mysql --default-character-set=utf8mb3 doesn't.

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