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

Usage message for innodb_compression_algorithm system variable is missing "snappy"

Details

    Description

      The usage message for the innodb_compression_algorithm system variable is currently wrong.

      https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_compression_algorithm

      https://mariadb.com/kb/en/library/compression/#choosing-a-page-compression-algorithm

      The current usage message does not list snappy, which was added as an optional compression algorithm in MariaDB 10.1.3.

      The current message looks like this:

       
      sudo mysqld --help --verbose
      ...
        --innodb-compression-algorithm[=name]
                            Compression algorithm used on page compression. One of:
                            none, zlib, lz4, lzo, lzma, or bzip2
      ...
      

      The usage message is defined here:

      https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19659

      You can see that the list in the usage message is hard-coded, but it is missing snappy.

      Perhaps the list could instead be built dynamically from the values in the page_compression_algorithms array:

      https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19653

      Non-supported compression algorithms are also compiled in as available options. Instead, support for the algorithm is checked at run-time in the innodb_compression_algorithm_validate() function:

      https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L21190

      Attachments

        Issue Links

          Activity

            GeoffMontee Geoff Montee (Inactive) created issue -
            GeoffMontee Geoff Montee (Inactive) made changes -
            Field Original Value New Value
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            Description The usage message for the {{innodb_compression_algorithm}} system variable is currently wrong.

            https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_compression_algorithm

            https://mariadb.com/kb/en/library/compression/#choosing-a-page-compression-algorithm

            There are two problems with the current usage message:

            1.) It does not list {{snappy}}, which is supported in MariaDB 10.1.3 and later.

            2.) It is currently a hard-coded list that includes all possible compression algorithms. In my opinion, it should only list the ones supported by the specific build.

            The current message looks like this:

            {noformat}

            sudo mysqld --help --verbose
            ...
              --innodb-compression-algorithm[=name]
                                  Compression algorithm used on page compression. One of:
                                  none, zlib, lz4, lzo, lzma, or bzip2
            ...
            {noformat}

            The message is set in the code here:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19659

            You can see that the list is hard-coded, so even non-supported compressions algorithms are available.

            Non-supported compression algorithms are also available as options:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19653

            Instead, support for the algorithm is checked in the {{innodb_compression_algorithm_validate()}} function:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L21190
            The usage message for the {{innodb_compression_algorithm}} system variable is currently wrong.

            https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_compression_algorithm

            https://mariadb.com/kb/en/library/compression/#choosing-a-page-compression-algorithm

            There are two problems with the current usage message:

            1.) It does not list {{snappy}}, which is supported in MariaDB 10.1.3 and later.

            2.) It is currently a hard-coded list that includes all possible compression algorithms, except {{snappy}}. In my opinion, it should only list the ones supported by the specific {{mysqld}} build.

            The current message looks like this:

            {noformat}

            sudo mysqld --help --verbose
            ...
              --innodb-compression-algorithm[=name]
                                  Compression algorithm used on page compression. One of:
                                  none, zlib, lz4, lzo, lzma, or bzip2
            ...
            {noformat}

            The message is set in the code here:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19659

            You can see that the list is hard-coded, so even non-supported compressions algorithms are available.

            Non-supported compression algorithms are also available as options:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19653

            Instead, support for the algorithm is checked in the {{innodb_compression_algorithm_validate()}} function:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L21190
            GeoffMontee Geoff Montee (Inactive) made changes -
            Summary Usage message for innodb_compression_algorithm is wrong Usage message for innodb_compression_algorithm system variable is wrong
            GeoffMontee Geoff Montee (Inactive) made changes -
            Component/s Configuration [ 13904 ]
            Component/s Variables [ 13903 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            Description The usage message for the {{innodb_compression_algorithm}} system variable is currently wrong.

            https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_compression_algorithm

            https://mariadb.com/kb/en/library/compression/#choosing-a-page-compression-algorithm

            There are two problems with the current usage message:

            1.) It does not list {{snappy}}, which is supported in MariaDB 10.1.3 and later.

            2.) It is currently a hard-coded list that includes all possible compression algorithms, except {{snappy}}. In my opinion, it should only list the ones supported by the specific {{mysqld}} build.

            The current message looks like this:

            {noformat}

            sudo mysqld --help --verbose
            ...
              --innodb-compression-algorithm[=name]
                                  Compression algorithm used on page compression. One of:
                                  none, zlib, lz4, lzo, lzma, or bzip2
            ...
            {noformat}

            The message is set in the code here:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19659

            You can see that the list is hard-coded, so even non-supported compressions algorithms are available.

            Non-supported compression algorithms are also available as options:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19653

            Instead, support for the algorithm is checked in the {{innodb_compression_algorithm_validate()}} function:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L21190
            The usage message for the {{innodb_compression_algorithm}} system variable is currently wrong.

            https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_compression_algorithm

            https://mariadb.com/kb/en/library/compression/#choosing-a-page-compression-algorithm

            The current usage message does not list {{snappy}}, which was added as an optional compression algorithm in MariaDB 10.1.3.

            The current message looks like this:

            {noformat}

            sudo mysqld --help --verbose
            ...
              --innodb-compression-algorithm[=name]
                                  Compression algorithm used on page compression. One of:
                                  none, zlib, lz4, lzo, lzma, or bzip2
            ...
            {noformat}

            The usage message is defined here:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19659

            You can see that the list in the usage message is hard-coded, and it explicitly lists all compression algorithms except for {{snappy}}.

            Perhaps the list could instead be built dynamically from the values in the {{page_compression_algorithms}} array:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19653

            Non-supported compression algorithms are also compiled in as available options. Instead, support for the algorithm is checked at run-time in the {{innodb_compression_algorithm_validate()}} function:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L21190
            GeoffMontee Geoff Montee (Inactive) made changes -
            Priority Major [ 3 ] Trivial [ 5 ]
            GeoffMontee Geoff Montee (Inactive) made changes -
            Summary Usage message for innodb_compression_algorithm system variable is wrong Usage message for innodb_compression_algorithm system variable is missing "snappy"
            GeoffMontee Geoff Montee (Inactive) made changes -
            Description The usage message for the {{innodb_compression_algorithm}} system variable is currently wrong.

            https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_compression_algorithm

            https://mariadb.com/kb/en/library/compression/#choosing-a-page-compression-algorithm

            The current usage message does not list {{snappy}}, which was added as an optional compression algorithm in MariaDB 10.1.3.

            The current message looks like this:

            {noformat}

            sudo mysqld --help --verbose
            ...
              --innodb-compression-algorithm[=name]
                                  Compression algorithm used on page compression. One of:
                                  none, zlib, lz4, lzo, lzma, or bzip2
            ...
            {noformat}

            The usage message is defined here:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19659

            You can see that the list in the usage message is hard-coded, and it explicitly lists all compression algorithms except for {{snappy}}.

            Perhaps the list could instead be built dynamically from the values in the {{page_compression_algorithms}} array:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19653

            Non-supported compression algorithms are also compiled in as available options. Instead, support for the algorithm is checked at run-time in the {{innodb_compression_algorithm_validate()}} function:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L21190
            The usage message for the {{innodb_compression_algorithm}} system variable is currently wrong.

            https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_compression_algorithm

            https://mariadb.com/kb/en/library/compression/#choosing-a-page-compression-algorithm

            The current usage message does not list {{snappy}}, which was added as an optional compression algorithm in MariaDB 10.1.3.

            The current message looks like this:

            {noformat}

            sudo mysqld --help --verbose
            ...
              --innodb-compression-algorithm[=name]
                                  Compression algorithm used on page compression. One of:
                                  none, zlib, lz4, lzo, lzma, or bzip2
            ...
            {noformat}

            The usage message is defined here:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19659

            You can see that the list in the usage message is hard-coded, but it is missing {{snappy}}.

            Perhaps the list could instead be built dynamically from the values in the {{page_compression_algorithms}} array:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L19653

            Non-supported compression algorithms are also compiled in as available options. Instead, support for the algorithm is checked at run-time in the {{innodb_compression_algorithm_validate()}} function:

            https://github.com/MariaDB/server/blob/mariadb-10.4.8/storage/innobase/handler/ha_innodb.cc#L21190

            Unfortunately, we will keep including also unavailable compression algorithms in the list, because ENUM parameters allow numeric values, and we do not want innodb_compression_algorithm=3 to change meaning depending on the way how the source code was compiled.

            marko Marko Mäkelä added a comment - Unfortunately, we will keep including also unavailable compression algorithms in the list, because ENUM parameters allow numeric values, and we do not want innodb_compression_algorithm=3 to change meaning depending on the way how the source code was compiled.
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2020-08-12 15:39:59.0 2020-08-12 15:39:59.921
            marko Marko Mäkelä made changes -
            Fix Version/s 10.1.47 [ 24510 ]
            Fix Version/s 10.2.34 [ 24505 ]
            Fix Version/s 10.3.25 [ 24506 ]
            Fix Version/s 10.4.15 [ 24507 ]
            Fix Version/s 10.5.6 [ 24508 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.1 [ 16100 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.5.7 [ 25019 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.5.6 [ 24508 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.4.16 [ 25020 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.4.15 [ 24507 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.3.26 [ 25021 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.3.25 [ 24506 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.2.35 [ 25022 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.2.34 [ 24505 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.1.48 [ 25108 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.1.47 [ 24510 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 99983 ] MariaDB v4 [ 156785 ]

            People

              marko Marko Mäkelä
              GeoffMontee Geoff Montee (Inactive)
              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.