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
f97f6955
Commit
f97f6955
authored
Dec 14, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.3 into 10.4
parents
87eccd78
697dbd15
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
6 deletions
+43
-6
mysql-test/main/log_slow.result
mysql-test/main/log_slow.result
+20
-2
mysql-test/main/log_slow.test
mysql-test/main/log_slow.test
+19
-2
scripts/mysql_install_db.sh
scripts/mysql_install_db.sh
+3
-1
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/main/log_slow.result
View file @
f97f6955
...
...
@@ -64,7 +64,7 @@ rows_affected int(11) NO NULL
flush slow logs;
set long_query_time=0.1;
set log_slow_filter='';
set
global
slow_query_log=1;
set slow_query_log=1;
set global log_output='TABLE';
select sleep(0.5);
sleep(0.5)
...
...
@@ -73,7 +73,7 @@ select count(*) FROM mysql.slow_log;
count(*)
1
set @@long_query_time=default;
set
global slow_query_log= @org_slow_query_log
;
set
@@slow_query_log=default
;
set @@log_slow_filter=default;
set @@log_slow_verbosity=default;
set global log_output= default;
...
...
@@ -115,3 +115,21 @@ Slow_queries_increment
SET log_slow_filter=DEFAULT;
SET @@long_query_time=default;
SET GLOBAL slow_query_log= @org_slow_query_log;
#
# MDEV-21187: log_slow_filter="" logs queries not using indexes
#
flush status;
create table t (id int);
insert into t values (1),(4);
set log_slow_filter='';
select * from t;
id
1
4
show session status like 'Slow_queries';
Variable_name Value
Slow_queries 0
drop table t;
#
# End of 10.3 tests
#
mysql-test/main/log_slow.test
View file @
f97f6955
...
...
@@ -50,14 +50,14 @@ flush slow logs;
# 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
slow_query_log
=
1
;
set
global
log_output
=
'TABLE'
;
select
sleep
(
0.5
);
select
count
(
*
)
FROM
mysql
.
slow_log
;
# Reset used variables
set
@@
long_query_time
=
default
;
set
global
slow_query_log
=
@
org_slow_query_log
;
set
@@
slow_query_log
=
default
;
set
@@
log_slow_filter
=
default
;
set
@@
log_slow_verbosity
=
default
;
set
global
log_output
=
default
;
...
...
@@ -102,3 +102,20 @@ SET log_slow_filter=DEFAULT;
SET
@@
long_query_time
=
default
;
SET
GLOBAL
slow_query_log
=
@
org_slow_query_log
;
--
echo
#
--
echo
# MDEV-21187: log_slow_filter="" logs queries not using indexes
--
echo
#
flush
status
;
create
table
t
(
id
int
);
insert
into
t
values
(
1
),(
4
);
set
log_slow_filter
=
''
;
select
*
from
t
;
show
session
status
like
'Slow_queries'
;
drop
table
t
;
--
echo
#
--
echo
# End of 10.3 tests
--
echo
#
scripts/mysql_install_db.sh
View file @
f97f6955
...
...
@@ -148,7 +148,9 @@ parse_arguments()
--builddir
=
*
)
builddir
=
`
parse_arg
"
$arg
"
`
;;
--srcdir
=
*
)
srcdir
=
`
parse_arg
"
$arg
"
`
;;
--ldata
=
*
|
--datadir
=
*
|
--data
=
*
)
ldata
=
`
parse_arg
"
$arg
"
`
;;
--log-error
=
*
)
--log
[
-_
]
error
=
*
)
# Keep in the arguments passed to the server
args
=
"
$args
$arg
"
log_error
=
`
parse_arg
"
$arg
"
`
;;
# Note that the user will be passed to mysqld so that it runs
# as 'user' (crucial e.g. if log-bin=/some_other_path/
...
...
sql/sql_parse.cc
View file @
f97f6955
...
...
@@ -2544,7 +2544,7 @@ void log_slow_statement(THD *thd)
if
((
thd
->
server_status
&
(
SERVER_QUERY_NO_INDEX_USED
|
SERVER_QUERY_NO_GOOD_INDEX_USED
))
&&
!
(
thd
->
query_plan_flags
&
QPLAN_STATUS
)
&&
!
slow_filter_masked
(
thd
,
QPLAN_NOT_USING_INDEX
))
(
thd
->
variables
.
log_slow_filter
&
QPLAN_NOT_USING_INDEX
))
{
thd
->
query_plan_flags
|=
QPLAN_NOT_USING_INDEX
;
/* We are always logging no index queries if enabled in filter */
...
...
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