mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-17 01:01:39 +08:00
Quote vars in trg_processlist().
This commit is contained in:
11
bin/pt-stalk
11
bin/pt-stalk
@@ -932,7 +932,7 @@ grep_processlist() {
|
|||||||
exit 0
|
exit 0
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
" $file
|
" "$file"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_trg_func() {
|
set_trg_func() {
|
||||||
@@ -963,11 +963,10 @@ trg_status() {
|
|||||||
trg_processlist() {
|
trg_processlist() {
|
||||||
local var="$1"
|
local var="$1"
|
||||||
local tmpfile="$TMPDIR/processlist"
|
local tmpfile="$TMPDIR/processlist"
|
||||||
mysqladmin $EXT_ARGV processlist > $tmpfile-1
|
mysqladmin $EXT_ARGV processlist > "$tmpfile-1"
|
||||||
grep_processlist $tmpfile-1 $var $OPT_MATCH 0 0 > $tmpfile-2
|
grep_processlist "$tmpfile-1" "$var" "$OPT_MATCH" 0 0 > "$tmpfile-2"
|
||||||
wc -l $tmpfile-2 | awk '{print $1}'
|
wc -l "$tmpfile-2" | awk '{print $1}'
|
||||||
rm -rf $tmpfile*
|
rm -f "$tmpfile"*
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oktorun() {
|
oktorun() {
|
||||||
|
|||||||
Reference in New Issue
Block a user