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

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

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.11
    • 10.6
    • Character Sets
    • Ubuntu 22.04

    Description

      From the change log for 10.6.11 :

      The utf8 character set (and related collations) is now by default an alias for utf8mb3 rather than the other way around. It can be set to imply utf8mb4 by changing the value of the old_mode system variable (MDEV-8334)

      The alias for charset utf8mb3 is set to utf-8 but the old charset name was utf8 (without -)

      From /usr/share/mysql/charsets/Index.xml
      <charset name="utf8mb3">
      <family>Unicode</family>
      <description>UTF-8 Unicode</description>
      <alias>utf-8</alias>
      <alias>utf8</alias> #missing after the update

      Attachments

        Issue Links

          Activity

            do you get an error? where? how?

            serg Sergei Golubchik added a comment - do you get an error? where? how?
            NevenIvanov Neven Ivanov added a comment - - edited

            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

            NevenIvanov Neven Ivanov added a comment - - edited 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
            rucha174 Rucha Deodhar added a comment - Patch: https://github.com/MariaDB/server/tree/bb-10.6-MDEV-30086
            sanja Oleksandr Byelkin added a comment - - edited

            rucha174 I do not see any sign that the bug was checked on 10.5 or you have it checked checked? (fixed)

            sanja Oleksandr Byelkin added a comment - - edited rucha174 I do not see any sign that the bug was checked on 10.5 or you have it checked checked? (fixed)

            Why this file do not contain utf8mb4?

            When we have utf8 as an alias to utf8mb4 or utf8mb3 how it can be reflected in the file?

            sanja Oleksandr Byelkin added a comment - Why this file do not contain utf8mb4? When we have utf8 as an alias to utf8mb4 or utf8mb3 how it can be reflected in the file?
            rucha174 Rucha Deodhar added a comment -

            sanja , i did not check 10.5

            rucha174 Rucha Deodhar added a comment - sanja , i did not check 10.5

            People

              rucha174 Rucha Deodhar
              MirceaB Mircea Brincovean
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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