mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 16:12:04 +00:00
PT-2340 - Support MySQL 8.4
- Fixed status check for 8.4 sandbox
- Removed option "reset" from the usage output, because option itself was removed by 92a36715c4
- Fixed sandbox/start-sandbox script, so it can start custom setups with 8.4
This commit is contained in:
@@ -247,7 +247,7 @@ make_sandbox() {
|
|||||||
# Sanity check the cmd line options.
|
# Sanity check the cmd line options.
|
||||||
# ###########################################################################
|
# ###########################################################################
|
||||||
if [ $# -lt 2 ]; then
|
if [ $# -lt 2 ]; then
|
||||||
die "Usage: start-sandbox source|replica|source-source port [source port]"
|
die "Usage: start-sandbox source|replica|source-source|cluster|channels port [source port]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
type=$1 # source, replica or source-source
|
type=$1 # source, replica or source-source
|
||||||
@@ -326,6 +326,15 @@ else
|
|||||||
minor_version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2,3 | cut -d- -f1`;
|
minor_version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2,3 | cut -d- -f1`;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SOURCE_NAME="master"
|
||||||
|
CHANGE_SOURCE_NAME="master"
|
||||||
|
REPLICA_NAME="slave"
|
||||||
|
if [ "$version" '>' "8.1" ] && [ "$APP" '!=' "mariadb" ]; then
|
||||||
|
SOURCE_NAME="source"
|
||||||
|
CHANGE_SOURCE_NAME="replication source"
|
||||||
|
REPLICA_NAME="replica"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/${APP#mysql}/$version" ]; then
|
if [ ! -d "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/${APP#mysql}/$version" ]; then
|
||||||
die "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/${APP#mysql}/$version does not exist."
|
die "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/${APP#mysql}/$version does not exist."
|
||||||
fi
|
fi
|
||||||
|
@@ -35,7 +35,7 @@ err() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
err "Usage: test-env start|stop|restart|status|checkconfig|reset|kill" \
|
err "Usage: test-env start|stop|restart|status|checkconfig|kill" \
|
||||||
"" \
|
"" \
|
||||||
" start Start test servers in ${TMP_DIR}/PORT" \
|
" start Start test servers in ${TMP_DIR}/PORT" \
|
||||||
" stop Stop test servers and remove all ${TMP_DIR}/PORT" \
|
" stop Stop test servers and remove all ${TMP_DIR}/PORT" \
|
||||||
@@ -43,7 +43,6 @@ usage() {
|
|||||||
" restart Stop and start test servers" \
|
" restart Stop and start test servers" \
|
||||||
" status Print status of test servers" \
|
" status Print status of test servers" \
|
||||||
" checkconfig Check test env and test servers" \
|
" checkconfig Check test env and test servers" \
|
||||||
" reset Reset test server binary logs" \
|
|
||||||
" version Print MySQL version of running test servers" \
|
" version Print MySQL version of running test servers" \
|
||||||
""
|
""
|
||||||
}
|
}
|
||||||
@@ -148,6 +147,8 @@ sandbox_status() {
|
|||||||
$PERCONA_TOOLKIT_SANDBOX/bin/mysqladmin --defaults-file="${TMP_DIR}/$port/my.sandbox.cnf" ping >/dev/null 2>&1
|
$PERCONA_TOOLKIT_SANDBOX/bin/mysqladmin --defaults-file="${TMP_DIR}/$port/my.sandbox.cnf" ping >/dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "yes"
|
echo "yes"
|
||||||
|
set_mysql_version
|
||||||
|
set_source_replica_names
|
||||||
|
|
||||||
if [ "$MYSQL_VERSION" '>' "4.1" ]; then
|
if [ "$MYSQL_VERSION" '>' "4.1" ]; then
|
||||||
echo -n " sakila db is loaded - "
|
echo -n " sakila db is loaded - "
|
||||||
@@ -257,9 +258,6 @@ set_source_replica_names() {
|
|||||||
CHANGE_SOURCE_NAME="replication source"
|
CHANGE_SOURCE_NAME="replication source"
|
||||||
REPLICA_NAME="replica"
|
REPLICA_NAME="replica"
|
||||||
fi
|
fi
|
||||||
export SOURCE_NAME
|
|
||||||
export CHANGE_SOURCE_NAME
|
|
||||||
export REPLICA_NAME
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_seq() {
|
_seq() {
|
||||||
|
Reference in New Issue
Block a user