nixos/mysql: add test mariadb with tokudb plugin
This commit is contained in:
parent
ff7f730b87
commit
ba55f84b5d
1 changed files with 19 additions and 0 deletions
|
@ -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"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue