diff options
author | unknown <monty@hundin.mysql.fi> | 2001-08-11 01:42:34 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-08-11 01:42:34 +0300 |
commit | 49a3cea4e09a14bc0c198d6acfc3316a4957dd23 (patch) | |
tree | cccf6b1dc41e678eddad6f48981bf82d6b935148 /scripts/mysqldumpslow.sh | |
parent | 1ddd584a23bac9ab78933113f16eb8bf4dc589e0 (diff) | |
download | mariadb-git-49a3cea4e09a14bc0c198d6acfc3316a4957dd23.tar.gz |
Fixed handling of strings in mysqldumpslow
scripts/mysqldumpslow.sh:
Handling of strings with \ and double ''
sql/mysqlbinlog.cc:
Fixed type
Diffstat (limited to 'scripts/mysqldumpslow.sh')
-rw-r--r-- | scripts/mysqldumpslow.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh index 02b5d5cd0cd..856c8a09b5e 100644 --- a/scripts/mysqldumpslow.sh +++ b/scripts/mysqldumpslow.sh @@ -3,6 +3,7 @@ # Original version by Tim Bunce, sometime in 2000. # Further changes by Tim Bunce, 8th March 2001. +# Handling of strings with \ and double '' by Monty 11 Aug 2001. use strict; use Getopt::Long; @@ -95,8 +96,8 @@ while ( defined($_ = shift @pending) or defined($_ = <>) ) { unless ($opt{a}) { s/\b\d+\b/N/g; s/\b0x[0-9A-Fa-f]+\b/N/g; - s/'.*?'/'S'/g; - s/".*?"/"S"/g; + s/'([^\\\']|\\.|\'\')+'/'S'/g; + s/"([^\\\"]|\\.|\"\")+"/"S"/g; # -n=8: turn log_20001231 into log_NNNNNNNN s/([a-z_]+)(\d{$opt{n},})/$1.('N' x length($2))/ieg if $opt{n}; # abbreviate massive "in (...)" statements and similar |