Hi, Alexander, Of course, there can be no comments about the code change here. But the question is, is it something we want to do? 1. Is utf8/utf-8 locale indeed 4-byte utf8? 2. Why is hard-coding to utf8mb4 better than having it dependent on UTF8_IS_UTF8MB3 ? On Nov 16, Alexander Barkov wrote:
revision-id: ff3d06f6601 (mariadb-11.6.1-44-gff3d06f6601) parent(s): 4b6922a315f author: Alexander Barkov committer: Alexander Barkov timestamp: 2024-10-28 14:11:40 +0400 message:
MDEV-22217 Make OS character sets "utf8" and "utf-8" map to MariaDB character set "utf8mb4"
diff --git a/mysql-test/main/mysql_locale_posix.test b/mysql-test/main/mysql_locale_posix.test index c047b7b1ae9..b37d04baca2 100644 --- a/mysql-test/main/mysql_locale_posix.test +++ b/mysql-test/main/mysql_locale_posix.test @@ -203,3 +203,20 @@ DROP DATABASE `ó`; + +--exec LC_ALL=en_US.utf8 $MYSQL --default-character-set=auto test -e "SELECT @@character_set_client" +--exec LC_ALL=en_US.utf8 $MYSQL --default-character-set=auto test -e "SELECT @@character_set_connection" +--exec LC_ALL=en_US.utf8 $MYSQL --default-character-set=auto test -e "SELECT @@character_set_results"
may be do it in one SELECT? or in SHOW VARIABLES LIKE 'character_set%' ? to have it a tiny bit faster? Regards, Sergei Chief Architect, MariaDB Server and security@mariadb.org