mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 02:34:19 +00:00
Make start-sandbox sed -e MYSQLD in the start script in case mysqld isn't in basedir/bin.
This commit is contained in:
@@ -49,7 +49,7 @@ echo -n "Starting MySQL test server on port PORT... "
|
||||
# Start MySQL.
|
||||
cwd=$PWD
|
||||
cd $BASEDIR
|
||||
$BASEDIR/bin/mysqld --defaults-file=/tmp/PORT/my.sandbox.cnf > /dev/null 2>&1 &
|
||||
$BASEDIR/MYSQLD --defaults-file=/tmp/PORT/my.sandbox.cnf > /dev/null 2>&1 &
|
||||
cd $PWD
|
||||
|
||||
# Wait for MySQL to actually be up, i.e. to respond to queries.
|
||||
|
@@ -66,6 +66,7 @@ make_sandbox() {
|
||||
sed -e "s/PORT/$port/g" -i.bak $file
|
||||
# Use ! instead of / because the replacment has / (it's a directory)
|
||||
sed -e "s!PERCONA_TOOLKIT_SANDBOX!$PERCONA_TOOLKIT_SANDBOX!g" -i.bak $file
|
||||
sed -e "s!MYSQLD!$mysqld!g" -i.bak $file
|
||||
done
|
||||
rm /tmp/$port/*.bak >/dev/null 2>&1
|
||||
|
||||
@@ -186,15 +187,15 @@ fi
|
||||
# Get server version.
|
||||
# ###########################################################################
|
||||
if [ -x "$PERCONA_TOOLKIT_SANDBOX/bin/mysqld" ]; then
|
||||
mysqld="$PERCONA_TOOLKIT_SANDBOX/bin/mysqld"
|
||||
elif [ -x "$PERCONA_TOOLKIT_SANDBOX/sbin/mysqld" ]; then
|
||||
mysqld="$PERCONA_TOOLKIT_SANDBOX/sbin/mysqld"
|
||||
elif [ -x "$PERCONA_TOOLKIT_SANDBOX/libexec/mysqld" ]; then
|
||||
mysqld="$PERCONA_TOOLKIT_SANDBOX/libexec/mysqld"
|
||||
mysqld="bin/mysqld"
|
||||
elif [ -x "sbin/mysqld" ]; then
|
||||
mysqld="sbin/mysqld"
|
||||
elif [ -x "libexec/mysqld" ]; then
|
||||
mysqld="libexec/mysqld"
|
||||
else
|
||||
die "Cannot find executable mysqld in $PERCONA_TOOLKIT_SANDBOX/bin, $PERCONA_TOOLKIT_SANDBOX/sbin or $PERCONA_TOOLKIT_SANDBOX/libexec."
|
||||
fi
|
||||
version=`$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
|
||||
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
|
||||
if [ ! -d "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/$version" ]; then
|
||||
die "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/$version does not exist."
|
||||
fi
|
||||
|
Reference in New Issue
Block a user