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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f33178b9
Commit
f33178b9
authored
May 08, 2013
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4206 : log all slow statements (do not use filters), if log_slow_filter is empty.
parent
e013bf9f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
mysql-test/r/log_slow.result
mysql-test/r/log_slow.result
+13
-0
mysql-test/t/log_slow.test
mysql-test/t/log_slow.test
+12
-1
sql/sql_parse.cc
sql/sql_parse.cc
+2
-1
No files found.
mysql-test/r/log_slow.result
View file @
f33178b9
...
...
@@ -56,5 +56,18 @@ insert_id int(11) NO NULL
server_id int(10) unsigned NO NULL
sql_text mediumtext NO NULL
flush slow logs;
set long_query_time=0.1;
set log_slow_filter='';
set global slow_query_log=1;
set global log_output='TABLE';
select sleep(0.5);
sleep(0.5)
0
select count(*) FROM mysql.slow_log;
count(*)
1
truncate mysql.slow_log;
set @@long_query_time=default;
set global slow_query_log=default;
set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
mysql-test/t/log_slow.test
View file @
f33178b9
...
...
@@ -42,7 +42,18 @@ show fields from mysql.slow_log;
flush
slow
logs
;
# Reset used variables
# MDEV-4206 (empty filter should be no filter)
set
long_query_time
=
0.1
;
set
log_slow_filter
=
''
;
set
global
slow_query_log
=
1
;
set
global
log_output
=
'TABLE'
;
select
sleep
(
0.5
);
select
count
(
*
)
FROM
mysql
.
slow_log
;
truncate
mysql
.
slow_log
;
# Reset used variables
set
@@
long_query_time
=
default
;
set
global
slow_query_log
=
default
;
set
@@
log_slow_filter
=
default
;
set
@@
log_slow_verbosity
=
default
;
sql/sql_parse.cc
View file @
f33178b9
...
...
@@ -1497,7 +1497,8 @@ void log_slow_statement(THD *thd)
/* Follow the slow log filter configuration. */
if
(
!
thd
->
enable_slow_log
||
!
(
thd
->
variables
.
log_slow_filter
&
thd
->
query_plan_flags
))
(
thd
->
variables
.
log_slow_filter
&&
!
(
thd
->
variables
.
log_slow_filter
&
thd
->
query_plan_flags
)))
DBUG_VOID_RETURN
;
if
(((
thd
->
server_status
&
SERVER_QUERY_WAS_SLOW
)
||
...
...
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