This commit is contained in:
Carlos Salguero
2018-01-09 16:19:05 -03:00
parent 42a5e91cb7
commit 4b563ef714
8 changed files with 702 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ sandbox_is_alive() {
# only alive when it responds to queries.
$BASEDIR/bin/mysqladmin --defaults-file="/tmp/PORT/my.sandbox.cnf" ping >/dev/null 2>&1
[ $? -eq 0 ] || return 1
echo "return 0"
return 0
}
@@ -49,9 +50,17 @@ echo -n "Starting MySQL test server on port PORT... "
# Start MySQL.
cwd=$PWD
cd $BASEDIR
$BASEDIR/MYSQLD --defaults-file=/tmp/PORT/my.sandbox.cnf > /dev/null 2>&1 &
init_file="/tmp/PORT/mysql-init"
if [ -e $init_file ]; then
$BASEDIR/MYSQLD --defaults-file=/tmp/PORT/my.sandbox.cnf -u root --init-file $init_file &
else
$BASEDIR/MYSQLD --defaults-file=/tmp/PORT/my.sandbox.cnf > /dev/null 2>&1 &
fi
cd $PWD
sleep 5
# Wait for MySQL to actually be up, i.e. to respond to queries.
for i in $(_seq 60); do
if sandbox_is_alive; then