[debian-mysql] Bug#1055727: mariadb-client: inconsistent default charset between client and server

Otto Kekäläinen otto at debian.org
Wed Nov 22 16:23:09 GMT 2023


Hi!

I get 'latin1' when running the MariaDB client in a clean install:

```
± docker run -it -v ${PWD}:/build -w /build debian:sid bash
root at eb0c4013a610:/build# apt update
root at eb0c4013a610:/build# apt install -y mariadb-server
...
Processing triggers for mariadb-server (1:10.11.5-3) ...

root at eb0c4013a610:/build# /etc/init.d/mariadb start &

root at eb0c4013a610:/build# mysql -e '\s'
--------------
mysql  Ver 15.1 Distrib 10.11.5-MariaDB, for debian-linux-gnu (x86_64)
using  EditLine wrapper

Connection id: 35
Current database:
Current user: root at localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.11.5-MariaDB-3 Debian n/a
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8mb4
Db     characterset: utf8mb4
Client characterset: latin1
Conn.  characterset: latin1
UNIX socket: /run/mysqld/mysqld.sock
Uptime: 37 sec

Threads: 1  Questions: 66  Slow queries: 0  Opens: 33  Open tables: 26
 Queries per second avg: 1.783
--------------

root at eb0c4013a610:/build# mariadb --help --verbose | grep character
character-sets-dir                (No default value)
default-character-set             auto


I am not sure where latin1 (or utfmb3 in your case) is inherited from.

We could consider adding utfmb4 in
https://salsa.debian.org/mariadb-team/mariadb-server/-/blob/debian/latest/debian/additions/mariadb.conf.d/50-client.cnf
to ensure if is used by default by clients as well in Debian.

We might also want to adopt
https://github.com/MariaDB/server/commit/0e8dfcfd421ebcb8dc13b4660cd3e6c6fbce2023
in Debian already with 10.11 and not wait for 11.3.



More information about the pkg-mysql-maint mailing list