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
8c80289a
Commit
8c80289a
authored
Feb 16, 2001
by
jcole@tetra.spaceapes.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COM_TABLE_DUMP and COM_BINLOG_DUMP are no longer erroneously logged
to the slow query log.
parent
8a0516ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
sql/sql_parse.cc
sql/sql_parse.cc
+10
-3
No files found.
BitKeeper/etc/logging_ok
View file @
8c80289a
mwagner@evoq.mwagner.org
mwagner@evoq.mwagner.org
tfr@coyote.emotion.ee
tfr@coyote.emotion.ee
jcole@tetra.spaceapes.com
sql/sql_parse.cc
View file @
8c80289a
...
@@ -561,6 +561,9 @@ bool do_command(THD *thd)
...
@@ -561,6 +561,9 @@ bool do_command(THD *thd)
bool
error
=
0
;
bool
error
=
0
;
NET
*
net
;
NET
*
net
;
enum
enum_server_command
command
;
enum
enum_server_command
command
;
// commands which will always take a long time should be marked with
// this so that they will not get logged to the slow query log
bool
slow_command
=
FALSE
;
DBUG_ENTER
(
"do_command"
);
DBUG_ENTER
(
"do_command"
);
net
=
&
thd
->
net
;
net
=
&
thd
->
net
;
...
@@ -604,6 +607,7 @@ bool do_command(THD *thd)
...
@@ -604,6 +607,7 @@ bool do_command(THD *thd)
break
;
break
;
case
COM_TABLE_DUMP
:
case
COM_TABLE_DUMP
:
{
{
slow_command
=
TRUE
;
char
*
data
=
packet
+
1
;
char
*
data
=
packet
+
1
;
uint
db_len
=
*
data
;
uint
db_len
=
*
data
;
uint
tbl_len
=
*
(
data
+
db_len
+
1
);
uint
tbl_len
=
*
(
data
+
db_len
+
1
);
...
@@ -744,6 +748,7 @@ bool do_command(THD *thd)
...
@@ -744,6 +748,7 @@ bool do_command(THD *thd)
}
}
case
COM_BINLOG_DUMP
:
case
COM_BINLOG_DUMP
:
{
{
slow_command
=
TRUE
;
if
(
check_access
(
thd
,
FILE_ACL
,
any_db
))
if
(
check_access
(
thd
,
FILE_ACL
,
any_db
))
break
;
break
;
mysql_log
.
write
(
thd
,
command
,
0
);
mysql_log
.
write
(
thd
,
command
,
0
);
...
@@ -848,16 +853,18 @@ bool do_command(THD *thd)
...
@@ -848,16 +853,18 @@ bool do_command(THD *thd)
thd
->
proc_info
=
"closing tables"
;
thd
->
proc_info
=
"closing tables"
;
close_thread_tables
(
thd
);
/* Free tables */
close_thread_tables
(
thd
);
/* Free tables */
}
}
thd
->
proc_info
=
"cleaning up"
;
if
(
thd
->
fatal_error
)
if
(
thd
->
fatal_error
)
send_error
(
net
,
0
);
// End of memory ?
send_error
(
net
,
0
);
// End of memory ?
time_t
start_of_query
=
thd
->
start_time
;
time_t
start_of_query
=
thd
->
start_time
;
thd
->
end_time
();
// Set start time
thd
->
end_time
();
// Set start time
/* If not reading from backup and if the query took too long */
/* If not reading from backup and if the query took too long */
if
(
!
thd
->
user_time
)
if
(
!
slow_command
&&
!
thd
->
user_time
)
// do not log 'slow_command' queries
{
{
thd
->
proc_info
=
"logging slow query"
;
if
((
ulong
)
(
thd
->
start_time
-
thd
->
time_after_lock
)
>
long_query_time
||
if
((
ulong
)
(
thd
->
start_time
-
thd
->
time_after_lock
)
>
long_query_time
||
((
thd
->
lex
.
options
&
((
thd
->
lex
.
options
&
(
QUERY_NO_INDEX_USED
|
QUERY_NO_GOOD_INDEX_USED
))
&&
(
QUERY_NO_INDEX_USED
|
QUERY_NO_GOOD_INDEX_USED
))
&&
...
@@ -867,7 +874,7 @@ bool do_command(THD *thd)
...
@@ -867,7 +874,7 @@ bool do_command(THD *thd)
mysql_slow_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
,
start_of_query
);
mysql_slow_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
,
start_of_query
);
}
}
}
}
thd
->
proc_info
=
"cleaning up
2
"
;
thd
->
proc_info
=
"cleaning up"
;
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
// For process list
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
// For process list
thd
->
proc_info
=
0
;
thd
->
proc_info
=
0
;
thd
->
command
=
COM_SLEEP
;
thd
->
command
=
COM_SLEEP
;
...
...
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