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

OLD_MODE Ignored during initial hand shake for utf8

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.5, 10.6, 10.7
    • 10.6
    • Character Sets
    • None
    • Suse Tumbleweed, just compiled from source the 10.6.5 @git 109fc67d4da46d52d2a96528eaea3b0ef6275692

    Description

      In the config file I have

      old_mode=''

      https://mariadb.com/kb/en/old-mode/

      Which is correctly parsed and used

      SELECT @@OLD_MODE, @@GLOBAL.OLD_MODE;
      +------------+-------------------+
      | @@OLD_MODE | @@GLOBAL.OLD_MODE |
      +------------+-------------------+
      |            |                   |
      +------------+-------------------+
      

      Correctly a query like that is interpreted correctly as

      SELECT @@character_set_client, @@character_set_connection, @@collation_connection;
      +------------------------+----------------------------+------------------------+
      | @@character_set_client | @@character_set_connection | @@collation_connection |
      +------------------------+----------------------------+------------------------+
      | latin1                 | latin1                     | latin1_bin             |
      +------------------------+----------------------------+------------------------+
       
      SET character_set_client = 'utf8';
      SET character_set_connection = 'utf8';
      SET collation_connection = 'utf8_general_ci';
       
      SELECT @@character_set_client, @@character_set_connection, @@collation_connection;
      +------------------------+----------------------------+------------------------+
      | @@character_set_client | @@character_set_connection | @@collation_connection |
      +------------------------+----------------------------+------------------------+
      | utf8mb4                | utf8mb4                    | utf8mb4_general_ci     |
      +------------------------+----------------------------+------------------------+
      
      

      The problem arise when a client is connecting and issue during the handshake a command to
      Charset: utf8 COLLATE utf8_general_ci (33)

      (For example a default-character-set=utf8 in the my.cnf file)

      now

      SELECT @@character_set_client, @@character_set_connection, @@collation_connection;
      +------------------------+----------------------------+------------------------+
      | @@character_set_client | @@character_set_connection | @@collation_connection |
      +------------------------+----------------------------+------------------------+
      | utf8mb3                | utf8mb3                    | utf8mb3_general_ci     |
      +------------------------+----------------------------+------------------------+
       
      status;
      --------------
      mysql  Ver 15.1 Distrib 10.6.5-MariaDB, for Linux (x86_64) using  EditLine wrapper
       
      Connection id:          28
      /* omissis */
      Server version:         10.6.5-MariaDB-debug Source distribution
      Protocol version:       10
       
      Server characterset:    utf8mb4
      Db     characterset:    utf8mb4
      Client characterset:    utf8mb3
      Conn.  characterset:    utf8mb3
      
      

      I will now check in the source code more info about that

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              RoyBellingan Roy Bellingan
              Votes:
              2 Vote for this issue
              Watchers:
              3 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.