mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fixed mysqldumpslow for new dump format.
Fix for HEAP tables with many rows deleted. Add '' arround database names in SHOW GRANT Docs/manual.texi: Fixed symlink examples. heap/hp_rfirst.c: Remove not needed patch. mysql-test/r/heap.result: Added test case for HEAP + many deletes mysql-test/t/heap.test: Added test case for HEAP + many deletes mysys/mf_loadpath.c: Resolve path's even if they don't end in '/' scripts/mysqldumpslow.sh: Fix for new dump format. sql/handler.cc: Fix for HEAP tables with many rows deleted. sql/sql_acl.cc: Add '' arround database names in SHOW GRANT
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user