mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-19 17:04:00 +00:00
Rename preserve_embedded_numbers to match_embedded_numbers, and fingerprint_md5 to match_md5_checksums. Add corresponding options to pt-fingerprint.
This commit is contained in:
@@ -177,12 +177,12 @@ sub fingerprint {
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
|
||||
# MD5 checksums which are always 32 hex chars
|
||||
if ( $self->{fingerprint_md5} ) {
|
||||
if ( $self->{match_md5_checksums} ) {
|
||||
$query =~ s/([._-])[a-f0-9]{32}/$1?/g;
|
||||
}
|
||||
|
||||
# Things resembling numbers/hex.
|
||||
if ( !$self->{preserve_embedded_numbers} ) {
|
||||
if ( !$self->{match_embedded_numbers} ) {
|
||||
# For speed, this regex is extremely broad in its definition
|
||||
# of what looks like a number.
|
||||
$query =~ s/[0-9+-][0-9a-f.xb+-]*/?/g;
|
||||
@@ -192,7 +192,7 @@ sub fingerprint {
|
||||
}
|
||||
|
||||
# Clean up leftovers
|
||||
if ( $self->{fingerprint_md5} ) {
|
||||
if ( $self->{match_md5_checksums} ) {
|
||||
$query =~ s/[xb+-]\?/?/g;
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user