mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-16 01:00:38 +08:00
Fix a bazillion tests with ANSI sql_mode, and get rid of a bunch of MySQLDump usage.
This commit is contained in:
16
bin/pt-stalk
16
bin/pt-stalk
@@ -18,6 +18,8 @@ set -u
|
||||
|
||||
set -u
|
||||
|
||||
PTFUNCNAME=""
|
||||
PTDEBUG="${PTDEBUG:-""}"
|
||||
EXIT_STATUS=0
|
||||
|
||||
log() {
|
||||
@@ -35,6 +37,10 @@ die() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
_d () {
|
||||
[ "$PTDEBUG" ] && echo "# $PTFUNCNAME: $(log "$*")" >&2
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
# End log_warn_die package
|
||||
# ###########################################################################
|
||||
@@ -486,8 +492,16 @@ _lsof() {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
_which() {
|
||||
[ -x /usr/bin/which ] && /usr/bin/which "$1" 2>/dev/null | awk '{print $1}'
|
||||
if [ -x /usr/bin/which ]; then
|
||||
/usr/bin/which "$1" 2>/dev/null | awk '{print $1}'
|
||||
elif which which 1>/dev/null 2>&1; then
|
||||
which "$1" 2>/dev/null | awk '{print $1}'
|
||||
else
|
||||
echo "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
# ###########################################################################
|
||||
|
||||
Reference in New Issue
Block a user