Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31021

Character set 'utf8' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 10.5, 10.6
    • N/A
    • Character Sets
    • None

    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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              NevenIvanov Neven Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.