Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ef63b4c0
Commit
ef63b4c0
authored
Mar 26, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed myslqdumpslow for new log format.
scripts/mysqldumpslow.sh: Fix for new slow log format
parent
e2255e84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
scripts/mysqldumpslow.sh
scripts/mysqldumpslow.sh
+7
-3
No files found.
scripts/mysqldumpslow.sh
View file @
ef63b4c0
...
...
@@ -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/^#
T
ime:
(
\d
+
)
Lock_time:
(
\d
+
)
Rows_sent:
(
\d
+
)
.
*
\n
//
;
s/^#
Query_t
ime:
(
\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/
\b
0x[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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment