Merge lp:~gl-az/percona-server/bug1016991-5.6 into lp:percona-server/5.6

Proposed by George Ormond Lorch III
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 565
Proposed branch: lp:~gl-az/percona-server/bug1016991-5.6
Merge into: lp:percona-server/5.6
Diff against target: 64 lines (+37/-2)
4 files modified
mysql-test/r/percona_bug1016991.result (+13/-0)
mysql-test/t/percona_bug1016991-master.opt (+1/-0)
mysql-test/t/percona_bug1016991.test (+20/-0)
sql/sys_vars.cc (+3/-2)
To merge this branch: bzr merge lp:~gl-az/percona-server/bug1016991-5.6
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Sergei Glushchenko (community) g2 Approve
Review via email: mp+209513@code.launchpad.net

Description of the change

bug 1016991 - long_query_time not respected when slow_query_log_use_global_control = all

#defines of values as (1ULL << something) were changed to an enum of 'something'
without correcting other code by adding shifting where those values were used in
update_slow_query_log_use_global_control().

jenkins:
http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/535/
and
http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/536/

There are several failures in other slow log tests that are not related to this issue/fix that clear themselves on subsequent runs (as well as re-appear elsewhere) and are documented in the following bugs:
https://bugs.launchpad.net/percona-server/+bug/1098857
https://bugs.launchpad.net/percona-server/+bug/1163680
https://bugs.launchpad.net/percona-server/5.5/+bug/1287299

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Approve

review: Approve (g2)
Revision history for this message
Alexey Kopytov (akopytov) :
review: Needs Fixing
Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Same comments as 5.5 but no new jenkins

Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'mysql-test/r/percona_bug1016991.result'
2--- mysql-test/r/percona_bug1016991.result 1970-01-01 00:00:00 +0000
3+++ mysql-test/r/percona_bug1016991.result 2014-03-18 17:52:41 +0000
4@@ -0,0 +1,13 @@
5+[log_start.inc] percona_slow_extended_query_log_1
6+SET GLOBAL long_query_time=10000;
7+SELECT 1;
8+1
9+1
10+SET GLOBAL long_query_time=0;
11+SELECT 1;
12+1
13+1
14+[log_stop.inc] percona_slow_extended_query_log_1
15+[log_grep.inc] file: percona_slow_extended_query_log_1 pattern: ^# Time: \d{6} (\d| )\d:\d\d:\d\d$
16+[log_grep.inc] lines: 1
17+SET GLOBAL long_query_time=default;
18
19=== added file 'mysql-test/t/percona_bug1016991-master.opt'
20--- mysql-test/t/percona_bug1016991-master.opt 1970-01-01 00:00:00 +0000
21+++ mysql-test/t/percona_bug1016991-master.opt 2014-03-18 17:52:41 +0000
22@@ -0,0 +1,1 @@
23+--slow_query_log_use_global_control=all
24
25=== added file 'mysql-test/t/percona_bug1016991.test'
26--- mysql-test/t/percona_bug1016991.test 1970-01-01 00:00:00 +0000
27+++ mysql-test/t/percona_bug1016991.test 2014-03-18 17:52:41 +0000
28@@ -0,0 +1,20 @@
29+#
30+# bug 1016991 - long_query_time not respected when slow_query_log_use_global_control = all
31+#
32+--let log_file=percona_slow_extended_query_log_1
33+--source include/log_start.inc
34+
35+# this one should never show in log
36+SET GLOBAL long_query_time=10000;
37+SELECT 1;
38+
39+# with bug, this would never show in log but should
40+SET GLOBAL long_query_time=0;
41+SELECT 1;
42+
43+--source include/log_stop.inc
44+--let grep_pattern= ^# Time: \d{6} (\d| )\d:\d\d:\d\d\$
45+--source include/log_grep.inc
46+
47+SET GLOBAL long_query_time=default;
48+--source include/log_cleanup.inc
49
50=== modified file 'sql/sys_vars.cc'
51--- sql/sys_vars.cc 2014-03-03 17:51:33 +0000
52+++ sql/sys_vars.cc 2014-03-18 17:52:41 +0000
53@@ -4159,8 +4159,9 @@
54 if(opt_slow_query_log_use_global_control & (ULL(1) << SLOG_UG_ALL))
55 {
56 opt_slow_query_log_use_global_control=
57- SLOG_UG_LOG_SLOW_FILTER | SLOG_UG_LOG_SLOW_RATE_LIMIT | SLOG_UG_LOG_SLOW_VERBOSITY |
58- SLOG_UG_LONG_QUERY_TIME | SLOG_UG_MIN_EXAMINED_ROW_LIMIT;
59+ (1ULL << SLOG_UG_LOG_SLOW_FILTER) | (1ULL << SLOG_UG_LOG_SLOW_RATE_LIMIT)
60+ | (1ULL << SLOG_UG_LOG_SLOW_VERBOSITY) | (1ULL << SLOG_UG_LONG_QUERY_TIME)
61+ | (1ULL << SLOG_UG_MIN_EXAMINED_ROW_LIMIT);
62 }
63 return false;
64 }

Subscribers

People subscribed via source and target branches