Before MariaDB 10.7.0, each separate library would have to be compiled in in order to be available for use, resulting in numerous runtime/rpm/deb dependencies, most of which would never be used by users.
From MariaDB 10.7.0, five additional MariaDB compression libraries (besides the default zlib) are available as plugins (note that these affect InnoDB and Mroonga only; RocksDB still uses the compression algorithms from its own library):
To use, these simply need to be installed as a plugin:
INSTALL SONAME 'provider_lz4';
The compression algorithm can then be used, for example, in InnoDB compression:
SET GLOBAL innodb_compression_algorithm = lz4;
When upgrading from a release without compression plugins, if a non-zlib compression algorithm was used, those tables will be unreadable until the appropriate compression library is installed. mariadb-upgrade should be run. The
--force option (to run mariadb-check) or
mariadb-check itself will indicate any problems with compression, for example:
Warning : MariaDB tried to use the LZMA compression, but its provider plugin is not loaded Error : Table 'test.t' doesn't exist in engine status : Operation failed
Error : Table test/t is compressed with lzma, which is not currently loaded. Please load the lzma provider plugin to open the table error : Corrupt
In this case, the appropriate compression plugin should be installed, and the server restarted.
- 10.7 preview feature: Compression Provider Plugins (mariadb.org blog)