mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed handling of strings in mysqldumpslow
scripts/mysqldumpslow.sh: Handling of strings with \ and double '' sql/mysqlbinlog.cc: Fixed type
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
# Original version by Tim Bunce, sometime in 2000.
|
# Original version by Tim Bunce, sometime in 2000.
|
||||||
# Further changes by Tim Bunce, 8th March 2001.
|
# Further changes by Tim Bunce, 8th March 2001.
|
||||||
|
# Handling of strings with \ and double '' by Monty 11 Aug 2001.
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
@ -95,8 +96,8 @@ while ( defined($_ = shift @pending) or defined($_ = <>) ) {
|
|||||||
unless ($opt{a}) {
|
unless ($opt{a}) {
|
||||||
s/\b\d+\b/N/g;
|
s/\b\d+\b/N/g;
|
||||||
s/\b0x[0-9A-Fa-f]+\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
|
# -n=8: turn log_20001231 into log_NNNNNNNN
|
||||||
s/([a-z_]+)(\d{$opt{n},})/$1.('N' x length($2))/ieg if $opt{n};
|
s/([a-z_]+)(\d{$opt{n},})/$1.('N' x length($2))/ieg if $opt{n};
|
||||||
# abbreviate massive "in (...)" statements and similar
|
# abbreviate massive "in (...)" statements and similar
|
||||||
|
@ -108,7 +108,7 @@ static void die(const char* fmt, ...)
|
|||||||
|
|
||||||
static void print_version()
|
static void print_version()
|
||||||
{
|
{
|
||||||
printf("%s Ver 1.4 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
|
printf("%s Ver 1.5 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ the mysql command line client\n\n");
|
|||||||
-o, --offset=N Skip the first N entries\n\
|
-o, --offset=N Skip the first N entries\n\
|
||||||
-h, --host=server Get the binlog from server\n\
|
-h, --host=server Get the binlog from server\n\
|
||||||
-P, --port=port Use port to connect to the remote server\n\
|
-P, --port=port Use port to connect to the remote server\n\
|
||||||
-u, --user=username Connect to the remove server as username\n\
|
-u, --user=username Connect to the remote server as username\n\
|
||||||
-p, --password=password Password to connect to remote server\n\
|
-p, --password=password Password to connect to remote server\n\
|
||||||
-r, --result-file=file Direct output to a given file\n\
|
-r, --result-file=file Direct output to a given file\n\
|
||||||
-j, --position=N Start reading the binlog at position N\n\
|
-j, --position=N Start reading the binlog at position N\n\
|
||||||
|
Reference in New Issue
Block a user