mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Windows : create a minimalistic MTR test for mysql_install_db.exe
only --datadir option is tested in this test. Other options (notably --password and --service) would need another, more comprehensive test.
This commit is contained in:
10
mysql-test/main/mysql_install_db_win.result
Normal file
10
mysql-test/main/mysql_install_db_win.result
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Kill the server
|
||||||
|
Running bootstrap
|
||||||
|
Removing default user
|
||||||
|
Creating my.ini file
|
||||||
|
Creation of the database was successful
|
||||||
|
my.ini
|
||||||
|
SELECT @@datadir;
|
||||||
|
@@datadir
|
||||||
|
DATADIR/
|
||||||
|
# Kill the server
|
22
mysql-test/main/mysql_install_db_win.test
Normal file
22
mysql-test/main/mysql_install_db_win.test
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--source include/windows.inc
|
||||||
|
|
||||||
|
# Create database in tmp directory using mysql_install_db.exe,
|
||||||
|
# and start server from this directory.
|
||||||
|
let $ddir= $MYSQLTEST_VARDIR/tmp/ddir;
|
||||||
|
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir;
|
||||||
|
|
||||||
|
--source include/kill_mysqld.inc
|
||||||
|
let $restart_parameters=--datadir=$ddir --loose-innodb;
|
||||||
|
--source include/start_mysqld.inc
|
||||||
|
|
||||||
|
# Smoke test - check that we're actually using datadir
|
||||||
|
# we've created (i.e restart_parameters worked)
|
||||||
|
--replace_result $ddir DATADIR
|
||||||
|
SELECT @@datadir;
|
||||||
|
|
||||||
|
# restart in the original datadir again
|
||||||
|
--source include/kill_mysqld.inc
|
||||||
|
rmdir $ddir;
|
||||||
|
let $restart_parameters=;
|
||||||
|
--source include/start_mysqld.inc
|
||||||
|
|
@ -2292,6 +2292,10 @@ sub environment_setup {
|
|||||||
$ENV{'EXE_MYSQL'}= $exe_mysql;
|
$ENV{'EXE_MYSQL'}= $exe_mysql;
|
||||||
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
|
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
|
||||||
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
|
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
|
||||||
|
if(IS_WINDOWS)
|
||||||
|
{
|
||||||
|
$ENV{'MYSQL_INSTALL_DB_EXE'}= mtr_exe_exists("$bindir/sql$opt_vs_config/mysql_install_db");
|
||||||
|
}
|
||||||
|
|
||||||
my $client_config_exe=
|
my $client_config_exe=
|
||||||
mtr_exe_maybe_exists(
|
mtr_exe_maybe_exists(
|
||||||
|
@ -198,7 +198,7 @@ int main(int argc, char **argv)
|
|||||||
die("database creation failed");
|
die("database creation failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Creation of the database was successful");
|
printf("Creation of the database was successful\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user