fix some problems that happen when there are many mysqld instances

This commit is contained in:
Baron Schwartz
2012-06-03 20:53:57 -04:00
parent da86c409da
commit 48f642551e
2 changed files with 4 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ collect_mysqld_instances () {
echo "internal::oom_of_$pid $oom" >> "$variables_file"
done
pids="$pids"
pids="$(echo $pids | sed -e 's/ /,/g')"
ps ww -p "$pids" 2>/dev/null
else

View File

@@ -31,7 +31,9 @@ file_count=$(ls "$p" | wc -l)
is $file_count 14 "Creates the correct number of files (without --databases)"
awk '{print $1}' "$p/mysqld-instances" > "$TMPDIR/collect_mysqld_instances1.test"
ps ww -p "$(_pidof mysqld | sed -e "s/ /,/g")" | awk '{print $1}' > "$TMPDIR/collect_mysqld_instances2.test"
pids="$(_pidof mysqld)"
pids="$(echo $pids | sed -e "s/[ \n]/,/g")"
ps ww -p "$pids" | awk '{print $1}' > "$TMPDIR/collect_mysqld_instances2.test"
no_diff \
"$TMPDIR/collect_mysqld_instances1.test" \