[MDEV-20672] Usage message for innodb_compression_algorithm system variable is missing "snappy" Created: 2019-09-26  Updated: 2020-10-06  Resolved: 2020-08-12

Status: Closed
Project: MariaDB Server
Component/s: Configuration, Storage Engine - InnoDB, Variables
Affects Version/s: 10.2.27, 10.1.41, 10.3.18, 10.4.8
Fix Version/s: 10.1.48, 10.2.35, 10.3.26, 10.4.16, 10.5.7

Type: Bug Priority: Trivial
Reporter: Geoff Montee (Inactive) Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-18586 Clarify benefits of compression metho... Closed
relates to MDEV-20670 Add status variable that lists suppor... Closed

 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



 Comments   
Comment by Marko Mäkelä [ 2020-08-12 ]

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.

Generated at Thu Feb 08 09:01:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.