From ba55f84b5da090a740ebcfe852f46d273e3c2fa4 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Mon, 30 Mar 2020 13:37:10 +0300 Subject: [PATCH 1/2] nixos/mysql: add test mariadb with tokudb plugin --- nixos/tests/mysql.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/nixos/tests/mysql.nix b/nixos/tests/mysql.nix index 84673181e1a4..df0730660b01 100644 --- a/nixos/tests/mysql.nix +++ b/nixos/tests/mysql.nix @@ -68,6 +68,11 @@ import ./make-test-python.nix ({ pkgs, ...} : { "testdb2.*" = "ALL PRIVILEGES"; }; }]; + services.mysql.settings = { + mysqld = { + plugin-load-add = [ "ha_tokudb.so" ]; + }; + }; services.mysql.package = pkgs.mariadb; }; @@ -106,5 +111,19 @@ import ./make-test-python.nix ({ pkgs, ...} : { mariadb.succeed( "echo 'use testdb; select test_id from tests;' | sudo -u testuser mysql -u testuser -N | grep 42" ) + + # Check if TokuDB plugin works + mariadb.succeed( + "echo 'use testdb; create table tokudb (test_id INT, PRIMARY KEY (test_id)) ENGINE = TokuDB;' | sudo -u testuser mysql -u testuser" + ) + mariadb.succeed( + "echo 'use testdb; insert into tokudb values (25);' | sudo -u testuser mysql -u testuser" + ) + mariadb.succeed( + "echo 'use testdb; select test_id from tokudb;' | sudo -u testuser mysql -u testuser -N | grep 25" + ) + mariadb.succeed( + "echo 'use testdb; drop table tokudb;' | sudo -u testuser mysql -u testuser" + ) ''; }) From 6af90a3df830d50527b3885318633a141435114f Mon Sep 17 00:00:00 2001 From: Izorkin Date: Tue, 31 Mar 2020 14:46:04 +0300 Subject: [PATCH 2/2] nixos/mysql: add test mariadb with rocksdb plugin --- nixos/tests/mysql.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/nixos/tests/mysql.nix b/nixos/tests/mysql.nix index df0730660b01..11c1dabf9360 100644 --- a/nixos/tests/mysql.nix +++ b/nixos/tests/mysql.nix @@ -70,7 +70,7 @@ import ./make-test-python.nix ({ pkgs, ...} : { }]; services.mysql.settings = { mysqld = { - plugin-load-add = [ "ha_tokudb.so" ]; + plugin-load-add = [ "ha_tokudb.so" "ha_rocksdb.so" ]; }; }; services.mysql.package = pkgs.mariadb; @@ -125,5 +125,19 @@ import ./make-test-python.nix ({ pkgs, ...} : { mariadb.succeed( "echo 'use testdb; drop table tokudb;' | 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" + ) + mariadb.succeed( + "echo 'use testdb; insert into rocksdb values (28);' | sudo -u testuser mysql -u testuser" + ) + mariadb.succeed( + "echo 'use testdb; select test_id from rocksdb;' | sudo -u testuser mysql -u testuser -N | grep 28" + ) + mariadb.succeed( + "echo 'use testdb; drop table rocksdb;' | sudo -u testuser mysql -u testuser" + ) ''; })