mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-18 02:06:49 +08:00
fixes pt-mysql-summary-fails-to-parse-wsrep_provider_options-1264580
This commit is contained in:
@@ -1353,26 +1353,19 @@ pretty_print_cnf_file () {
|
||||
|
||||
[ -e "$file" ] || return
|
||||
|
||||
awk '
|
||||
BEGIN {
|
||||
FS="="
|
||||
}
|
||||
/^[ \t]*[a-zA-Z[]/ {
|
||||
if (length($2)) {
|
||||
gsub(/^[ \t]*/, "", $1);
|
||||
gsub(/^[ \t]*/, "", $2);
|
||||
gsub(/[ \t]*$/, "", $1);
|
||||
gsub(/[ \t]*$/, "", $2);
|
||||
printf("%-35s = %s\n", $1, $2);
|
||||
}
|
||||
else if ( $0 ~ /\[/ ) {
|
||||
print "";
|
||||
print $1;
|
||||
}
|
||||
else {
|
||||
print $1;
|
||||
}
|
||||
}' "$file"
|
||||
perl -n -l -e '
|
||||
my $line = $_;
|
||||
if ( $line =~ /^[ \t]*[a-zA-Z[]/ ) {
|
||||
if ( $line=~/\s*(.*?)\s*=\s*(.*)\s*$/ ) {
|
||||
printf("%-35s = %s\n", $1, $2)
|
||||
}
|
||||
elsif ( $line =~ /\s*\[/ ) {
|
||||
print "\n$line"
|
||||
} else {
|
||||
print $line
|
||||
}
|
||||
}' "$file"
|
||||
|
||||
}
|
||||
|
||||
find_checkpoint_age() {
|
||||
|
||||
@@ -240,7 +240,7 @@ APP="${FORK:-"mysql"}"
|
||||
|
||||
if [ $type = "cluster" -o $APP = "pxc" ]; then
|
||||
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
|
||||
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user