fixes pt-mysql-summary-fails-to-parse-wsrep_provider_options-1264580

This commit is contained in:
Frank Cizmich
2014-09-03 13:25:38 -03:00
parent f0a0a8f737
commit 58006a38db
2 changed files with 14 additions and 21 deletions

View File

@@ -1353,26 +1353,19 @@ pretty_print_cnf_file () {
[ -e "$file" ] || return [ -e "$file" ] || return
awk ' perl -n -l -e '
BEGIN { my $line = $_;
FS="=" if ( $line =~ /^[ \t]*[a-zA-Z[]/ ) {
} if ( $line=~/\s*(.*?)\s*=\s*(.*)\s*$/ ) {
/^[ \t]*[a-zA-Z[]/ { printf("%-35s = %s\n", $1, $2)
if (length($2)) { }
gsub(/^[ \t]*/, "", $1); elsif ( $line =~ /\s*\[/ ) {
gsub(/^[ \t]*/, "", $2); print "\n$line"
gsub(/[ \t]*$/, "", $1); } else {
gsub(/[ \t]*$/, "", $2); print $line
printf("%-35s = %s\n", $1, $2); }
} }' "$file"
else if ( $0 ~ /\[/ ) {
print "";
print $1;
}
else {
print $1;
}
}' "$file"
} }
find_checkpoint_age() { find_checkpoint_age() {

View File

@@ -240,7 +240,7 @@ APP="${FORK:-"mysql"}"
if [ $type = "cluster" -o $APP = "pxc" ]; then if [ $type = "cluster" -o $APP = "pxc" ]; then
ip=$(perl -MNet::Address::IP::Local -le 'print Net::Address::IP::Local->public') ip=$(perl -MNet::Address::IP::Local -le 'print Net::Address::IP::Local->public')
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V --bind-address $ip 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`; version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V --query_cache_size=0 --query_cache_type=0 --bind-address $ip 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
else else
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`; version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
fi fi