Fix for bug 889739: pt-config-diff doesn't diff quoted strings properly

This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-07-30 11:50:42 -03:00
parent 2f0812fb33
commit 4c5678876d
3 changed files with 40 additions and 2 deletions

View File

@@ -371,6 +371,13 @@ sub _parse_varvals {
$val = '';
}
else {
$val =~ s/
\A # Start of value
(['"]) # Opening quote
(.*) # Value
\1 # Closing quote
[\n\r]*\z # End of value
/$2/x;
if ( my ($num, $factor) = $val =~ m/(\d+)([KMGT])b?$/i ) {
# value is a size like 1k, 16M, etc.
my %factor_for = (