Commit 50c850c9 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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.
parent f77895eb
# 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
--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{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
$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=
mtr_exe_maybe_exists(
......
......@@ -198,7 +198,7 @@ int main(int argc, char **argv)
die("database creation failed");
}
printf("Creation of the database was successful");
printf("Creation of the database was successful\n");
return 0;
}
......
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