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

Add deprecation status columns to I_S.SYSTEM_VARIABLES

    XMLWordPrintable

Details

    • Add deprecation status columns to I_S.SYSTEM_VARIABLES table.
    • Q2/2026 Server Maintenance

    Description

      Previously one could already do:

      SELECT VARIABLE_NAME, GLOBAL_VALUE, DEFAULT_VALUE
        FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES
        WHERE GLOBAL_VALUE_ORIGIN IN('CONFIG', 'SQL');
      

      Which would show all variables specifically set in the server's config or using SQL. For example:

      CS 13.0.1 3a2f8e27981b76b99d2b87cc3bcec5ef022b2b23 (Debug, Clang 21.1.3-20250923) Build 10/04/2026

      13.0.1-dbg>set global sql_mode='';
      Query OK, 0 rows affected (0.000 sec)
       
      13.0.1-dbg>SELECT VARIABLE_NAME, GLOBAL_VALUE, DEFAULT_VALUE   FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES   WHERE GLOBAL_VALUE_ORIGIN IN('CONFIG', 'SQL');
      +---------------+--------------+-------------------------------------------------------------------------------------------+
      | VARIABLE_NAME | GLOBAL_VALUE | DEFAULT_VALUE                                                                             |
      +---------------+--------------+-------------------------------------------------------------------------------------------+
      | SQL_MODE      |              | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
      +---------------+--------------+-------------------------------------------------------------------------------------------+
      1 row in set (0.012 sec)
      

      This feature adds IS_DEPRECATED='YES', which allows for easy / automated "is this server's [config/SQL] setting some deprecated variables" checks by running:

      SELECT VARIABLE_NAME, GLOBAL_VALUE, DEFAULT_VALUE
        FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES
        WHERE GLOBAL_VALUE_ORIGIN IN('CONFIG', 'SQL')
        AND IS_DEPRECATED = 'YES';
      

      For example:

      13.0.0-opt>set global sql_mode='';
      Query OK, 0 rows affected (0.000 sec)
       
      13.0.0-opt>set global TX_READ_ONLY=on;
      Query OK, 0 rows affected, 1 warning (0.000 sec)
       
      13.0.0-opt>SELECT VARIABLE_NAME, GLOBAL_VALUE, DEFAULT_VALUE   FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES   WHERE GLOBAL_VALUE_ORIGIN IN('CONFIG', 'SQL');  # Set vars
      +---------------+--------------+-------------------------------------------------------------------------------------------+
      | VARIABLE_NAME | GLOBAL_VALUE | DEFAULT_VALUE                                                                             |
      +---------------+--------------+-------------------------------------------------------------------------------------------+
      | TX_READ_ONLY  | ON           | OFF                                                                                       |
      | SQL_MODE      |              | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
      +---------------+--------------+-------------------------------------------------------------------------------------------+
      2 rows in set (0.002 sec)
       
      13.0.0-opt>SELECT VARIABLE_NAME, GLOBAL_VALUE, DEFAULT_VALUE   FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES   WHERE GLOBAL_VALUE_ORIGIN IN('CONFIG', 'SQL') AND IS_DEPRECATED = 'YES';  # Set vars which are depreciated
      +---------------+--------------+---------------+
      | VARIABLE_NAME | GLOBAL_VALUE | DEFAULT_VALUE |
      +---------------+--------------+---------------+
      | TX_READ_ONLY  | ON           | OFF           |
      +---------------+--------------+---------------+
      1 row in set (0.002 sec)
      

      Attachments

        Issue Links

          Activity

            People

              raghunandan.bhat Raghunandan Bhat
              hholzgra Hartmut Holzgraefe
              Raghunandan Bhat Raghunandan Bhat
              Daniel Black Daniel Black
              Votes:
              1 Vote for this issue
              Watchers:
              10 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.