mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
WIP
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user