mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
9a8b1f2ac4
- Do not suppress mysql_install_db.exe output in case of error - Add --verbose-bootstrap to get errors coming from mysqld --boostrap
50 lines
1.4 KiB
Text
50 lines
1.4 KiB
Text
--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 --password=foo -R;
|
|
|
|
--source include/kill_mysqld.inc
|
|
let $restart_parameters=--datadir=$ddir --loose-innodb;
|
|
--source include/start_mysqld.inc
|
|
|
|
connect root,localhost,root,foo;
|
|
# 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;
|
|
|
|
# MDEV-23052
|
|
# 1. mysql_install_db works on existing, empty directory
|
|
mkdir $ddir;
|
|
disable_result_log;
|
|
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R --verbose-bootstrap;
|
|
enable_result_log;
|
|
rmdir $ddir;
|
|
|
|
# 2. mysql_install_db rejects existing, non-empty directory, and does not
|
|
# remove it.
|
|
mkdir $ddir;
|
|
write_file $ddir/1;
|
|
EOF
|
|
|
|
error 1;
|
|
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R > $MYSQLTEST_VARDIR/tmp/install.log 2>&1;
|
|
list_files $ddir;
|
|
let $log=$MYSQLTEST_VARDIR/tmp/install.log;
|
|
let SEARCH_FILE=$log;
|
|
let SEARCH_PATTERN=is not empty. Only new or empty existing directories are accepted for --datadir;
|
|
--source include/search_pattern_in_file.inc
|
|
remove_file $log;
|
|
|
|
rmdir $ddir;
|
|
|
|
let $restart_parameters=;
|
|
connection default;
|
|
--source include/start_mysqld.inc
|
|
|