Commit 278531a7 authored by Julien Muchembled's avatar Julien Muchembled

Enable LZ4&Snappy for InnoDB and LZ4&Snappy&ZSTD for RocksDB

By default, MariaDB/RocksDB uses Snappy if available.
parent d0060d39
......@@ -19,12 +19,15 @@ Build-Depends: bison,
libjemalloc-dev [linux-any],
libjudy-dev,
libkrb5-dev,
liblz4-dev,
libncurses5-dev (>= 5.0-6~),
libpam0g-dev,
libpcre3-dev (>= 2:8.35-3.2~),
libreadline-gplv2-dev,
libsnappy-dev,
libsystemd-dev [linux-any],
libxml2-dev,
libzstd-dev,
lsb-release,
perl,
po-debconf,
......
......@@ -103,6 +103,7 @@ endif
-DPLUGIN_AUTH_SOCKET=STATIC \
-DWITH_SSL=bundled \
-DPLUGIN_AWS_KEY_MANAGEMENT=NO \
-DWITH_INNODB_SNAPPY=ON \
-DDEB=$(DEB_VENDOR) ..'
# This is needed, otherwise 'make test' will run before binaries have been built
......
Tests: smoke
Depends: mariadb-server-10.3
# RocksDB is not built for all archs. Rather than duplicating the condition
# for its existence (see the list in debian/control), install it if available
# and check in the test if it's funcational when it should be.
# The plugin package also already depends on the other one.
Depends: mariadb-plugin-rocksdb | mariadb-server-10.3
Restrictions: allow-stderr needs-root isolation-container
Tests: upstream
......
......@@ -20,6 +20,8 @@ set -ex
#
# 2) Creates a test table and checks it appears to operate normally
# using the test user and test database.
#
# 3) Checks compression support for InnoDB & RocksDB engine.
# Start the deamon if it was not running. For example in Docker testing
# environments there might not be any systemd et al and the service needs to
......@@ -62,3 +64,22 @@ mysql <<EOT
DROP DATABASE testdatabase;
DROP USER 'testuser'@'localhost';
EOT
mysql <<EOT
SET GLOBAL innodb_compression_algorithm=lz4;
SET GLOBAL innodb_compression_algorithm=snappy;
SET GLOBAL innodb_compression_algorithm=zlib;
SET GLOBAL innodb_compression_algorithm=none;
EOT
# Same condition as in debian/rules
if [ "`dpkg-architecture -qDEB_HOST_ARCH_BITS`" != 32 ]; then
LOG=/var/lib/mysql/#rocksdb/LOG
# XXX: The server may only be started during the install of
# mariadb-server-10.3, which happens before that of the plugin.
[ -e $LOG ] || mysql -e "INSTALL PLUGIN RocksDB SONAME 'ha_rocksdb';"
# XXX: rocksdb_supported_compression_types variable does not report ZSTD.
for a in LZ4 Snappy Zlib ZSTD; do
grep -qE "k$a(Compression)? supported: 1" $LOG
done
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment