[debian-mysql] Bug#933063: Bug#933063: character_set_client: latin1?
Otto Kekäläinen
otto at debian.org
Fri Jul 26 13:06:44 BST 2019
Hello!
Thanks for reporting. I don't know it the MariaDB Connector C client
library reads and follows any settings in /etc/mysql/, we will need to
check that with upstream author if this is a bug or not.
- Otto
pe 26. heinäk. 2019 klo 7.21 Olaf van der Spek (olafvdspek at gmail.com) kirjoitti:
>
> Package: libmariadb-dev-compat
> Version: 1:10.3.15-1
> Severity: normal
>
> Dear Maintainer,
>
> I expected character_set_client to be utf8mb4, but it's latin1. Isn't it supposed to be utf8mb4?
>
> Greetings,
>
> Olaf
>
> /etc/mysql/mariadb.conf.d/50-client.cnf :
> [client]
> # Default is Latin1, if you need UTF-8 set this (also in server section)
> default-character-set = utf8mb4
>
> Output:
> character_set_client: latin1
> character_set_connection: latin1
> character_set_database: utf8mb4
> character_set_filesystem: binary
> character_set_results: latin1
> character_set_server: utf8mb4
> character_set_system: utf8
> character_sets_dir: /usr/share/mysql/charsets/
>
> #include <iostream>
> #include <mysql/mysql.h>
> #include <stdexcept>
>
> int main()
> {
> MYSQL h;
>
> if (!mysql_init(&h)
> || mysql_options(&h, MYSQL_READ_DEFAULT_GROUP, "")
> // || mysql_options(&h, MYSQL_SET_CHARSET_NAME, "utf8mb4")
> || !mysql_real_connect(&h, "", "", NULL, "", 0, NULL, 0))
> throw std::runtime_error(mysql_error(&h));
> std::string q = "show variables like '%char%'";
> if (mysql_real_query(&h, q.data(), q.size()))
> throw std::runtime_error(mysql_error(&h));
> MYSQL_RES* result = mysql_store_result(&h);
> if (!result && mysql_errno(&h))
> throw std::runtime_error(mysql_error(&h));
> while (MYSQL_ROW row = mysql_fetch_row(result))
> {
> std::cout << row[0] << ": " << row[1] << "\n";
> }
> return 0;
> }
>
> -- System Information:
> Debian Release: 10.0
> APT prefers stable
> APT policy: (500, 'stable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 4.19.0-5-amd64 (SMP w/2 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
>
> Versions of packages libmariadb-dev-compat depends on:
> ii libmariadb-dev 1:10.3.15-1
>
> libmariadb-dev-compat recommends no packages.
>
> libmariadb-dev-compat suggests no packages.
>
> -- no debconf information
>
> _______________________________________________
> pkg-mysql-maint mailing list
> pkg-mysql-maint at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-mysql-maint
--
- Otto
More information about the pkg-mysql-maint
mailing list