[MDEV-31021] Character set 'utf8' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file Created: 2023-04-07  Updated: 2023-07-23  Resolved: 2023-07-23

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Affects Version/s: 10.5, 10.6
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Neven Ivanov Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-30086 Character set 'utf8' is not a compile... Closed

 Description   

Hi,
Simple perl script to test the problem is as follows:

#!/usr/bin/perl
use DBI;
### prior to upgrade to mariadb 106 both lines worked fine because charset utf8 has alias utf-8 in /usr/share/mysql/charsets/Index.xml 
 
### now ( after upgrade to 10.6 ) the charset is named utf8mb3 and has alias utf-8 in /usr/share/mysql/charsets/Index.xml so utf8 charset used in legacy code will not work 
 
print "TEST WITH utf8 charset:\n\n"; 
 
my $dbh = DBI->connect("dbi:mysql:database=testdb;host=127.0.0.1", testuser, testpw,{ mysql_enable_utf8 => 1}) || $! ;
 
print "\nTEST WITH utf-8 charset:\n\n"; 
 
my $dbh = DBI->connect("dbi:mysql:database=testdb;host=127.0.0.1", testuser, testpw,{ mysql_enable_utf-8 => 1}) || $! ;

usage: put code in test_utf8_charset.pl and run:

perl test_utf8_charset.pl

Credentials are fake and non working ( error for utf8 is present before error for wrong credentials ).

The credentials used in example are not actual so no security risk is present.

Tested on Centos 7 with MariaDB 10.6.12
Regards
Neven Ivanov



 Comments   
Comment by Sergei Golubchik [ 2023-05-24 ]

Sorry, I cannot repeat that. It connects just fine for me. Using MariaDB 10.6.12 on centos7.
There must be something I'm missing.
Can you provide more info for me to repeat this?

Comment by Neven Ivanov [ 2023-05-26 ]

Indeed with basic CentOS 7 installation the problem does not occur.
The problem is present and can be reproduced on cPanel server with CentOS 7 with MariaDB 10.6.12 and 10.6.13 .

The perl packages are the same version, the MariaDB looks the same, the md5sum of /usr/share/mysql/charsets/Index.xml is the same ( 82a1585a4a41021507c7c40fcfb33815 )

Comment by Sergei Golubchik [ 2023-06-20 ]

do you have versions of client libraries? what your DBD-mysql is built with?

Comment by Neven Ivanov [ 2023-06-21 ]

Hm... This is very strange ... I'm no longer able to reproduce the problem .
I will continue to test it and if I can find a way to reproduce the problem, will write with more information.

Generated at Thu Feb 08 10:20:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.