WL#10353: Use utf8mb4 in libmysql and command tools
Affects: Server-8.0 — Status: Complete — Priority: Medium
Libmysql uses a default compiled in character set for when auto-detecting the environment settings fails. And it will switch to utf8mb3 for environments that use UTF8. On top of the some client tools will do their own inference and set the connection charset according to the outcome of it. This worklog is about switching the compiled in default to utf8mb4 and making sure that both libmysql's and client tools' autodetection picks utf8mb4 instead of utf8mb3. User Documentation ================== * https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-2.html * https://dev.mysql.com/doc/refman/8.0/en/charset-connection.html * https://dev.mysql.com/doc/refman/8.0/en/mysql-real-connect.html
This WL takes care of changing the default charset for client tools from latin1 to utf8mb4. Client tools include following: mysql, mysqladmin, mysqldump, mysqlcheck, mysqlpump, mysqlimport, mysql_upgrade, mysqltest, mysqlshow, mysqlslap. New mysqltest option default-character-set: ------------------------------------------ As of today mtr tests are run with latin1 as default charset. With this WL, mysqltest client (this is the client used by mtr) default charset is changed to utf8mb4, which makes ~6K test files to be run with utf8mb4 charset. This change will need a lot of result files to be re-recorded after some analysis (80% will be a blind record). So to reduce the scope of this WL to minimal result file updates this WL introduces a new option --default-character-set in mysqltest client, and set to latin1 in default-client.cnf. Note: default-character-set option exists for all clients except mysqltest. Changes to default-client.cnf: ------------------------------ All clients (except mysqltest) default charset in default-client.cnf will be changed to utf8mb4 to ensure that all clients will run with utf8mb4 as default. [mysqltest] default-character-set=latin1 Above new option will be added to default-client.cnf to ensure that mtr tests pass.
Copyright (c) 2000, 2019, Oracle Corporation and/or its affiliates. All rights reserved.