mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
updated module and tests for issue - 1264580
This commit is contained in:
@@ -345,37 +345,28 @@ summarize_processlist () {
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pretty-prints the my.cnf file. It's super annoying, but some *modern*
|
# Pretty-prints the my.cnf file.
|
||||||
# versions of awk don't support POSIX character sets in regular
|
|
||||||
# expressions, like [[:space:]] (looking at you, Debian). So
|
|
||||||
# the below patterns contain [<space><tab>] and must remain that way.
|
|
||||||
pretty_print_cnf_file () {
|
pretty_print_cnf_file () {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
|
|
||||||
[ -e "$file" ] || return
|
[ -e "$file" ] || return
|
||||||
|
|
||||||
awk '
|
perl -n -l -e '
|
||||||
BEGIN {
|
my $line = $_;
|
||||||
FS="="
|
if ( $line =~ /^\s*[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() {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
awk '
|
awk '
|
||||||
|
@@ -172,6 +172,7 @@ innodb_file_per_table = 1
|
|||||||
ssl = 1
|
ssl = 1
|
||||||
server-id = 1
|
server-id = 1
|
||||||
log-bin = sl1-bin
|
log-bin = sl1-bin
|
||||||
|
wsrep_provider_options = "gcache.size=64M;base_host=10.1.2.102; base_port=4567; cert.log_conflicts=no;etc=etc;"
|
||||||
|
|
||||||
[mysql.server]
|
[mysql.server]
|
||||||
user = mysql
|
user = mysql
|
||||||
|
@@ -24,6 +24,8 @@ ssl = 1
|
|||||||
server-id = 1
|
server-id = 1
|
||||||
log-bin=sl1-bin
|
log-bin=sl1-bin
|
||||||
|
|
||||||
|
wsrep_provider_options = "gcache.size=64M;base_host=10.1.2.102; base_port=4567; cert.log_conflicts=no;etc=etc;"
|
||||||
|
|
||||||
[mysql.server]
|
[mysql.server]
|
||||||
user=mysql
|
user=mysql
|
||||||
####basedir=/var/lib
|
####basedir=/var/lib
|
||||||
|
Reference in New Issue
Block a user