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

System variables metadata shouldn't show values of INNODB_COMPRESSION_ALGORITHM that can't be set

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.6
    • N/A
    • None
    • None

    Description

      See MDEV-6361 for an earlier, closely-related issue.

      The INFORMATION_SCHEMA.SYSTEM_VARIABLES table contains a misleading ENUM_VALUE_LIST for INNODB_COMPRESSION_ALGORITHM. It lists algorithms that are (in principle) supported by MariaDB but (in reality) not compiled into this build.

      Here is an example on Amazon RDS MariaDB 10.6.11, which is built to support zlib, lzma, and none, but not other compression algorithms:

      System variable metadata says that any of the following values are supported: none,zlib,lz4,lzo,lzma,bzip2,snappy

      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 96
      Server version: 10.6.11-MariaDB-log managed by https://aws.amazon.com/rds/
       
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> select * from information_schema.system_variables where variable_name='INNODB_COMPRESSION_ALGORITHM'\G
      *************************** 1. row ***************************
              VARIABLE_NAME: INNODB_COMPRESSION_ALGORITHM
              SESSION_VALUE: NULL
               GLOBAL_VALUE: zlib
        GLOBAL_VALUE_ORIGIN: COMPILE-TIME
              DEFAULT_VALUE: zlib
             VARIABLE_SCOPE: GLOBAL
              VARIABLE_TYPE: ENUM
           VARIABLE_COMMENT: Compression algorithm used on page compression. One of: none, zlib, lz4, lzo, lzma, bzip2, or snappy
          NUMERIC_MIN_VALUE: NULL
          NUMERIC_MAX_VALUE: NULL
         NUMERIC_BLOCK_SIZE: NULL
            ENUM_VALUE_LIST: none,zlib,lz4,lzo,lzma,bzip2,snappy
                  READ_ONLY: NO
      COMMAND_LINE_ARGUMENT: OPTIONAL
          GLOBAL_VALUE_PATH: NULL
      1 row in set (0.002 sec)
      

      But trying to set not-compiled-in values causes an error:

      MariaDB [(none)]> set global innodb_compression_algorithm=bzip2;
      ERROR 1231 (42000): Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
      MariaDB [(none)]> set global innodb_compression_algorithm=lzma;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [(none)]> set global innodb_compression_algorithm=zlib;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [(none)]> set global innodb_compression_algorithm=none;
      Query OK, 0 rows affected (0.000 sec)
      

      Problem: The list of "allowed values" are not all allowed. In order to determine the actually allowed values, you have to test them one by one, and see which ones don't error out.

      Solution: The code to populate the information_schema metadata tables/views should be updated to list only the allowed values that can actually be set.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dlenski Daniel Lenski
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.