Merge pull request #129269 from Izorkin/mariadb-fix

This commit is contained in:
Sandro 2021-07-05 18:19:13 +02:00 committed by GitHub
commit ed79adc782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View File

@ -98,7 +98,7 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
}];
services.mysql.settings = {
mysqld = {
plugin-load-add = [ "ha_rocksdb.so" ];
plugin-load-add = [ "ha_mroonga.so" "ha_rocksdb.so" ];
};
};
services.mysql.package = pkgs.mariadb;
@ -172,6 +172,20 @@ import ./../make-test-python.nix ({ pkgs, ...} : {
"echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42"
)
# Check if Mroonga plugin works
mariadb.succeed(
"echo 'use testdb; create table mroongadb (test_id INT, PRIMARY KEY (test_id)) ENGINE = Mroonga;' | sudo -u testuser mysql -u testuser"
)
mariadb.succeed(
"echo 'use testdb; insert into mroongadb values (25);' | sudo -u testuser mysql -u testuser"
)
mariadb.succeed(
"echo 'use testdb; select test_id from mroongadb;' | sudo -u testuser mysql -u testuser -N | grep 25"
)
mariadb.succeed(
"echo 'use testdb; drop table mroongadb;' | sudo -u testuser mysql -u testuser"
)
# Check if RocksDB plugin works
mariadb.succeed(
"echo 'use testdb; create table rocksdb (test_id INT, PRIMARY KEY (test_id)) ENGINE = RocksDB;' | sudo -u testuser mysql -u testuser"

View File

@ -4,7 +4,7 @@
, bzip2, lz4, lzo, snappy, xz, zlib, zstd
, fixDarwinDylibNames, cctools, CoreServices, less
, numactl # NUMA Support
, withStorageMroonga ? true, kytea, msgpack, zeromq
, withStorageMroonga ? true, kytea, libsodium, msgpack, zeromq
, withStorageRocks ? true
}:
@ -155,7 +155,7 @@ server = stdenv.mkDerivation (common // {
bzip2 lz4 lzo snappy xz zstd
libxml2 judy libevent cracklib
] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl
++ optionals withStorageMroonga [ kytea msgpack zeromq ]
++ optionals withStorageMroonga [ kytea libsodium msgpack zeromq ]
++ optional stdenv.hostPlatform.isLinux linux-pam
++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv;