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

Default value of character_set_system is not correct in information_schema.SYSTEM_VARIABLES

    XMLWordPrintable

Details

    Description

      The real default value of character_set_system is not shown in information_schema.SYSTEM_VARIABLES.

      For example, see the following output on 10.6:

      MariaDB [(none)]> SELECT VARIABLE_NAME, GLOBAL_VALUE, DEFAULT_VALUE FROM information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='character_set_system'\G
      *************************** 1. row ***************************
      VARIABLE_NAME: CHARACTER_SET_SYSTEM
       GLOBAL_VALUE: utf8mb3
      DEFAULT_VALUE: NULL
      1 row in set (0.001 sec)
      

      The real default values are:

      • Up to 10.5: "utf8"
      • 10.6 and above: "utf8mb3"

      This probably occurs because the code sets the default value to 0:

      https://github.com/MariaDB/server/blob/mariadb-10.6.4/sql/sys_vars.cc#L787

      And then the value is actually set during startup:

      https://github.com/MariaDB/server/blob/mariadb-10.6.4/sql/mysqld.cc#L5454

      Can the actual default be shown in information_schema.SYSTEM_VARIABLES?

      Attachments

        Activity

          People

            Unassigned Unassigned
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            0 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.