[debian-mysql] Bug#1018063: Regression: mariadb client default charset changed breaks compatibility

Tim Evers te at artfiles.de
Wed Aug 24 22:37:31 BST 2022


Package: mariadb-client
Version: 1:10.5.15-0+deb11u1

Apparently as a fix for Bug #933063 the default charset in Bullseye for clients using libmariadb.so.3 was changed from latin1 to utf8mb4.

This breaks compatibility with all clients relying on the default behaviour.
This should not happen and diverges from upstream for (at least to me) no apparent reason.
I could not find prior mention in the changelog why the default should be utf8mb4 in the first place.

Anyways: The following perl script illustrates the issue:

use DBI;
my $dbh = DBI->connect("dbi:mysql:");
my $sth = $dbh->prepare("show variables like '%character_set_client%'");
$sth->execute();
printf "%s: %s\n",  $sth->fetchrow_array();

On Buster:

#  LD_PRELOAD=./libmariadb.so.3.buster perl test_cs.pl
character_set_client: latin1

On Bullseye:

#  LD_PRELOAD=./libmariadb.so.3.bullseye perl test_cs.pl
character_set_client: utf8mb4

Again: this seems to me like a breakage of user expectations when upgrading buster -> bullseye. And while I know that this horse has probably left the barn, I would like to suggest reversing the default to the upstream/Buster value.

In addition to this issue the implementation seems incomplete. If you explicitly set the the default like so:

use DBI;
my $dbh = DBI->connect("dbi:mysql:“);
$dbh->do("set names default“); # HERE
my $sth = $dbh->prepare("show variables like '%character_set_client%'");
$sth->execute();
printf "%s: %s\n",  $sth->fetchrow_array();

The result is

#  LD_PRELOAD=./libmariadb.so.3.bullseye perl test_cs.pl
character_set_client: latin1

Which means explicitly and implicitly using defaults yields different results.

Debian Release 11.4
libmariadb.so.3.buster 1:10.3.34-0+deb10u1
libmariadb.so.3.bullseye 1:10.5.15-0+deb11u1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://alioth-lists.debian.net/pipermail/pkg-mysql-maint/attachments/20220824/0b26721c/attachment.sig>


More information about the pkg-mysql-maint mailing list