mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-17 17:27:57 +00:00
Updated MySQLConfigComparer.pm so now it can honor case insensitivity. cnf1 and cnf2 are test files.
This commit is contained in:
@@ -3633,6 +3633,7 @@ sub diff {
|
||||
next CONFIG if $val0 == $valN;
|
||||
}
|
||||
else {
|
||||
|
||||
next CONFIG if $ignore_case
|
||||
? lc($val0) eq lc($valN)
|
||||
: $val0 eq $valN;
|
||||
@@ -3695,7 +3696,7 @@ sub _normalize_value {
|
||||
my ($val, $is_dir, $base_path) = @args{qw(value is_directory base_path)};
|
||||
|
||||
$val = defined $val ? $val : '';
|
||||
$val = $alt_val_for{$val} if exists $alt_val_for{$val};
|
||||
$val = $alt_val_for{lc($val)} if exists $alt_val_for{lc($val)};
|
||||
|
||||
if ( $val ) {
|
||||
if ( $is_dir ) {
|
||||
|
@@ -202,6 +202,7 @@ sub diff {
|
||||
next CONFIG if $val0 == $valN;
|
||||
}
|
||||
else {
|
||||
|
||||
next CONFIG if $ignore_case
|
||||
? lc($val0) eq lc($valN)
|
||||
: $val0 eq $valN;
|
||||
@@ -293,7 +294,7 @@ sub _normalize_value {
|
||||
my ($val, $is_dir, $base_path) = @args{qw(value is_directory base_path)};
|
||||
|
||||
$val = defined $val ? $val : '';
|
||||
$val = $alt_val_for{$val} if exists $alt_val_for{$val};
|
||||
$val = $alt_val_for{lc($val)} if exists $alt_val_for{lc($val)};
|
||||
|
||||
if ( $val ) {
|
||||
if ( $is_dir ) {
|
||||
|
9
t/pt-config-diff/samples/cnf1
Normal file
9
t/pt-config-diff/samples/cnf1
Normal file
@@ -0,0 +1,9 @@
|
||||
[mysqld]
|
||||
log_bin=1
|
||||
gtid_mode=on
|
||||
read_only=off
|
||||
autocommit=yes
|
||||
autocommit=no
|
||||
binlog_format=mixed
|
||||
skip_name_resolve=true
|
||||
skip_name_resolve=false
|
9
t/pt-config-diff/samples/cnf2
Normal file
9
t/pt-config-diff/samples/cnf2
Normal file
@@ -0,0 +1,9 @@
|
||||
[mysqld]
|
||||
LOGBIN=1
|
||||
gtid_mode=ON
|
||||
read_only=OFF
|
||||
autocommit=YES
|
||||
autocommit=NO
|
||||
binlog_format=MIXED
|
||||
skip_name_resolve=TRUE
|
||||
skip_name_resolve=FALSE
|
Reference in New Issue
Block a user