diff options
author | monty@hundin.mysql.fi <> | 2002-03-12 11:52:41 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-03-12 11:52:41 +0200 |
commit | 8eadb024dcf60ad16c9d9246a9f8cdfeeaa501e9 (patch) | |
tree | cc5ddb707fd6b0aa9b53c89ae0d0fc731486fef9 /scripts/mysqldumpslow.sh | |
parent | c4b8c1b6c053a51d5c4187145741dda5ea20715a (diff) | |
download | mariadb-git-8eadb024dcf60ad16c9d9246a9f8cdfeeaa501e9.tar.gz |
Fixed mysqldumpslow for new dump format.
Fix for HEAP tables with many rows deleted.
Add '' arround database names in SHOW GRANT
Diffstat (limited to 'scripts/mysqldumpslow.sh')
-rw-r--r-- | scripts/mysqldumpslow.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh index 856c8a09b5e..e8f73c25b55 100644 --- a/scripts/mysqldumpslow.sh +++ b/scripts/mysqldumpslow.sh @@ -75,7 +75,7 @@ while ( defined($_ = shift @pending) or defined($_ = <>) ) { s/^#? Time: \d{6}\s+\d+:\d+:\d+.*\n//; my ($user,$host) = s/^#? User\@Host:\s+(\S+)\s+\@\s+(\S+).*\n// ? ($1,$2) : ('',''); - s/^# Time: (\d+) Lock_time: (\d+) Rows_sent: (\d+).*\n//; + s/^# Query_time: (\d+) Lock_time: (\d+) Rows_sent: (\d+).*\n//; my ($t, $l, $r) = ($1, $2, $3); $t -= $l unless $opt{l}; @@ -96,8 +96,12 @@ 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; + s/(\\')//g; + 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 |