mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-05-02 01:01:09 +08:00
update-samples on pt-ms
This commit is contained in:
+19
-4
@@ -477,15 +477,30 @@ mysql_options() {
|
||||
MYSQL_ARGS="$MYSQL_ARGS --host=$OPT_HOST"
|
||||
fi
|
||||
if [ -n "$OPT_USER" ]; then
|
||||
MYSQL_ARGS="$MYSQL_ARGS --user='$OPT_USER'"
|
||||
MYSQL_ARGS="$MYSQL_ARGS --user=$OPT_USER"
|
||||
fi
|
||||
if [ -n "$OPT_PASSWORD" ]; then
|
||||
MYSQL_ARGS="$MYSQL_ARGS --password='$OPT_PASSWORD'"
|
||||
MYSQL_ARGS="$MYSQL_ARGS --password=$OPT_PASSWORD"
|
||||
fi
|
||||
|
||||
echo $MYSQL_ARGS
|
||||
}
|
||||
|
||||
arrange_mysql_options() {
|
||||
local opts="$1"
|
||||
|
||||
local rearranged=""
|
||||
for opt in $opts; do
|
||||
if [ "$(echo $opt | awk -F= '{print $1}')" = "--defaults-file" ]; then
|
||||
rearranged="$opt $rearranged"
|
||||
else
|
||||
rearranged="$rearranged $opt"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$rearranged"
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# End mysql_options package
|
||||
# ###########################################################################
|
||||
@@ -2229,7 +2244,7 @@ report_mysql_summary () {
|
||||
|| [ -e "$dir/mysqldump" -a -s "$dir/mysqldump" ]; then
|
||||
reply="y"
|
||||
elif [ -t 0 -a -t 1 ]; then
|
||||
printf "Would you like to mysqldump -d the schema and analyze it? y/n "
|
||||
echo -n "Would you like to mysqldump -d the schema and analyze it? y/n "
|
||||
read reply
|
||||
reply=${reply:-n}
|
||||
fi
|
||||
@@ -2237,7 +2252,7 @@ report_mysql_summary () {
|
||||
if [ -z "${OPT_DATABASES}" ] && [ -z "$OPT_READ_SAMPLES" ] \
|
||||
&& [ ! -e "$dir/mysqldump" ]; then
|
||||
echo "There are ${num_dbs} databases. Would you like to dump all, or just one?"
|
||||
printf "Type the name of the database, or press Enter to dump all of them. "
|
||||
echo -n "Type the name of the database, or press Enter to dump all of them. "
|
||||
local dbtodump=""
|
||||
read dbtodump
|
||||
local trg_arg="$( get_mysqldump_args "$dir/mysql-variables" )"
|
||||
|
||||
@@ -144,7 +144,7 @@ like(
|
||||
|
||||
cleanup();
|
||||
|
||||
$retval = system("$trunk/bin/pt-stalk --daemonize --pid $pid_file --log $log_file --dest $dest --verbose 3 -- --defaults-file=$cnf");
|
||||
$retval = system("$trunk/bin/pt-stalk --daemonize --pid $pid_file --log $log_file --variable Threads_running --dest $dest --verbose 3 -- --defaults-file=$cnf");
|
||||
|
||||
PerconaTest::wait_for_files($pid_file, $log_file);
|
||||
PerconaTest::wait_for_sh("grep -q 'Check results' $log_file >/dev/null");
|
||||
@@ -155,7 +155,7 @@ like(
|
||||
$output,
|
||||
qr/Check results: Threads_running=\d+, matched=no, cycles_true=0/,
|
||||
"Matching results logged with --verbose 3"
|
||||
) or diag(`cat $log_file 2>/dev/null`, `cat $dest/*-output 2>/dev/null`);
|
||||
) or diag(`cat $dest/*-output 2>/dev/null`);
|
||||
|
||||
# #############################################################################
|
||||
# --verbose 1 (just errors and warnings)
|
||||
|
||||
Reference in New Issue
Block a user