mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-28 08:51:44 +00:00
PT-1900 pt-query-digest not hiding parameter properly sometimes when parameter=binary (#510)
* PT-1900 WIP * Fixed quoted strings regexes * PT-1900 Fixed query rewriter to properly handle quoted text * Fixed merge conflicts with 3.x branch
This commit is contained in:
@@ -2946,9 +2946,13 @@ sub fingerprint {
|
||||
$query =~ s/\Ause \S+\Z/use ?/i # Abstract the DB in USE
|
||||
&& return $query;
|
||||
|
||||
$query =~ s/\\["']//g; # quoted strings
|
||||
$query =~ s/".*?"/?/sg; # quoted strings
|
||||
$query =~ s/'.*?'/?/sg; # quoted strings
|
||||
$query =~ s/([^\\])(\\')/$1/sg;
|
||||
$query =~ s/([^\\])(\\")/$1/sg;
|
||||
$query =~ s/\\\\//sg;
|
||||
$query =~ s/\\'//sg;
|
||||
$query =~ s/\\"//sg;
|
||||
$query =~ s/([^\\])(".*?[^\\]?")/$1?/sg;
|
||||
$query =~ s/([^\\])('.*?[^\\]?')/$1?/sg;
|
||||
|
||||
$query =~ s/\bfalse\b|\btrue\b/?/isg; # boolean values
|
||||
|
||||
|
Reference in New Issue
Block a user