Merge lp:~tsarev/percona-server/5.1_slow_extended_tests_fixes into lp:percona-server/5.1

Proposed by Oleg Tsarev on 2011-07-13
Status: Rejected
Rejected by: Alexey Kopytov on 2011-07-27
Proposed branch: lp:~tsarev/percona-server/5.1_slow_extended_tests_fixes
Merge into: lp:percona-server/5.1
Prerequisite: lp:~tsarev/percona-server/5.1_query_response_time_fix_bug_803867
Diff against target: 2189 lines (+942/-964)
56 files modified
mysql-test/slow_extended.patch/grep.inc (+0/-16)
mysql-test/slow_extended.patch/percona_slow_extended-combined-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-combined.result (+0/-18)
mysql-test/slow_extended.patch/percona_slow_extended-combined.test (+0/-6)
mysql-test/slow_extended.patch/percona_slow_extended-combined2-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-combined2.result (+0/-12)
mysql-test/slow_extended.patch/percona_slow_extended-combined2.test (+0/-4)
mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.result (+0/-12)
mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.test (+0/-12)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.result (+0/-25)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.test (+0/-32)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result (+0/-3)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result (+0/-3)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result (+0/-9)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test (+0/-3)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result (+0/-9)
mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test (+0/-12)
mysql-test/slow_extended.patch/percona_slow_extended-long_query_time-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.result (+0/-22)
mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test (+0/-19)
mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result (+0/-11)
mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test (+0/-19)
mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result (+0/-25)
mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test (+0/-32)
mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result (+0/-21)
mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test (+0/-38)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result (+0/-94)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test (+0/-116)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.result (+0/-93)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test (+0/-168)
mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result (+0/-3)
mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result (+0/-3)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result (+0/-59)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test (+0/-41)
slow_extended.patch (+942/-0)
To merge this branch: bzr merge lp:~tsarev/percona-server/5.1_slow_extended_tests_fixes
Reviewer Review Type Date Requested Status
Percona developers 2011-07-13 Pending
Review via email: mp+67850@code.launchpad.net

Commit message

1) Move all tests from mysql-test/slow_extended.patch to slow_extended.patch.
Now tests in "percona" suite
2) Rename all tests from percoa_slow_extended-X to X name
3) Extract start/stop/grep logic from tests to log_start/log_stop/log_grep includes
4) Remove tests mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time, because variable "use_global_long_query_time" was removed in 5.5 (and logic from this test) available in the slow_query_log_use_global_control.
5) Replace all SLEEP(X) by SET SESSION debug="+d,query_exec_time_X" or /* query_exec_time_X */
Also fixes bugs:
bug #794780 - "percona_slow_extended-microseconds_in_slow_extended sometimes fails"
bug #803071 - "add command-line variable setup test - log_slow_filter"
bug #803076 - "add command-line variable setup test - log_slow_slave_statements"
bug #803088 - "fix tests for log_slow_sp_statements:
bug #803093 - "add test for variable "log_slow_timestamp_every/slow_query_log_timestamp_always" (not command-line version)"
bug #803100 - "fix tests for use_global_log_slow_control/slow_query_log_use_global_control"
bug #803110 - "fix tests for slow_query_log_microseconds_timestamp/slow_query_log_timestamp_precision"
bug #803120 - "log_slow_verbosity ommited command-line tests in 5.5 "
bug #803137 - "rename percona_slow_extended-slave_innodb_stats.test to percona_slow_extended-log_slow_verbosity-innodb.test"
bug #760085 - "main.percona_slow_extended-slave_innodb_stats fails sporadically in 5.1.56 "
bug #803140 - "percona_slow_extended-min_examined_row_limit.test incorrect"

Description of the change

http://jenkins.percona.com/view/Percona%20Server%205.1/job/percona-server-5.1-param/61/

1) Move all tests from mysql-test/slow_extended.patch to slow_extended.patch.
Now tests in "percona" suite
2) Rename all tests from percoa_slow_extended-X to X name
3) Extract start/stop/grep logic from tests to log_start/log_stop/log_grep includes
4) Remove tests mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time, because variable "use_global_long_query_time" was removed in 5.5 (and logic from this test) available in the slow_query_log_use_global_control.
5) Replace all SLEEP(X) by SET SESSION debug="+d,query_exec_time_X" or /* query_exec_time_X */
Also fixes bugs:
bug #794780 - "percona_slow_extended-microseconds_in_slow_extended sometimes fails"
bug #803071 - "add command-line variable setup test - log_slow_filter"
bug #803076 - "add command-line variable setup test - log_slow_slave_statements"
bug #803088 - "fix tests for log_slow_sp_statements:
bug #803093 - "add test for variable "log_slow_timestamp_every/slow_query_log_timestamp_always" (not command-line version)"
bug #803100 - "fix tests for use_global_log_slow_control/slow_query_log_use_global_control"
bug #803110 - "fix tests for slow_query_log_microseconds_timestamp/slow_query_log_timestamp_precision"
bug #803120 - "log_slow_verbosity ommited command-line tests in 5.5 "
bug #803137 - "rename percona_slow_extended-slave_innodb_stats.test to percona_slow_extended-log_slow_verbosity-innodb.test"
bug #760085 - "main.percona_slow_extended-slave_innodb_stats fails sporadically in 5.1.56 "
bug #803140 - "percona_slow_extended-min_examined_row_limit.test incorrect"

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory 'mysql-test/slow_extended.patch'
2=== removed file 'mysql-test/slow_extended.patch/grep.inc'
3--- mysql-test/slow_extended.patch/grep.inc 2010-12-24 16:44:23 +0000
4+++ mysql-test/slow_extended.patch/grep.inc 1970-01-01 00:00:00 +0000
5@@ -1,16 +0,0 @@
6-perl;
7-
8- $file = $ENV{'grep_file'};
9- $pattern = $ENV{'grep_pattern'};
10-
11- open(FILE, "$file")
12- or die("Cannot open file $file: $!\n");
13-
14- $lines = 0;
15- while(<FILE>) {
16- $lines++ if (/$pattern/);
17- }
18- print "$lines\n";
19-
20- close(FILE);
21-EOF
22
23=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined-master.opt'
24--- mysql-test/slow_extended.patch/percona_slow_extended-combined-master.opt 2010-12-22 20:15:33 +0000
25+++ mysql-test/slow_extended.patch/percona_slow_extended-combined-master.opt 1970-01-01 00:00:00 +0000
26@@ -1,1 +0,0 @@
27---use_global_long_query_time --log_slow_verbosity="full"
28
29=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined.result'
30--- mysql-test/slow_extended.patch/percona_slow_extended-combined.result 2010-12-22 20:15:33 +0000
31+++ mysql-test/slow_extended.patch/percona_slow_extended-combined.result 1970-01-01 00:00:00 +0000
32@@ -1,18 +0,0 @@
33-show variables like 'use_global_long_query_time';
34-Variable_name Value
35-use_global_long_query_time ON
36-show variables like 'use_global_log_slow_control';
37-Variable_name Value
38-use_global_log_slow_control long_query_time
39-show variables like 'log_slow_verbosity';
40-Variable_name Value
41-log_slow_verbosity microtime,query_plan,innodb
42-show global variables like 'use_global_long_query_time';
43-Variable_name Value
44-use_global_long_query_time ON
45-show global variables like 'log_slow_verbosity';
46-Variable_name Value
47-log_slow_verbosity microtime,query_plan,innodb
48-show global variables like 'use_global_log_slow_control';
49-Variable_name Value
50-use_global_log_slow_control long_query_time
51
52=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined.test'
53--- mysql-test/slow_extended.patch/percona_slow_extended-combined.test 2010-12-22 20:15:33 +0000
54+++ mysql-test/slow_extended.patch/percona_slow_extended-combined.test 1970-01-01 00:00:00 +0000
55@@ -1,6 +0,0 @@
56-show variables like 'use_global_long_query_time';
57-show variables like 'use_global_log_slow_control';
58-show variables like 'log_slow_verbosity';
59-show global variables like 'use_global_long_query_time';
60-show global variables like 'log_slow_verbosity';
61-show global variables like 'use_global_log_slow_control';
62
63=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined2-master.opt'
64--- mysql-test/slow_extended.patch/percona_slow_extended-combined2-master.opt 2010-12-22 20:15:33 +0000
65+++ mysql-test/slow_extended.patch/percona_slow_extended-combined2-master.opt 1970-01-01 00:00:00 +0000
66@@ -1,1 +0,0 @@
67---use_global_log_slow_control="long_query_time"
68
69=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined2.result'
70--- mysql-test/slow_extended.patch/percona_slow_extended-combined2.result 2010-12-22 20:15:33 +0000
71+++ mysql-test/slow_extended.patch/percona_slow_extended-combined2.result 1970-01-01 00:00:00 +0000
72@@ -1,12 +0,0 @@
73-show variables like 'use_global_long_query_time';
74-Variable_name Value
75-use_global_long_query_time ON
76-show variables like 'use_global_log_slow_control';
77-Variable_name Value
78-use_global_log_slow_control long_query_time
79-show global variables like 'use_global_long_query_time';
80-Variable_name Value
81-use_global_long_query_time ON
82-show global variables like 'use_global_log_slow_control';
83-Variable_name Value
84-use_global_log_slow_control long_query_time
85
86=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined2.test'
87--- mysql-test/slow_extended.patch/percona_slow_extended-combined2.test 2010-12-22 20:15:33 +0000
88+++ mysql-test/slow_extended.patch/percona_slow_extended-combined2.test 1970-01-01 00:00:00 +0000
89@@ -1,4 +0,0 @@
90-show variables like 'use_global_long_query_time';
91-show variables like 'use_global_log_slow_control';
92-show global variables like 'use_global_long_query_time';
93-show global variables like 'use_global_log_slow_control';
94
95=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt'
96--- mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt 2010-12-06 03:50:48 +0000
97+++ mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt 1970-01-01 00:00:00 +0000
98@@ -1,1 +0,0 @@
99---slow-query-log-file=percona_slow_query_log-control_global_slow.log --long-query-time=1
100
101=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.result'
102--- mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.result 2010-12-29 19:06:24 +0000
103+++ mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.result 1970-01-01 00:00:00 +0000
104@@ -1,12 +0,0 @@
105-SELECT sleep(2);
106-sleep(2)
107-0
108-set global log_slow_verbosity=innodb;
109-set global use_global_log_slow_control="log_slow_verbosity,long_query_time";
110-SELECT sleep(2);
111-sleep(2)
112-0
113-set global use_global_log_slow_control=none;
114-set global log_slow_verbosity=microtime;
115-FLUSH LOGS;
116-1
117
118=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.test'
119--- mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.test 2010-12-29 19:06:24 +0000
120+++ mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.test 1970-01-01 00:00:00 +0000
121@@ -1,12 +0,0 @@
122-source include/have_innodb.inc;
123-SELECT sleep(2);
124-set global log_slow_verbosity=innodb;
125-set global use_global_log_slow_control="log_slow_verbosity,long_query_time";
126-SELECT sleep(2);
127-set global use_global_log_slow_control=none;
128-set global log_slow_verbosity=microtime;
129-
130-FLUSH LOGS;
131---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-control_global_slow.log
132---let grep_pattern = No InnoDB statistics available for this query
133---source include/grep.inc
134
135=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt'
136--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt 2010-12-06 03:50:48 +0000
137+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt 1970-01-01 00:00:00 +0000
138@@ -1,1 +0,0 @@
139---slow-query-log-file=percona_slow_query_log-log_slow_filter.log --long-query-time=1
140
141=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.result'
142--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.result 2010-12-29 19:06:24 +0000
143+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.result 1970-01-01 00:00:00 +0000
144@@ -1,25 +0,0 @@
145-SET GLOBAL SLOW_QUERY_LOG=OFF;
146-drop table if exists t;
147-# Create test table
148-create table t(id INT PRIMARY KEY) engine=InnoDB;
149-# Insert two rows to test table
150-insert into t values(1);
151-insert into t values(2);
152-insert into t values(3);
153-SET GLOBAL SLOW_QUERY_LOG=ON;
154-SELECT sleep(2);
155-sleep(2)
156-0
157-set log_slow_filter=full_join;
158-SELECT sleep(2) union select t2.id from t as t1,t as t2;
159-sleep(2)
160-0
161-1
162-2
163-3
164-SELECT sleep(2);
165-sleep(2)
166-0
167-drop table if exists t;
168-FLUSH LOGS;
169-2
170
171=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.test'
172--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.test 2010-12-29 19:06:24 +0000
173+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.test 1970-01-01 00:00:00 +0000
174@@ -1,32 +0,0 @@
175-source include/have_innodb.inc;
176-
177-SET GLOBAL SLOW_QUERY_LOG=OFF;
178-
179---disable_warnings
180-drop table if exists t;
181---enable_warnings
182-
183---echo # Create test table
184-create table t(id INT PRIMARY KEY) engine=InnoDB;
185---echo # Insert two rows to test table
186-insert into t values(1);
187-insert into t values(2);
188-insert into t values(3);
189-
190-SET GLOBAL SLOW_QUERY_LOG=ON;
191-
192-SELECT sleep(2);
193-
194-set log_slow_filter=full_join;
195-
196-SELECT sleep(2) union select t2.id from t as t1,t as t2;
197-SELECT sleep(2);
198-
199---disable_warnings
200-drop table if exists t;
201---enable_warnings
202-
203-FLUSH LOGS;
204---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-log_slow_filter.log
205---let grep_pattern = Query_time
206---source include/grep.inc
207
208=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt'
209--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt 2010-12-22 20:15:33 +0000
210+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt 1970-01-01 00:00:00 +0000
211@@ -1,1 +0,0 @@
212---log_slow_sp_statements
213
214=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result'
215--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result 2010-12-22 20:15:33 +0000
216+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result 1970-01-01 00:00:00 +0000
217@@ -1,3 +0,0 @@
218-show global variables like 'log_slow_sp_statements';
219-Variable_name Value
220-log_slow_sp_statements ON
221
222=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test'
223--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test 2010-12-22 20:15:33 +0000
224+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test 1970-01-01 00:00:00 +0000
225@@ -1,1 +0,0 @@
226-show global variables like 'log_slow_sp_statements';
227
228=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt'
229--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt 2010-12-22 20:15:33 +0000
230+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt 1970-01-01 00:00:00 +0000
231@@ -1,1 +0,0 @@
232---log_slow_timestamp_every
233
234=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result'
235--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result 2010-12-22 20:15:33 +0000
236+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result 1970-01-01 00:00:00 +0000
237@@ -1,3 +0,0 @@
238-show global variables like 'log_slow_timestamp_every';
239-Variable_name Value
240-log_slow_timestamp_every ON
241
242=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test'
243--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test 2010-12-22 20:15:33 +0000
244+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test 1970-01-01 00:00:00 +0000
245@@ -1,1 +0,0 @@
246-show global variables like 'log_slow_timestamp_every';
247
248=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt'
249--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt 2010-12-22 20:15:33 +0000
250+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt 1970-01-01 00:00:00 +0000
251@@ -1,1 +0,0 @@
252---log_slow_verbosity="full"
253
254=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result'
255--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result 2010-12-22 20:15:33 +0000
256+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result 1970-01-01 00:00:00 +0000
257@@ -1,9 +0,0 @@
258-show global variables like 'log_slow_verbosity';
259-Variable_name Value
260-log_slow_verbosity microtime,query_plan,innodb
261-show variables like 'log_slow_verbosity';
262-Variable_name Value
263-log_slow_verbosity microtime,query_plan,innodb
264-select @@log_slow_verbosity;
265-@@log_slow_verbosity
266-microtime,query_plan,innodb
267
268=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test'
269--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test 2010-12-22 20:15:33 +0000
270+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test 1970-01-01 00:00:00 +0000
271@@ -1,3 +0,0 @@
272-show global variables like 'log_slow_verbosity';
273-show variables like 'log_slow_verbosity';
274-select @@log_slow_verbosity;
275
276=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt'
277--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt 2010-12-06 03:50:48 +0000
278+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt 1970-01-01 00:00:00 +0000
279@@ -1,1 +0,0 @@
280---slow-query-log-file=percona_slow_query_log-log_slow_verbosity.log --long-query-time=1
281
282=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result'
283--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result 2010-12-29 19:06:24 +0000
284+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result 1970-01-01 00:00:00 +0000
285@@ -1,9 +0,0 @@
286-SELECT sleep(2);
287-sleep(2)
288-0
289-set log_slow_verbosity=innodb;
290-SELECT sleep(2);
291-sleep(2)
292-0
293-FLUSH LOGS;
294-1
295
296=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test'
297--- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test 2010-12-29 19:06:24 +0000
298+++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test 1970-01-01 00:00:00 +0000
299@@ -1,12 +0,0 @@
300-source include/have_innodb.inc;
301-
302-SELECT sleep(2);
303-
304-set log_slow_verbosity=innodb;
305-
306-SELECT sleep(2);
307-
308-FLUSH LOGS;
309---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-log_slow_verbosity.log
310---let grep_pattern = No InnoDB statistics available for this query
311---source include/grep.inc
312
313=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-long_query_time-master.opt'
314--- mysql-test/slow_extended.patch/percona_slow_extended-long_query_time-master.opt 2010-12-06 03:50:48 +0000
315+++ mysql-test/slow_extended.patch/percona_slow_extended-long_query_time-master.opt 1970-01-01 00:00:00 +0000
316@@ -1,1 +0,0 @@
317---slow-query-log-file=percona_slow_query_log-long_query_time.log --long-query-time=2
318
319=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.result'
320--- mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.result 2010-12-29 19:06:24 +0000
321+++ mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.result 1970-01-01 00:00:00 +0000
322@@ -1,22 +0,0 @@
323-SELECT sleep(1);
324-sleep(1)
325-0
326-SELECT sleep(3);
327-sleep(3)
328-0
329-SELECT sleep(5);
330-sleep(5)
331-0
332-set long_query_time=4;
333-SELECT sleep(1);
334-sleep(1)
335-0
336-SELECT sleep(3);
337-sleep(3)
338-0
339-SELECT sleep(5);
340-sleep(5)
341-0
342-set long_query_time=2;
343-FLUSH LOGS;
344-3
345
346=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test'
347--- mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test 2010-12-29 19:06:24 +0000
348+++ mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test 1970-01-01 00:00:00 +0000
349@@ -1,19 +0,0 @@
350-source include/have_innodb.inc;
351-
352-SELECT sleep(1);
353-SELECT sleep(3);
354-SELECT sleep(5);
355-
356-set long_query_time=4;
357-
358-SELECT sleep(1);
359-SELECT sleep(3);
360-SELECT sleep(5);
361-
362-set long_query_time=2;
363-
364-FLUSH LOGS;
365---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-long_query_time.log
366---let grep_pattern = Query_time
367---source include/grep.inc
368-
369
370=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt'
371--- mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt 2010-12-06 03:50:48 +0000
372+++ mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt 1970-01-01 00:00:00 +0000
373@@ -1,1 +0,0 @@
374---slow-query-log-file=percona_slow_query_log-microseconds_in_slow_query_log.log --long-query-time=1
375
376=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result'
377--- mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result 2010-12-29 19:06:24 +0000
378+++ mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result 1970-01-01 00:00:00 +0000
379@@ -1,11 +0,0 @@
380-SELECT sleep(2);
381-sleep(2)
382-0
383-set global slow_query_log_microseconds_timestamp=ON;
384-SELECT sleep(2);
385-sleep(2)
386-0
387-set global slow_query_log_microseconds_timestamp=OFF;
388-FLUSH LOGS;
389-1
390-2
391
392=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test'
393--- mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test 2010-12-29 19:06:24 +0000
394+++ mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test 1970-01-01 00:00:00 +0000
395@@ -1,19 +0,0 @@
396-source include/have_innodb.inc;
397-
398-SELECT sleep(2);
399-
400-set global slow_query_log_microseconds_timestamp=ON;
401-
402-SELECT sleep(2);
403-
404-set global slow_query_log_microseconds_timestamp=OFF;
405-
406-FLUSH LOGS;
407---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log
408---let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+.[0-9]+
409---source include/grep.inc
410-
411---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log
412---let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+
413---source include/grep.inc
414-
415
416=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt'
417--- mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt 2010-12-06 03:50:48 +0000
418+++ mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt 1970-01-01 00:00:00 +0000
419@@ -1,1 +0,0 @@
420---slow-query-log-file=percona_slow_query_log-min_examined_row_limit.log --long-query-time=1
421
422=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result'
423--- mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result 2010-12-29 19:06:24 +0000
424+++ mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result 1970-01-01 00:00:00 +0000
425@@ -1,25 +0,0 @@
426-SET GLOBAL SLOW_QUERY_LOG=OFF;
427-drop table if exists t;
428-# Create test table
429-create table t(id INT PRIMARY KEY) engine=InnoDB;
430-# Insert two rows to test table
431-insert into t values(1);
432-insert into t values(2);
433-insert into t values(3);
434-SET GLOBAL SLOW_QUERY_LOG=ON;
435-SELECT sleep(2);
436-sleep(2)
437-0
438-set min_examined_row_limit=5;
439-SELECT sleep(2) union select t2.id from t as t1,t as t2;
440-sleep(2)
441-0
442-1
443-2
444-3
445-SELECT sleep(2);
446-sleep(2)
447-0
448-drop table if exists t;
449-FLUSH LOGS;
450-2
451
452=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test'
453--- mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test 2010-12-29 19:06:24 +0000
454+++ mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test 1970-01-01 00:00:00 +0000
455@@ -1,32 +0,0 @@
456-source include/have_innodb.inc;
457-
458-SET GLOBAL SLOW_QUERY_LOG=OFF;
459-
460---disable_warnings
461-drop table if exists t;
462---enable_warnings
463-
464---echo # Create test table
465-create table t(id INT PRIMARY KEY) engine=InnoDB;
466---echo # Insert two rows to test table
467-insert into t values(1);
468-insert into t values(2);
469-insert into t values(3);
470-
471-SET GLOBAL SLOW_QUERY_LOG=ON;
472-
473-SELECT sleep(2);
474-
475-set min_examined_row_limit=5;
476-
477-SELECT sleep(2) union select t2.id from t as t1,t as t2;
478-SELECT sleep(2);
479-
480---disable_warnings
481-drop table if exists t;
482---enable_warnings
483-
484-FLUSH LOGS;
485---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-min_examined_row_limit.log
486---let grep_pattern = Query_time
487---source include/grep.inc
488
489=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt'
490--- mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt 2010-11-18 12:38:25 +0000
491+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt 1970-01-01 00:00:00 +0000
492@@ -1,1 +0,0 @@
493---long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements
494
495=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt'
496--- mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt 2010-11-18 12:38:25 +0000
497+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt 1970-01-01 00:00:00 +0000
498@@ -1,1 +0,0 @@
499---long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements
500
501=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result'
502--- mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result 2011-05-26 10:57:17 +0000
503+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result 1970-01-01 00:00:00 +0000
504@@ -1,21 +0,0 @@
505-include/master-slave.inc
506-[connection master]
507-DROP TABLE IF EXISTS t;
508-CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB;
509-INSERT INTO t VALUES
510-(1,"aaaaabbbbbcccccdddddeeeeefffff"),
511-(2,"aaaaabbbbbcccccdddddeeeeefffff"),
512-(3,"aaaaabbbbbcccccdddddeeeeefffff"),
513-(4,"aaaaabbbbbcccccdddddeeeeefffff"),
514-(5,"aaaaabbbbbcccccdddddeeeeefffff");
515-INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
516-INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
517-STOP SLAVE;
518-include/wait_for_slave_to_stop.inc
519-START SLAVE;
520-include/wait_for_slave_to_start.inc
521-INSERT INTO t SELECT t.id,t.data from t;
522-FLUSH LOGS;
523-4
524-DROP TABLE IF EXISTS t;
525-include/rpl_end.inc
526
527=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test'
528--- mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test 2011-05-26 10:57:17 +0000
529+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test 1970-01-01 00:00:00 +0000
530@@ -1,38 +0,0 @@
531--- source include/have_binlog_format_mixed_or_statement.inc
532--- source include/have_innodb.inc
533--- source include/master-slave.inc
534-
535-connection master;
536--- disable_warnings
537-DROP TABLE IF EXISTS t;
538--- enable_warnings
539-CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB;
540-INSERT INTO t VALUES
541-(1,"aaaaabbbbbcccccdddddeeeeefffff"),
542-(2,"aaaaabbbbbcccccdddddeeeeefffff"),
543-(3,"aaaaabbbbbcccccdddddeeeeefffff"),
544-(4,"aaaaabbbbbcccccdddddeeeeefffff"),
545-(5,"aaaaabbbbbcccccdddddeeeeefffff");
546-INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
547-INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
548-sync_slave_with_master;
549-
550-connection slave;
551-STOP SLAVE;
552--- source include/wait_for_slave_to_stop.inc
553-START SLAVE;
554--- source include/wait_for_slave_to_start.inc
555-
556-connection master;
557-INSERT INTO t SELECT t.id,t.data from t;
558-sync_slave_with_master;
559-
560-connection slave;
561-FLUSH LOGS;
562---let grep_file = $MYSQLTEST_VARDIR/mysqld.2/mysqld-slow.log
563---let grep_pattern = InnoDB_IO_r_ops
564---source include/grep.inc
565-
566-connection master;
567-DROP TABLE IF EXISTS t;
568---source include/rpl_end.inc
569
570=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt'
571--- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt 2010-12-06 03:50:48 +0000
572+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt 1970-01-01 00:00:00 +0000
573@@ -1,1 +0,0 @@
574---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=1
575
576=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt'
577--- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt 2010-12-06 03:50:48 +0000
578+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt 1970-01-01 00:00:00 +0000
579@@ -1,1 +0,0 @@
580---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=1
581
582=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result'
583--- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result 2011-02-26 09:03:28 +0000
584+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result 1970-01-01 00:00:00 +0000
585@@ -1,94 +0,0 @@
586-# Activate master-slave replication
587-include/master-slave.inc
588-[connection master]
589-# Make table t for test
590-DROP TABLE IF EXISTS t;
591-CREATE TABLE t(id INT);
592-# Start slave replication
593-START SLAVE;
594-include/wait_for_slave_to_start.inc
595-INSERT INTO t VALUES (1);
596-# Read and change log_slow_slave_statements to ON on slave
597-show variables like 'log_slow_slave_statements';
598-Variable_name Value
599-log_slow_slave_statements OFF
600-set global log_slow_slave_statements=ON;
601-show variables like 'log_slow_slave_statements';
602-Variable_name Value
603-log_slow_slave_statements ON
604-INSERT INTO t VALUES (2);
605-# Restart slave
606-STOP SLAVE;
607-include/wait_for_slave_to_stop.inc
608-START SLAVE;
609-include/wait_for_slave_to_start.inc
610-INSERT INTO t VALUES (3);
611-show variables like 'long_query_time';
612-Variable_name Value
613-long_query_time 1.000000
614-show global variables like 'long_query_time';
615-Variable_name Value
616-long_query_time 1.000000
617-show global variables like 'use_global_long_query_time';
618-Variable_name Value
619-use_global_long_query_time OFF
620-set global long_query_time=0;
621-show variables like 'long_query_time';
622-Variable_name Value
623-long_query_time 1.000000
624-show global variables like 'long_query_time';
625-Variable_name Value
626-long_query_time 0.000000
627-show global variables like 'use_global_long_query_time';
628-Variable_name Value
629-use_global_long_query_time OFF
630-INSERT INTO t VALUES (4);
631-show variables like 'long_query_time';
632-Variable_name Value
633-long_query_time 1.000000
634-show global variables like 'long_query_time';
635-Variable_name Value
636-long_query_time 0.000000
637-show global variables like 'use_global_long_query_time';
638-Variable_name Value
639-use_global_long_query_time OFF
640-set global use_global_long_query_time=1;
641-show variables like 'long_query_time';
642-Variable_name Value
643-long_query_time 0.000000
644-show global variables like 'long_query_time';
645-Variable_name Value
646-long_query_time 0.000000
647-show global variables like 'use_global_long_query_time';
648-Variable_name Value
649-use_global_long_query_time ON
650-INSERT INTO t VALUES (5);
651-show variables like 'long_query_time';
652-Variable_name Value
653-long_query_time 0.000000
654-show global variables like 'long_query_time';
655-Variable_name Value
656-long_query_time 0.000000
657-show global variables like 'use_global_long_query_time';
658-Variable_name Value
659-use_global_long_query_time ON
660-set global long_query_time=1;
661-set global use_global_long_query_time=0;
662-FLUSH LOGS;
663-# Analyse master slow_query_log
664-0
665-0
666-0
667-0
668-0
669-FLUSH LOGS;
670-# Analyse slave slow_query_log
671-0
672-0
673-0
674-0
675-1
676-set global log_slow_slave_statements=OFF;
677-DROP TABLE t;
678-STOP SLAVE;
679-include/wait_for_slave_to_stop.inc
680
681=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test'
682--- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test 2011-02-26 09:03:28 +0000
683+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test 1970-01-01 00:00:00 +0000
684@@ -1,116 +0,0 @@
685--- source include/have_binlog_format_mixed_or_statement.inc
686--- echo # Activate master-slave replication
687--- source include/master-slave.inc
688-
689-connection master;
690--- echo # Make table t for test
691--- disable_warnings
692-DROP TABLE IF EXISTS t;
693--- enable_warnings
694-CREATE TABLE t(id INT);
695-
696-
697--- echo # Start slave replication
698--- disable_warnings
699-connection slave;
700-START SLAVE;
701--- source include/wait_for_slave_to_start.inc
702--- enable_warnings
703-
704-#-- echo # Make insert(1) on master
705-connection master;
706-INSERT INTO t VALUES (1);
707-sync_slave_with_master;
708-connection slave;
709--- echo # Read and change log_slow_slave_statements to ON on slave
710-show variables like 'log_slow_slave_statements';
711-set global log_slow_slave_statements=ON;
712-show variables like 'log_slow_slave_statements';
713-
714-#-- echo # Make insert(2) on master
715-connection master;
716-INSERT INTO t VALUES (2);
717-sync_slave_with_master;
718-connection slave;
719--- echo # Restart slave
720-STOP SLAVE;
721--- source include/wait_for_slave_to_stop.inc
722-START SLAVE;
723--- source include/wait_for_slave_to_start.inc
724-
725-#-- echo # Make insert(3) on master
726-connection master;
727-INSERT INTO t VALUES (3);
728-sync_slave_with_master;
729-connection slave;
730-show variables like 'long_query_time';
731-show global variables like 'long_query_time';
732-show global variables like 'use_global_long_query_time';
733-set global long_query_time=0;
734-show variables like 'long_query_time';
735-show global variables like 'long_query_time';
736-show global variables like 'use_global_long_query_time';
737-
738-#-- echo # Make insert(4) on master
739-connection master;
740-INSERT INTO t VALUES (4);
741-sync_slave_with_master;
742-connection slave;
743-show variables like 'long_query_time';
744-show global variables like 'long_query_time';
745-show global variables like 'use_global_long_query_time';
746-set global use_global_long_query_time=1;
747-show variables like 'long_query_time';
748-show global variables like 'long_query_time';
749-show global variables like 'use_global_long_query_time';
750-
751-#-- echo # Make insert(5) on master
752-connection master;
753-INSERT INTO t VALUES (5);
754-sync_slave_with_master;
755-connection slave;
756-show variables like 'long_query_time';
757-show global variables like 'long_query_time';
758-show global variables like 'use_global_long_query_time';
759-set global long_query_time=1;
760-set global use_global_long_query_time=0;
761-
762-connection master;
763-FLUSH LOGS;
764-
765--- echo # Analyse master slow_query_log
766-let $i=5;
767-let $k=1;
768-while($i)
769-{
770- --let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_log_slow_slave_statements-master.log
771- --let grep_pattern = INSERT INTO t VALUES \($k\)
772- --source include/grep.inc
773- dec $i;
774- inc $k;
775-}
776-
777-connection slave;
778-FLUSH LOGS;
779-
780--- echo # Analyse slave slow_query_log
781-let $i=5;
782-let $k=1;
783-while($i)
784-{
785- --let grep_file = $MYSQLTEST_VARDIR/mysqld.2/data/percona_log_slow_slave_statements-slave.log
786- --let grep_pattern = INSERT INTO t VALUES \($k\)
787- --source include/grep.inc
788- dec $i;
789- inc $k;
790-}
791-set global log_slow_slave_statements=OFF;
792-
793-connection master;
794-DROP TABLE t;
795-
796-sync_slave_with_master;
797-connection slave;
798-
799-STOP SLAVE;
800--- source include/wait_for_slave_to_stop.inc
801
802=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-master.opt'
803--- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-master.opt 2010-12-06 03:50:48 +0000
804+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-master.opt 1970-01-01 00:00:00 +0000
805@@ -1,1 +0,0 @@
806---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=0
807
808=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt'
809--- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt 2010-12-06 03:50:48 +0000
810+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt 1970-01-01 00:00:00 +0000
811@@ -1,1 +0,0 @@
812---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=0
813
814=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.result'
815--- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.result 2011-02-26 09:03:28 +0000
816+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.result 1970-01-01 00:00:00 +0000
817@@ -1,93 +0,0 @@
818-# Activate master-slave replication
819-include/master-slave.inc
820-[connection master]
821-# Make table t for test
822-DROP TABLE IF EXISTS t;
823-CREATE TABLE t(id INT);
824-# Start slave replication
825-START SLAVE;
826-include/wait_for_slave_to_start.inc
827-INSERT INTO t VALUES (1);
828-# Read information about master binlog
829-# Sync(1) slave thread
830-# Read and change log_slow_slave_statements to ON on slave
831-show variables like 'log_slow_slave_statements';
832-Variable_name Value
833-log_slow_slave_statements OFF
834-set global log_slow_slave_statements=ON;
835-show variables like 'log_slow_slave_statements';
836-Variable_name Value
837-log_slow_slave_statements ON
838-INSERT INTO t VALUES (2);
839-# Read information about master binlog
840-# Sync slave(2) thread
841-# Restart slave
842-STOP SLAVE;
843-include/wait_for_slave_to_stop.inc
844-START SLAVE;
845-include/wait_for_slave_to_start.inc
846-INSERT INTO t VALUES (3);
847-# Read information about master binlog
848-# Sync(3) slave thread
849-# Read and change log_slow_slave_statements to OFF on slave
850-show variables like 'log_slow_slave_statements';
851-Variable_name Value
852-log_slow_slave_statements ON
853-set global log_slow_slave_statements=OFF;
854-show variables like 'log_slow_slave_statements';
855-Variable_name Value
856-log_slow_slave_statements OFF
857-INSERT INTO t VALUES (4);
858-# Read information about master binlog
859-# Sync slave(4) thread
860-# Restart slave
861-STOP SLAVE;
862-include/wait_for_slave_to_stop.inc
863-START SLAVE;
864-include/wait_for_slave_to_start.inc
865-INSERT INTO t VALUES (5);
866-# Read information about master binlog
867-# Sync slave(5) thread
868-# Read and change log_slow_slave_statements to ON on slave
869-show variables like 'log_slow_slave_statements';
870-Variable_name Value
871-log_slow_slave_statements OFF
872-set global log_slow_slave_statements=ON;
873-show variables like 'log_slow_slave_statements';
874-Variable_name Value
875-log_slow_slave_statements ON
876-INSERT INTO t VALUES (6);
877-# Read information about master binlog
878-# Sync slave(6) thread
879-# Restart slave
880-STOP SLAVE;
881-include/wait_for_slave_to_stop.inc
882-START SLAVE;
883-include/wait_for_slave_to_start.inc
884-INSERT INTO t VALUES (7);
885-# Read information about master binlog
886-# Sync slave(7) thread
887-FLUSH LOGS;
888-# Analyse master slow_query_log
889-1
890-1
891-1
892-1
893-1
894-1
895-1
896-FLUSH LOGS;
897-# Analyse slave slow_query_log
898-0
899-0
900-1
901-0
902-0
903-0
904-1
905-set global log_slow_slave_statements=OFF;
906-DROP TABLE t;
907-# Read information about master binlog
908-# Sync slave(8) thread
909-STOP SLAVE;
910-include/wait_for_slave_to_stop.inc
911
912=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test'
913--- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test 2011-02-26 09:03:28 +0000
914+++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test 1970-01-01 00:00:00 +0000
915@@ -1,168 +0,0 @@
916--- source include/have_binlog_format_mixed_or_statement.inc
917--- echo # Activate master-slave replication
918--- source include/master-slave.inc
919-
920-connection master;
921--- echo # Make table t for test
922--- disable_warnings
923-DROP TABLE IF EXISTS t;
924--- enable_warnings
925-CREATE TABLE t(id INT);
926-
927-
928--- echo # Start slave replication
929--- disable_warnings
930-connection slave;
931-START SLAVE;
932--- source include/wait_for_slave_to_start.inc
933--- enable_warnings
934-
935-#-- echo # Make insert(1) on master
936-connection master;
937-INSERT INTO t VALUES (1);
938--- echo # Read information about master binlog
939-let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1);
940-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
941-
942--- echo # Sync(1) slave thread
943-connection slave;
944-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
945-
946--- echo # Read and change log_slow_slave_statements to ON on slave
947-show variables like 'log_slow_slave_statements';
948-set global log_slow_slave_statements=ON;
949-show variables like 'log_slow_slave_statements';
950-
951-#-- echo # Make insert(2) on master
952-connection master;
953-INSERT INTO t VALUES (2);
954--- echo # Read information about master binlog
955-let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1);
956-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
957-
958--- echo # Sync slave(2) thread
959-connection slave;
960-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
961--- echo # Restart slave
962-STOP SLAVE;
963--- source include/wait_for_slave_to_stop.inc
964-START SLAVE;
965--- source include/wait_for_slave_to_start.inc
966-
967-#-- echo # Make insert(3) on master
968-connection master;
969-INSERT INTO t VALUES (3);
970--- echo # Read information about master binlog
971-let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1);
972-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
973-
974--- echo # Sync(3) slave thread
975-connection slave;
976-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
977--- echo # Read and change log_slow_slave_statements to OFF on slave
978-show variables like 'log_slow_slave_statements';
979-set global log_slow_slave_statements=OFF;
980-show variables like 'log_slow_slave_statements';
981-
982-#-- echo # Make insert(4) on master
983-connection master;
984-INSERT INTO t VALUES (4);
985--- echo # Read information about master binlog
986-let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1);
987-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
988-
989--- echo # Sync slave(4) thread
990-connection slave;
991-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
992--- echo # Restart slave
993-STOP SLAVE;
994--- source include/wait_for_slave_to_stop.inc
995-START SLAVE;
996--- source include/wait_for_slave_to_start.inc
997-
998-#-- echo # Make insert(5) on master
999-connection master;
1000-INSERT INTO t VALUES (5);
1001--- echo # Read information about master binlog
1002-let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1);
1003-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
1004-
1005--- echo # Sync slave(5) thread
1006-connection slave;
1007-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
1008--- echo # Read and change log_slow_slave_statements to ON on slave
1009-show variables like 'log_slow_slave_statements';
1010-set global log_slow_slave_statements=ON;
1011-show variables like 'log_slow_slave_statements';
1012-
1013-#-- echo # Make insert(6) on master
1014-connection master;
1015-INSERT INTO t VALUES (6);
1016--- echo # Read information about master binlog
1017-let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1);
1018-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
1019-
1020--- echo # Sync slave(6) thread
1021-connection slave;
1022-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
1023--- echo # Restart slave
1024-STOP SLAVE;
1025--- source include/wait_for_slave_to_stop.inc
1026-START SLAVE;
1027--- source include/wait_for_slave_to_start.inc
1028-
1029-#-- echo # Make insert(7) on master
1030-connection master;
1031-INSERT INTO t VALUES (7);
1032--- echo # Read information about master binlog
1033-let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1);
1034-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
1035-
1036--- echo # Sync slave(7) thread
1037-connection slave;
1038-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
1039-
1040-connection master;
1041-FLUSH LOGS;
1042-
1043--- echo # Analyse master slow_query_log
1044-let $i=7;
1045-let $k=1;
1046-while($i)
1047-{
1048- --let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_log_slow_slave_statements-master.log
1049- --let grep_pattern = INSERT INTO t VALUES \($k\)
1050- --source include/grep.inc
1051- dec $i;
1052- inc $k;
1053-}
1054-
1055-connection slave;
1056-FLUSH LOGS;
1057-
1058--- echo # Analyse slave slow_query_log
1059-let $i=7;
1060-let $k=1;
1061-while($i)
1062-{
1063- --let grep_file = $MYSQLTEST_VARDIR/mysqld.2/data/percona_log_slow_slave_statements-slave.log
1064- --let grep_pattern = INSERT INTO t VALUES \($k\)
1065- --source include/grep.inc
1066- dec $i;
1067- inc $k;
1068-}
1069-set global log_slow_slave_statements=OFF;
1070-
1071-connection master;
1072-DROP TABLE t;
1073-
1074--- echo # Read information about master binlog
1075-let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1);
1076-let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1);
1077-
1078--- echo # Sync slave(8) thread
1079-connection slave;
1080-let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
1081-
1082-STOP SLAVE;
1083--- source include/wait_for_slave_to_stop.inc
1084
1085=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt'
1086--- mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt 2010-12-22 20:15:33 +0000
1087+++ mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt 1970-01-01 00:00:00 +0000
1088@@ -1,1 +0,0 @@
1089---slow_query_log_microseconds_timestamp
1090
1091=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result'
1092--- mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result 2010-12-22 20:15:33 +0000
1093+++ mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result 1970-01-01 00:00:00 +0000
1094@@ -1,3 +0,0 @@
1095-show global variables like 'slow_query_log_microseconds_timestamp';
1096-Variable_name Value
1097-slow_query_log_microseconds_timestamp ON
1098
1099=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test'
1100--- mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test 2010-12-22 20:15:33 +0000
1101+++ mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test 1970-01-01 00:00:00 +0000
1102@@ -1,1 +0,0 @@
1103-show global variables like 'slow_query_log_microseconds_timestamp';
1104
1105=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt'
1106--- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt 2010-12-22 20:15:33 +0000
1107+++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt 1970-01-01 00:00:00 +0000
1108@@ -1,1 +0,0 @@
1109---use_global_long_query_time
1110
1111=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result'
1112--- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result 2010-12-22 20:15:33 +0000
1113+++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result 1970-01-01 00:00:00 +0000
1114@@ -1,3 +0,0 @@
1115-show global variables like 'use_global_long_query_time';
1116-Variable_name Value
1117-use_global_long_query_time ON
1118
1119=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test'
1120--- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test 2010-12-22 20:15:33 +0000
1121+++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test 1970-01-01 00:00:00 +0000
1122@@ -1,1 +0,0 @@
1123-show global variables like 'use_global_long_query_time';
1124
1125=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt'
1126--- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt 2010-12-06 03:50:48 +0000
1127+++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt 1970-01-01 00:00:00 +0000
1128@@ -1,1 +0,0 @@
1129---slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2 --use_global_log_slow_control=long_query_time --use_global_long_query_time=1
1130
1131=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result'
1132--- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result 2010-12-29 19:06:24 +0000
1133+++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result 1970-01-01 00:00:00 +0000
1134@@ -1,59 +0,0 @@
1135-SELECT sleep(1);
1136-sleep(1)
1137-0
1138-SELECT sleep(3);
1139-sleep(3)
1140-0
1141-SELECT sleep(5);
1142-sleep(5)
1143-0
1144-set global long_query_time=4;
1145-set global use_global_long_query_time=1;
1146-SELECT sleep(1);
1147-sleep(1)
1148-0
1149-SELECT sleep(3);
1150-sleep(3)
1151-0
1152-SELECT sleep(5);
1153-sleep(5)
1154-0
1155-set global long_query_time=2;
1156-set global use_global_long_query_time=0;
1157-FLUSH LOGS;
1158-3
1159-show global variables like 'use_global_log_slow_control';
1160-Variable_name Value
1161-use_global_log_slow_control none
1162-show global variables like 'use_global_long_query_time';
1163-Variable_name Value
1164-use_global_long_query_time OFF
1165-set global use_global_log_slow_control = long_query_time;
1166-show global variables like 'use_global_log_slow_control';
1167-Variable_name Value
1168-use_global_log_slow_control long_query_time
1169-show global variables like 'use_global_long_query_time';
1170-Variable_name Value
1171-use_global_long_query_time ON
1172-set global use_global_log_slow_control = log_slow_filter;
1173-show global variables like 'use_global_log_slow_control';
1174-Variable_name Value
1175-use_global_log_slow_control log_slow_filter
1176-show global variables like 'use_global_long_query_time';
1177-Variable_name Value
1178-use_global_long_query_time OFF
1179-set global use_global_long_query_time = ON;
1180-show global variables like 'use_global_log_slow_control';
1181-Variable_name Value
1182-use_global_log_slow_control log_slow_filter,long_query_time
1183-show global variables like 'use_global_long_query_time';
1184-Variable_name Value
1185-use_global_long_query_time ON
1186-set global use_global_long_query_time = OFF;
1187-show global variables like 'use_global_log_slow_control';
1188-Variable_name Value
1189-use_global_log_slow_control log_slow_filter
1190-show global variables like 'use_global_long_query_time';
1191-Variable_name Value
1192-use_global_long_query_time OFF
1193-set global use_global_log_slow_control = long_query_time;
1194
1195=== removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test'
1196--- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test 2010-12-29 19:06:24 +0000
1197+++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test 1970-01-01 00:00:00 +0000
1198@@ -1,41 +0,0 @@
1199-source include/have_innodb.inc;
1200-
1201-SELECT sleep(1);
1202-SELECT sleep(3);
1203-SELECT sleep(5);
1204-
1205-set global long_query_time=4;
1206-set global use_global_long_query_time=1;
1207-
1208-SELECT sleep(1);
1209-SELECT sleep(3);
1210-SELECT sleep(5);
1211-
1212-set global long_query_time=2;
1213-set global use_global_long_query_time=0;
1214-
1215-FLUSH LOGS;
1216---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-use_global_long_query_time.log
1217---let grep_pattern = Query_time
1218---source include/grep.inc
1219-
1220-show global variables like 'use_global_log_slow_control';
1221-show global variables like 'use_global_long_query_time';
1222-
1223-set global use_global_log_slow_control = long_query_time;
1224-show global variables like 'use_global_log_slow_control';
1225-show global variables like 'use_global_long_query_time';
1226-
1227-set global use_global_log_slow_control = log_slow_filter;
1228-show global variables like 'use_global_log_slow_control';
1229-show global variables like 'use_global_long_query_time';
1230-
1231-set global use_global_long_query_time = ON;
1232-show global variables like 'use_global_log_slow_control';
1233-show global variables like 'use_global_long_query_time';
1234-
1235-set global use_global_long_query_time = OFF;
1236-show global variables like 'use_global_log_slow_control';
1237-show global variables like 'use_global_long_query_time';
1238-
1239-set global use_global_log_slow_control = long_query_time;
1240
1241=== modified file 'slow_extended.patch'
1242--- slow_extended.patch 2011-07-13 15:24:53 +0000
1243+++ slow_extended.patch 2011-07-13 15:24:53 +0000
1244@@ -1575,3 +1575,945 @@
1245 /* STATE */
1246 #ifndef EMBEDDED_LIBRARY
1247 val= (char*) (tmp->locked ? "Locked" :
1248+diff -ruN a/mysql-test/suite/percona/include/log_grep.inc b/mysql-test/suite/percona/include/log_grep.inc
1249+--- a/mysql-test/suite/percona/include/log_grep.inc 1970-01-01 03:00:00.000000000 +0300
1250++++ b/mysql-test/suite/percona/include/log_grep.inc 2011-07-13 14:30:28.491361687 +0300
1251+@@ -0,0 +1,17 @@
1252++--disable_query_log
1253++--echo [log_grep.inc] file: $log_file pattern: $grep_pattern
1254++perl;
1255++ $log_file= $ENV{'log_file'};
1256++ $log_file_full_path= $ENV{'log_file_full_path'};
1257++ $grep_pattern= $ENV{'grep_pattern'};
1258++
1259++ open(FILE, "$log_file_full_path")
1260++ or die("Cannot open file $log_file_full_path: $!\n");
1261++
1262++ $lines = 0;
1263++ while(<FILE>) {
1264++ $lines++ if (/$grep_pattern/);
1265++ }
1266++ close(FILE);
1267++ print "[log_grep.inc] lines: $lines\n";
1268++EOF
1269+diff -ruN a/mysql-test/suite/percona/include/log_start.inc b/mysql-test/suite/percona/include/log_start.inc
1270+--- a/mysql-test/suite/percona/include/log_start.inc 1970-01-01 03:00:00.000000000 +0300
1271++++ b/mysql-test/suite/percona/include/log_start.inc 2011-07-13 14:30:28.491361687 +0300
1272+@@ -0,0 +1,16 @@
1273++--let slow_query_log_file_old=`SELECT Variable_value FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE Variable_name = 'slow_query_log_file';`
1274++--let slow_query_log_old=`SELECT Variable_value FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE Variable_name = 'slow_query_log';`
1275++--disable_query_log
1276++--let log_file_full_path = $MYSQLTEST_VARDIR/$log_file
1277++SET GLOBAL slow_query_log=0;
1278++perl;
1279++ $log_file_full_path= $ENV{'log_file_full_path'};
1280++ unlink $log_file_full_path;
1281++ open(FILE, '>', $log_file_full_path)
1282++ or die "Cannot create log file $log_file_full_path, reason: $!";
1283++ close(FILE);
1284++EOF
1285++--echo [log_start.inc] $log_file
1286++EVAL SET GLOBAL slow_query_log_file="$log_file_full_path";
1287++SET GLOBAL slow_query_log=1;
1288++--enable_query_log
1289+\ No newline at end of file
1290+diff -ruN a/mysql-test/suite/percona/include/log_stop.inc b/mysql-test/suite/percona/include/log_stop.inc
1291+--- a/mysql-test/suite/percona/include/log_stop.inc 1970-01-01 03:00:00.000000000 +0300
1292++++ b/mysql-test/suite/percona/include/log_stop.inc 2011-07-13 14:30:28.491361687 +0300
1293+@@ -0,0 +1,7 @@
1294++--disable_query_log
1295++FLUSH LOGS;
1296++SET GLOBAL slow_query_log=0;
1297++--echo [log_stop.inc] $log_file
1298++EVAL SET GLOBAL slow_query_log_file= "$slow_query_log_file_old";
1299++EVAL SET GLOBAL slow_query_log= $slow_query_log_old ;
1300++--enable_query_log
1301+diff -ruN a/mysql-test/suite/percona/r/log_slow_filter-cl.result b/mysql-test/suite/percona/r/log_slow_filter-cl.result
1302+--- a/mysql-test/suite/percona/r/log_slow_filter-cl.result 1970-01-01 03:00:00.000000000 +0300
1303++++ b/mysql-test/suite/percona/r/log_slow_filter-cl.result 2011-07-13 14:30:28.493361703 +0300
1304+@@ -0,0 +1,6 @@
1305++SHOW VARIABLES LIKE 'log_slow_filter';
1306++Variable_name Value
1307++log_slow_filter full_join
1308++SHOW GLOBAL VARIABLES LIKE 'log_slow_filter';
1309++Variable_name Value
1310++log_slow_filter full_join
1311+diff -ruN a/mysql-test/suite/percona/r/log_slow_filter.result b/mysql-test/suite/percona/r/log_slow_filter.result
1312+--- a/mysql-test/suite/percona/r/log_slow_filter.result 1970-01-01 03:00:00.000000000 +0300
1313++++ b/mysql-test/suite/percona/r/log_slow_filter.result 2011-07-13 14:30:28.493361703 +0300
1314+@@ -0,0 +1,16 @@
1315++drop table if exists t;
1316++create table t(id INT PRIMARY KEY);
1317++insert into t values(1);
1318++insert into t values(2);
1319++insert into t values(3);
1320++SET GLOBAL debug="+d,query_exec_time_debug";
1321++SET long_query_time=1;
1322++SET log_slow_filter=full_join;
1323++[log_start.inc] percona.slow_extended.log_slow_filter
1324++/* query_exec_time= "1.1" */ select * from t as t1, t as t2;
1325++[log_stop.inc] percona.slow_extended.log_slow_filter
1326++SET log_slow_filter=default;
1327++SET long_query_time=default;
1328++SET GLOBAL debug='';
1329++[log_grep.inc] file: percona.slow_extended.log_slow_filter pattern: Query_time
1330++[log_grep.inc] lines: 1
1331+diff -ruN a/mysql-test/suite/percona/r/log_slow_slave_statements-cl.result b/mysql-test/suite/percona/r/log_slow_slave_statements-cl.result
1332+--- a/mysql-test/suite/percona/r/log_slow_slave_statements-cl.result 1970-01-01 03:00:00.000000000 +0300
1333++++ b/mysql-test/suite/percona/r/log_slow_slave_statements-cl.result 2011-07-13 14:30:28.492361695 +0300
1334+@@ -0,0 +1,6 @@
1335++SHOW VARIABLES LIKE 'log_slow_slave_statements';
1336++Variable_name Value
1337++log_slow_slave_statements ON
1338++SHOW GLOBAL VARIABLES LIKE 'log_slow_slave_statements';
1339++Variable_name Value
1340++log_slow_slave_statements ON
1341+diff -ruN a/mysql-test/suite/percona/r/log_slow_slave_statements-innodb.result b/mysql-test/suite/percona/r/log_slow_slave_statements-innodb.result
1342+--- a/mysql-test/suite/percona/r/log_slow_slave_statements-innodb.result 1970-01-01 03:00:00.000000000 +0300
1343++++ b/mysql-test/suite/percona/r/log_slow_slave_statements-innodb.result 2011-07-13 14:30:28.492361695 +0300
1344+@@ -0,0 +1,18 @@
1345++include/master-slave.inc
1346++[connection master]
1347++DROP TABLE IF EXISTS t;
1348++CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB;
1349++INSERT INTO t VALUES
1350++(1,"aaaaabbbbbcccccdddddeeeeefffff"),
1351++(2,"aaaaabbbbbcccccdddddeeeeefffff"),
1352++(3,"aaaaabbbbbcccccdddddeeeeefffff"),
1353++(4,"aaaaabbbbbcccccdddddeeeeefffff"),
1354++(5,"aaaaabbbbbcccccdddddeeeeefffff");
1355++INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
1356++INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
1357++include/rpl_restart_server.inc [server_number=1]
1358++[log_start.inc] percona.slow_extended.log_slow_slave_statements-innodb
1359++[log_stop.inc] percona.slow_extended.log_slow_slave_statements-innodb
1360++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements-innodb pattern: InnoDB_IO_r_ops
1361++[log_grep.inc] lines: 1
1362++include/rpl_end.inc
1363+diff -ruN a/mysql-test/suite/percona/r/log_slow_slave_statements.result b/mysql-test/suite/percona/r/log_slow_slave_statements.result
1364+--- a/mysql-test/suite/percona/r/log_slow_slave_statements.result 1970-01-01 03:00:00.000000000 +0300
1365++++ b/mysql-test/suite/percona/r/log_slow_slave_statements.result 2011-07-13 14:30:28.492361695 +0300
1366+@@ -0,0 +1,46 @@
1367++include/master-slave.inc
1368++[connection master]
1369++DROP TABLE IF EXISTS t;
1370++CREATE TABLE t(id INT);
1371++[log_start.inc] percona.slow_extended.log_slow_slave_statements
1372++LINE 1
1373++LOG_SLOW_SLAVE_STATAMENTS is OFF
1374++LOG_SLOW_SLAVE_STATEMENTS=1
1375++LOG_SLOW_SLAVE_STATAMENTS is ON
1376++LINE 2
1377++include/restart_slave.inc
1378++LOG_SLOW_SLAVE_STATAMENTS is ON
1379++LINE 3
1380++LOG_SLOW_SLAVE_STATAMENTS is ON
1381++LOG_SLOW_SLAVE_STATEMENTS=0
1382++LOG_SLOW_SLAVE_STATAMENTS is OFF
1383++LINE 4
1384++include/restart_slave.inc
1385++LOG_SLOW_SLAVE_STATAMENTS is OFF
1386++LINE 5
1387++LOG_SLOW_SLAVE_STATAMENTS is OFF
1388++LOG_SLOW_SLAVE_STATEMENTS=1
1389++LOG_SLOW_SLAVE_STATAMENTS is ON
1390++LINE 6
1391++include/restart_slave.inc
1392++LOG_SLOW_SLAVE_STATAMENTS is ON
1393++LINE 7
1394++[log_stop.inc] percona.slow_extended.log_slow_slave_statements
1395++SET GLOBAL log_slow_slave_statements=default;
1396++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements pattern: INSERT INTO t VALUES \(1\)
1397++[log_grep.inc] lines: 0
1398++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements pattern: INSERT INTO t VALUES \(2\)
1399++[log_grep.inc] lines: 0
1400++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements pattern: INSERT INTO t VALUES \(3\)
1401++[log_grep.inc] lines: 1
1402++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements pattern: INSERT INTO t VALUES \(4\)
1403++[log_grep.inc] lines: 0
1404++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements pattern: INSERT INTO t VALUES \(5\)
1405++[log_grep.inc] lines: 0
1406++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements pattern: INSERT INTO t VALUES \(6\)
1407++[log_grep.inc] lines: 0
1408++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements pattern: INSERT INTO t VALUES \(7\)
1409++[log_grep.inc] lines: 1
1410++[log_grep.inc] file: percona.slow_extended.log_slow_slave_statements pattern: INSERT INTO t VALUES \(8\)
1411++[log_grep.inc] lines: 0
1412++include/rpl_end.inc
1413+diff -ruN a/mysql-test/suite/percona/r/log_slow_sp_statements-cl.result b/mysql-test/suite/percona/r/log_slow_sp_statements-cl.result
1414+--- a/mysql-test/suite/percona/r/log_slow_sp_statements-cl.result 1970-01-01 03:00:00.000000000 +0300
1415++++ b/mysql-test/suite/percona/r/log_slow_sp_statements-cl.result 2011-07-13 14:30:28.491361687 +0300
1416+@@ -0,0 +1,6 @@
1417++SHOW VARIABLES LIKE 'log_slow_sp_statements';
1418++Variable_name Value
1419++log_slow_sp_statements ON
1420++SHOW GLOBAL VARIABLES LIKE 'log_slow_sp_statements';
1421++Variable_name Value
1422++log_slow_sp_statements ON
1423+diff -ruN a/mysql-test/suite/percona/r/log_slow_sp_statements.result b/mysql-test/suite/percona/r/log_slow_sp_statements.result
1424+--- a/mysql-test/suite/percona/r/log_slow_sp_statements.result 1970-01-01 03:00:00.000000000 +0300
1425++++ b/mysql-test/suite/percona/r/log_slow_sp_statements.result 2011-07-13 14:30:28.492361695 +0300
1426+@@ -0,0 +1,17 @@
1427++SET GLOBAL debug="+d,query_exec_time_debug";
1428++SET long_query_time=1;
1429++SET GLOBAL log_slow_sp_statements=1;
1430++[log_start.inc] percona.slow_extended.log_slow_sp_statements
1431++CREATE PROCEDURE test_f()
1432++BEGIN
1433++SET SESSION debug="+d,query_exec_time_1.1";
1434++SET SESSION debug="+d,query_exec_time_2.1";
1435++SET SESSION debug="+d,query_exec_time_3.1";
1436++END^
1437++CALL test_f();
1438++[log_stop.inc] percona.slow_extended.log_slow_sp_statements
1439++SET GLOBAL log_slow_sp_statements=default;
1440++SET long_query_time=default;
1441++SET GLOBAL debug='';
1442++[log_grep.inc] file: percona.slow_extended.log_slow_sp_statements pattern: Query_time
1443++[log_grep.inc] lines: 3
1444+diff -ruN a/mysql-test/suite/percona/r/log_slow_timestamp_every-cl.result b/mysql-test/suite/percona/r/log_slow_timestamp_every-cl.result
1445+--- a/mysql-test/suite/percona/r/log_slow_timestamp_every-cl.result 1970-01-01 03:00:00.000000000 +0300
1446++++ b/mysql-test/suite/percona/r/log_slow_timestamp_every-cl.result 2011-07-13 14:30:28.492361695 +0300
1447+@@ -0,0 +1,6 @@
1448++SHOW VARIABLES LIKE 'log_slow_timestamp_every';
1449++Variable_name Value
1450++log_slow_timestamp_every ON
1451++SHOW GLOBAL VARIABLES LIKE 'log_slow_timestamp_every';
1452++Variable_name Value
1453++log_slow_timestamp_every ON
1454+diff -ruN a/mysql-test/suite/percona/r/log_slow_timestamp_every.result b/mysql-test/suite/percona/r/log_slow_timestamp_every.result
1455+--- a/mysql-test/suite/percona/r/log_slow_timestamp_every.result 1970-01-01 03:00:00.000000000 +0300
1456++++ b/mysql-test/suite/percona/r/log_slow_timestamp_every.result 2011-07-13 14:30:28.493361703 +0300
1457+@@ -0,0 +1,21 @@
1458++SET GLOBAL debug="+d,query_exec_time_debug";
1459++SET long_query_time=2;
1460++SET GLOBAL log_slow_timestamp_every=1;
1461++[log_start.inc] percona.slow_extended.log_slow_timestamp_every
1462++SET SESSION debug="+d,query_exec_time_2.1";
1463++SET SESSION debug="+d,query_exec_time_2.1";
1464++SET SESSION debug="+d,query_exec_time_2.1";
1465++SET GLOBAL log_slow_timestamp_every=0;
1466++SET SESSION debug="+d,query_exec_time_2.1";
1467++SET SESSION debug="+d,query_exec_time_2.1";
1468++SET SESSION debug="+d,query_exec_time_2.1";
1469++SET GLOBAL log_slow_timestamp_every=1;
1470++SET SESSION debug="+d,query_exec_time_2.1";
1471++SET SESSION debug="+d,query_exec_time_2.1";
1472++SET SESSION debug="+d,query_exec_time_2.1";
1473++[log_stop.inc] percona.slow_extended.log_slow_timestamp_every
1474++SET GLOBAL log_slow_timestamp_every=default;
1475++SET long_query_time=default;
1476++SET GLOBAL debug='';
1477++[log_grep.inc] file: percona.slow_extended.log_slow_timestamp_every pattern: # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+
1478++[log_grep.inc] lines: 6
1479+diff -ruN a/mysql-test/suite/percona/r/log_slow_verbosity-cl.result b/mysql-test/suite/percona/r/log_slow_verbosity-cl.result
1480+--- a/mysql-test/suite/percona/r/log_slow_verbosity-cl.result 1970-01-01 03:00:00.000000000 +0300
1481++++ b/mysql-test/suite/percona/r/log_slow_verbosity-cl.result 2011-07-13 14:30:28.493361703 +0300
1482+@@ -0,0 +1,6 @@
1483++SHOW VARIABLES LIKE 'log_slow_verbosity';
1484++Variable_name Value
1485++log_slow_verbosity microtime,query_plan,innodb
1486++SHOW GLOBAL VARIABLES LIKE 'log_slow_verbosity';
1487++Variable_name Value
1488++log_slow_verbosity microtime,query_plan,innodb
1489+diff -ruN a/mysql-test/suite/percona/r/log_slow_verbosity.result b/mysql-test/suite/percona/r/log_slow_verbosity.result
1490+--- a/mysql-test/suite/percona/r/log_slow_verbosity.result 1970-01-01 03:00:00.000000000 +0300
1491++++ b/mysql-test/suite/percona/r/log_slow_verbosity.result 2011-07-13 14:30:28.493361703 +0300
1492+@@ -0,0 +1,12 @@
1493++SET GLOBAL debug="+d,query_exec_time_debug";
1494++SET SESSION long_query_time=1;
1495++[log_start.inc] percona.slow_extended.log_slow_verbosity
1496++SET SESSION debug="+d,query_exec_time_2.1";
1497++SET SESSION log_slow_verbosity=innodb;
1498++SET SESSION debug="+d,query_exec_time_2.1";
1499++[log_stop.inc] percona.slow_extended.log_slow_verbosity
1500++SET log_slow_verbosity='';
1501++SET long_query_time=default;
1502++SET GLOBAL debug='';
1503++[log_grep.inc] file: percona.slow_extended.log_slow_verbosity pattern: No InnoDB statistics available for this query
1504++[log_grep.inc] lines: 1
1505+diff -ruN a/mysql-test/suite/percona/r/long_query_time.result b/mysql-test/suite/percona/r/long_query_time.result
1506+--- a/mysql-test/suite/percona/r/long_query_time.result 1970-01-01 03:00:00.000000000 +0300
1507++++ b/mysql-test/suite/percona/r/long_query_time.result 2011-07-13 14:30:28.493361703 +0300
1508+@@ -0,0 +1,16 @@
1509++SET GLOBAL debug="+d,query_exec_time_debug";
1510++SET long_query_time=2;
1511++[log_start.inc] percona.slow_extended.long_query_time
1512++SET SESSION debug="+d,query_exec_time_1.1";
1513++SET SESSION debug="+d,query_exec_time_3.1";
1514++SET SESSION debug="+d,query_exec_time_5.1";
1515++SET long_query_time=4;
1516++SET SESSION debug="+d,query_exec_time_1.1";
1517++SET SESSION debug="+d,query_exec_time_3.1";
1518++SET SESSION debug="+d,query_exec_time_5.1";
1519++SET long_query_time=2;
1520++[log_stop.inc] percona.slow_extended.long_query_time
1521++SET long_query_time=default;
1522++SET GLOBAL debug='';
1523++[log_grep.inc] file: percona.slow_extended.long_query_time pattern: Query_time
1524++[log_grep.inc] lines: 3
1525+diff -ruN a/mysql-test/suite/percona/r/min_examined_row_limit.result b/mysql-test/suite/percona/r/min_examined_row_limit.result
1526+--- a/mysql-test/suite/percona/r/min_examined_row_limit.result 1970-01-01 03:00:00.000000000 +0300
1527++++ b/mysql-test/suite/percona/r/min_examined_row_limit.result 2011-07-13 14:30:28.493361703 +0300
1528+@@ -0,0 +1,30 @@
1529++drop table if exists t;
1530++create table t(id INT PRIMARY KEY);
1531++insert into t values(1);
1532++insert into t values(2);
1533++insert into t values(3);
1534++SET GLOBAL debug="+d,query_exec_time_debug";
1535++SET GLOBAL long_query_time=2;
1536++SET GLOBAL use_global_log_slow_control='long_query_time,min_examined_row_limit';
1537++[log_start.inc] percona.slow_extended.min_examined_row_limit
1538++SET SESSION debug="+d,query_exec_time_2.1";
1539++SET GLOBAL min_examined_row_limit=5;
1540++/* query_exec_time= "2.1" */ select * from t as t1, t as t2;
1541++id id
1542++1 1
1543++2 1
1544++3 1
1545++1 2
1546++2 2
1547++3 2
1548++1 3
1549++2 3
1550++3 3
1551++SET SESSION debug="+d,query_exec_time_2.1";
1552++[log_stop.inc] percona.slow_extended.min_examined_row_limit
1553++SET GLOBAL min_examined_row_limit=default;
1554++SET GLOBAL use_global_log_slow_control='';
1555++SET GLOBAL long_query_time=default;
1556++SET GLOBAL debug='';
1557++[log_grep.inc] file: percona.slow_extended.min_examined_row_limit pattern: Query_time
1558++[log_grep.inc] lines: 1
1559+diff -ruN a/mysql-test/suite/percona/r/slow_query_log_microseconds_timestamp-cl.result b/mysql-test/suite/percona/r/slow_query_log_microseconds_timestamp-cl.result
1560+--- a/mysql-test/suite/percona/r/slow_query_log_microseconds_timestamp-cl.result 1970-01-01 03:00:00.000000000 +0300
1561++++ b/mysql-test/suite/percona/r/slow_query_log_microseconds_timestamp-cl.result 2011-07-13 14:30:28.492361695 +0300
1562+@@ -0,0 +1,6 @@
1563++SHOW VARIABLES LIKE 'slow_query_log_microseconds_timestamp';
1564++Variable_name Value
1565++slow_query_log_microseconds_timestamp ON
1566++SHOW GLOBAL VARIABLES LIKE 'slow_query_log_microseconds_timestamp';
1567++Variable_name Value
1568++slow_query_log_microseconds_timestamp ON
1569+diff -ruN a/mysql-test/suite/percona/r/slow_query_log_microseconds_timestamp.result b/mysql-test/suite/percona/r/slow_query_log_microseconds_timestamp.result
1570+--- a/mysql-test/suite/percona/r/slow_query_log_microseconds_timestamp.result 1970-01-01 03:00:00.000000000 +0300
1571++++ b/mysql-test/suite/percona/r/slow_query_log_microseconds_timestamp.result 2011-07-13 14:30:28.492361695 +0300
1572+@@ -0,0 +1,14 @@
1573++SET GLOBAL debug="+d,query_exec_time_debug";
1574++SET long_query_time=2;
1575++[log_start.inc] percona.slow_extended.slow_query_log_microseconds_timestamp
1576++SET SESSION debug="+d,query_exec_time_2.1";
1577++SET GLOBAL slow_query_log_microseconds_timestamp=1;
1578++SET SESSION debug="+d,query_exec_time_2.1";
1579++[log_stop.inc] percona.slow_extended.slow_query_log_microseconds_timestamp
1580++SET GLOBAL slow_query_log_microseconds_timestamp=default;
1581++SET long_query_time=default;
1582++SET GLOBAL debug="";
1583++[log_grep.inc] file: percona.slow_extended.slow_query_log_microseconds_timestamp pattern: # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+.[0-9]+
1584++[log_grep.inc] lines: 1
1585++[log_grep.inc] file: percona.slow_extended.slow_query_log_microseconds_timestamp pattern: # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+
1586++[log_grep.inc] lines: 2
1587+diff -ruN a/mysql-test/suite/percona/r/use_global_log_slow_control-cl.result b/mysql-test/suite/percona/r/use_global_log_slow_control-cl.result
1588+--- a/mysql-test/suite/percona/r/use_global_log_slow_control-cl.result 1970-01-01 03:00:00.000000000 +0300
1589++++ b/mysql-test/suite/percona/r/use_global_log_slow_control-cl.result 2011-07-13 14:30:28.492361695 +0300
1590+@@ -0,0 +1,6 @@
1591++SHOW VARIABLES LIKE 'use_global_log_slow_control';
1592++Variable_name Value
1593++use_global_log_slow_control log_slow_verbosity,long_query_time
1594++SHOW GLOBAL VARIABLES LIKE 'use_global_log_slow_control';
1595++Variable_name Value
1596++use_global_log_slow_control log_slow_verbosity,long_query_time
1597+diff -ruN a/mysql-test/suite/percona/r/use_global_log_slow_control.result b/mysql-test/suite/percona/r/use_global_log_slow_control.result
1598+--- a/mysql-test/suite/percona/r/use_global_log_slow_control.result 1970-01-01 03:00:00.000000000 +0300
1599++++ b/mysql-test/suite/percona/r/use_global_log_slow_control.result 2011-07-13 14:30:28.493361703 +0300
1600+@@ -0,0 +1,14 @@
1601++SET GLOBAL debug="+d,query_exec_time_debug";
1602++SET GLOBAL long_query_time=1;
1603++[log_start.inc] percona.slow_extended.use_global_log_slow_control
1604++SET SESSION debug="+d,query_exec_time_1.1";
1605++SET GLOBAL log_slow_verbosity=innodb;
1606++SET GLOBAL use_global_log_slow_control="log_slow_verbosity,long_query_time";
1607++SET SESSION debug="+d,query_exec_time_1.1";
1608++[log_stop.inc] percona.slow_extended.use_global_log_slow_control
1609++SET GLOBAL use_global_log_slow_control='';
1610++SET GLOBAL log_slow_verbosity='';
1611++SET GLOBAL long_query_time=default;
1612++SET GLOBAL debug='';
1613++[log_grep.inc] file: percona.slow_extended.use_global_log_slow_control pattern: No InnoDB statistics available for this query
1614++[log_grep.inc] lines: 1
1615+diff -ruN a/mysql-test/suite/percona/r/use_global_long_query_time.result b/mysql-test/suite/percona/r/use_global_long_query_time.result
1616+--- a/mysql-test/suite/percona/r/use_global_long_query_time.result 1970-01-01 03:00:00.000000000 +0300
1617++++ b/mysql-test/suite/percona/r/use_global_long_query_time.result 2011-07-13 14:30:28.492361695 +0300
1618+@@ -0,0 +1,17 @@
1619++SET GLOBAL debug="+d,query_exec_time_debug";
1620++[log_start.inc] percona.slow_extended.use_global_long_query_time
1621++SET long_query_time=2;
1622++SET SESSION debug="+d,query_exec_time_1.1";
1623++SET SESSION debug="+d,query_exec_time_3.1";
1624++SET SESSION debug="+d,query_exec_time_5.1";
1625++SET GLOBAL long_query_time=4;
1626++SET GLOBAL use_global_long_query_time=1;
1627++SET SESSION debug="+d,query_exec_time_1.1";
1628++SET SESSION debug="+d,query_exec_time_3.1";
1629++SET SESSION debug="+d,query_exec_time_5.1";
1630++[log_stop.inc] percona.slow_extended.use_global_long_query_time
1631++SET GLOBAL long_query_time=default;
1632++SET GLOBAL use_global_long_query_time=0;
1633++SET GLOBAL debug='';
1634++[log_grep.inc] file: percona.slow_extended.use_global_long_query_time pattern: Query_time
1635++[log_grep.inc] lines: 3
1636+diff -ruN a/mysql-test/suite/percona/t/log_slow_filter-cl-master.opt b/mysql-test/suite/percona/t/log_slow_filter-cl-master.opt
1637+--- a/mysql-test/suite/percona/t/log_slow_filter-cl-master.opt 1970-01-01 03:00:00.000000000 +0300
1638++++ b/mysql-test/suite/percona/t/log_slow_filter-cl-master.opt 2011-07-13 14:30:28.484361633 +0300
1639+@@ -0,0 +1 @@
1640++--log_slow_filter=full_join
1641+diff -ruN a/mysql-test/suite/percona/t/log_slow_filter-cl.test b/mysql-test/suite/percona/t/log_slow_filter-cl.test
1642+--- a/mysql-test/suite/percona/t/log_slow_filter-cl.test 1970-01-01 03:00:00.000000000 +0300
1643++++ b/mysql-test/suite/percona/t/log_slow_filter-cl.test 2011-07-13 14:30:28.484361633 +0300
1644+@@ -0,0 +1,2 @@
1645++SHOW VARIABLES LIKE 'log_slow_filter';
1646++SHOW GLOBAL VARIABLES LIKE 'log_slow_filter';
1647+diff -ruN a/mysql-test/suite/percona/t/log_slow_filter.test b/mysql-test/suite/percona/t/log_slow_filter.test
1648+--- a/mysql-test/suite/percona/t/log_slow_filter.test 1970-01-01 03:00:00.000000000 +0300
1649++++ b/mysql-test/suite/percona/t/log_slow_filter.test 2011-07-13 14:30:28.483361626 +0300
1650+@@ -0,0 +1,30 @@
1651++--source include/have_debug.inc
1652++
1653++--disable_warnings
1654++drop table if exists t;
1655++--enable_warnings
1656++
1657++create table t(id INT PRIMARY KEY);
1658++insert into t values(1);
1659++insert into t values(2);
1660++insert into t values(3);
1661++
1662++SET GLOBAL debug="+d,query_exec_time_debug";
1663++SET long_query_time=1;
1664++SET log_slow_filter=full_join;
1665++--let log_file=percona.slow_extended.log_slow_filter
1666++--source suite/percona/include/log_start.inc
1667++
1668++--disable_result_log
1669++/* query_exec_time= "1.1" */ select * from t as t1, t as t2;
1670++--enable_result_log
1671++
1672++--source suite/percona/include/log_stop.inc
1673++SET log_slow_filter=default;
1674++SET long_query_time=default;
1675++SET GLOBAL debug='';
1676++
1677++--let grep_pattern = Query_time
1678++--source suite/percona/include/log_grep.inc
1679++
1680++DROP TABLE t;
1681+diff -ruN a/mysql-test/suite/percona/t/log_slow_slave_statements-cl-master.opt b/mysql-test/suite/percona/t/log_slow_slave_statements-cl-master.opt
1682+--- a/mysql-test/suite/percona/t/log_slow_slave_statements-cl-master.opt 1970-01-01 03:00:00.000000000 +0300
1683++++ b/mysql-test/suite/percona/t/log_slow_slave_statements-cl-master.opt 2011-07-13 14:30:28.484361633 +0300
1684+@@ -0,0 +1 @@
1685++--log_slow_slave_statements
1686+\ No newline at end of file
1687+diff -ruN a/mysql-test/suite/percona/t/log_slow_slave_statements-cl.test b/mysql-test/suite/percona/t/log_slow_slave_statements-cl.test
1688+--- a/mysql-test/suite/percona/t/log_slow_slave_statements-cl.test 1970-01-01 03:00:00.000000000 +0300
1689++++ b/mysql-test/suite/percona/t/log_slow_slave_statements-cl.test 2011-07-13 14:30:28.483361626 +0300
1690+@@ -0,0 +1,3 @@
1691++SHOW VARIABLES LIKE 'log_slow_slave_statements';
1692++SHOW GLOBAL VARIABLES LIKE 'log_slow_slave_statements';
1693++
1694+diff -ruN a/mysql-test/suite/percona/t/log_slow_slave_statements-innodb-slave.opt b/mysql-test/suite/percona/t/log_slow_slave_statements-innodb-slave.opt
1695+--- a/mysql-test/suite/percona/t/log_slow_slave_statements-innodb-slave.opt 1970-01-01 03:00:00.000000000 +0300
1696++++ b/mysql-test/suite/percona/t/log_slow_slave_statements-innodb-slave.opt 2011-07-13 14:30:28.482361618 +0300
1697+@@ -0,0 +1 @@
1698++--long_query_time=0 --log_slow_slave_statements --log_slow_verbosity=innodb
1699+\ No newline at end of file
1700+diff -ruN a/mysql-test/suite/percona/t/log_slow_slave_statements-innodb.test b/mysql-test/suite/percona/t/log_slow_slave_statements-innodb.test
1701+--- a/mysql-test/suite/percona/t/log_slow_slave_statements-innodb.test 1970-01-01 03:00:00.000000000 +0300
1702++++ b/mysql-test/suite/percona/t/log_slow_slave_statements-innodb.test 2011-07-13 14:30:28.484361633 +0300
1703+@@ -0,0 +1,48 @@
1704++--source include/have_binlog_format_statement.inc
1705++--source include/master-slave.inc
1706++--source include/have_innodb.inc
1707++--let log_file=percona.slow_extended.log_slow_slave_statements-innodb
1708++
1709++connection master;
1710++-- disable_warnings
1711++DROP TABLE IF EXISTS t;
1712++-- enable_warnings
1713++
1714++CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB;
1715++INSERT INTO t VALUES
1716++(1,"aaaaabbbbbcccccdddddeeeeefffff"),
1717++(2,"aaaaabbbbbcccccdddddeeeeefffff"),
1718++(3,"aaaaabbbbbcccccdddddeeeeefffff"),
1719++(4,"aaaaabbbbbcccccdddddeeeeefffff"),
1720++(5,"aaaaabbbbbcccccdddddeeeeefffff");
1721++INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
1722++INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
1723++sync_slave_with_master;
1724++
1725++--let rpl_server_number=1
1726++--source include/rpl_restart_server.inc
1727++
1728++connection slave;
1729++--source suite/percona/include/log_start.inc
1730++
1731++--disable_query_log
1732++--disable_result_log
1733++
1734++connection master;
1735++INSERT INTO t SELECT t.id,t.data from t;
1736++sync_slave_with_master;
1737++
1738++connection slave;
1739++--source suite/percona/include/log_stop.inc
1740++
1741++--enable_query_log
1742++--enable_result_log
1743++
1744++--let grep_pattern = InnoDB_IO_r_ops
1745++--source suite/percona/include/log_grep.inc
1746++
1747++connection master;
1748++DROP TABLE t;
1749++sync_slave_with_master;
1750++
1751++--source include/rpl_end.inc
1752+diff -ruN a/mysql-test/suite/percona/t/log_slow_slave_statements-slave.opt b/mysql-test/suite/percona/t/log_slow_slave_statements-slave.opt
1753+--- a/mysql-test/suite/percona/t/log_slow_slave_statements-slave.opt 1970-01-01 03:00:00.000000000 +0300
1754++++ b/mysql-test/suite/percona/t/log_slow_slave_statements-slave.opt 2011-07-13 14:30:28.483361626 +0300
1755+@@ -0,0 +1 @@
1756++--long_query_time=0
1757+\ No newline at end of file
1758+diff -ruN a/mysql-test/suite/percona/t/log_slow_slave_statements.test b/mysql-test/suite/percona/t/log_slow_slave_statements.test
1759+--- a/mysql-test/suite/percona/t/log_slow_slave_statements.test 1970-01-01 03:00:00.000000000 +0300
1760++++ b/mysql-test/suite/percona/t/log_slow_slave_statements.test 2011-07-13 14:30:28.483361626 +0300
1761+@@ -0,0 +1,119 @@
1762++-- source include/have_binlog_format_statement.inc
1763++-- source include/master-slave.inc
1764++--let log_file=percona.slow_extended.log_slow_slave_statements
1765++--let show=SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'log_slow_slave_statements';
1766++
1767++connection master;
1768++-- disable_warnings
1769++DROP TABLE IF EXISTS t;
1770++-- enable_warnings
1771++
1772++CREATE TABLE t(id INT);
1773++sync_slave_with_master;
1774++
1775++connection slave;
1776++--source suite/percona/include/log_start.inc
1777++
1778++--disable_query_log
1779++--disable_result_log
1780++
1781++--echo LINE 1
1782++connection master;
1783++INSERT INTO t VALUES (1);
1784++sync_slave_with_master;
1785++
1786++connection slave;
1787++--let value=`$show`
1788++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1789++--echo LOG_SLOW_SLAVE_STATEMENTS=1
1790++SET GLOBAL log_slow_slave_statements=1;
1791++--let value=`$show`
1792++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1793++
1794++--echo LINE 2
1795++connection master;
1796++INSERT INTO t VALUES (2);
1797++sync_slave_with_master;
1798++
1799++--source include/restart_slave_sql.inc
1800++
1801++connection slave;
1802++--let value=`$show`
1803++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1804++
1805++--echo LINE 3
1806++connection master;
1807++INSERT INTO t VALUES (3);
1808++sync_slave_with_master;
1809++
1810++connection slave;
1811++--let value=`$show`
1812++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1813++--echo LOG_SLOW_SLAVE_STATEMENTS=0
1814++SET GLOBAL log_slow_slave_statements=0;
1815++--let value=`$show`
1816++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1817++
1818++--echo LINE 4
1819++connection master;
1820++INSERT INTO t VALUES (4);
1821++sync_slave_with_master;
1822++
1823++--source include/restart_slave_sql.inc
1824++
1825++connection slave;
1826++--let value=`$show`
1827++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1828++
1829++--echo LINE 5
1830++connection master;
1831++INSERT INTO t VALUES (5);
1832++sync_slave_with_master;
1833++
1834++connection slave;
1835++--let value=`$show`
1836++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1837++--echo LOG_SLOW_SLAVE_STATEMENTS=1
1838++SET GLOBAL log_slow_slave_statements=1;
1839++--let value=`$show`
1840++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1841++
1842++--echo LINE 6
1843++connection master;
1844++INSERT INTO t VALUES (6);
1845++sync_slave_with_master;
1846++
1847++--source include/restart_slave_sql.inc
1848++
1849++connection slave;
1850++--let value=`$show`
1851++--echo LOG_SLOW_SLAVE_STATAMENTS is $value
1852++
1853++--echo LINE 7
1854++connection master;
1855++INSERT INTO t VALUES (7);
1856++sync_slave_with_master;
1857++
1858++--enable_query_log
1859++--enable_result_log
1860++
1861++connection slave;
1862++--source suite/percona/include/log_stop.inc
1863++SET GLOBAL log_slow_slave_statements=default;
1864++
1865++connection slave;
1866++--let i=1
1867++--let k=8
1868++while($k)
1869++{
1870++--let grep_pattern= INSERT INTO t VALUES \($i\)
1871++--source suite/percona/include/log_grep.inc
1872++ inc $i;
1873++ dec $k;
1874++}
1875++
1876++connection master;
1877++DROP TABLE t;
1878++sync_slave_with_master;
1879++
1880++--source include/rpl_end.inc
1881+diff -ruN a/mysql-test/suite/percona/t/log_slow_sp_statements-cl-master.opt b/mysql-test/suite/percona/t/log_slow_sp_statements-cl-master.opt
1882+--- a/mysql-test/suite/percona/t/log_slow_sp_statements-cl-master.opt 1970-01-01 03:00:00.000000000 +0300
1883++++ b/mysql-test/suite/percona/t/log_slow_sp_statements-cl-master.opt 2011-07-13 14:30:28.483361626 +0300
1884+@@ -0,0 +1 @@
1885++--log_slow_sp_statements
1886+diff -ruN a/mysql-test/suite/percona/t/log_slow_sp_statements-cl.test b/mysql-test/suite/percona/t/log_slow_sp_statements-cl.test
1887+--- a/mysql-test/suite/percona/t/log_slow_sp_statements-cl.test 1970-01-01 03:00:00.000000000 +0300
1888++++ b/mysql-test/suite/percona/t/log_slow_sp_statements-cl.test 2011-07-13 14:30:28.485361641 +0300
1889+@@ -0,0 +1,2 @@
1890++SHOW VARIABLES LIKE 'log_slow_sp_statements';
1891++SHOW GLOBAL VARIABLES LIKE 'log_slow_sp_statements';
1892+diff -ruN a/mysql-test/suite/percona/t/log_slow_sp_statements.test b/mysql-test/suite/percona/t/log_slow_sp_statements.test
1893+--- a/mysql-test/suite/percona/t/log_slow_sp_statements.test 1970-01-01 03:00:00.000000000 +0300
1894++++ b/mysql-test/suite/percona/t/log_slow_sp_statements.test 2011-07-13 14:30:28.484361633 +0300
1895+@@ -0,0 +1,28 @@
1896++--source include/have_debug.inc
1897++
1898++SET GLOBAL debug="+d,query_exec_time_debug";
1899++SET long_query_time=1;
1900++SET GLOBAL log_slow_sp_statements=1;
1901++--let log_file=percona.slow_extended.log_slow_sp_statements
1902++--source suite/percona/include/log_start.inc
1903++
1904++delimiter ^;
1905++CREATE PROCEDURE test_f()
1906++BEGIN
1907++ SET SESSION debug="+d,query_exec_time_1.1";
1908++ SET SESSION debug="+d,query_exec_time_2.1";
1909++ SET SESSION debug="+d,query_exec_time_3.1";
1910++END^
1911++delimiter ;^
1912++
1913++CALL test_f();
1914++
1915++--source suite/percona/include/log_stop.inc
1916++SET GLOBAL log_slow_sp_statements=default;
1917++SET long_query_time=default;
1918++SET GLOBAL debug='';
1919++
1920++--let grep_pattern = Query_time
1921++--source suite/percona/include/log_grep.inc
1922++
1923++DROP PROCEDURE test_f;
1924+diff -ruN a/mysql-test/suite/percona/t/log_slow_timestamp_every-cl-master.opt b/mysql-test/suite/percona/t/log_slow_timestamp_every-cl-master.opt
1925+--- a/mysql-test/suite/percona/t/log_slow_timestamp_every-cl-master.opt 1970-01-01 03:00:00.000000000 +0300
1926++++ b/mysql-test/suite/percona/t/log_slow_timestamp_every-cl-master.opt 2011-07-13 14:30:28.482361618 +0300
1927+@@ -0,0 +1 @@
1928++--log_slow_timestamp_every
1929+\ No newline at end of file
1930+diff -ruN a/mysql-test/suite/percona/t/log_slow_timestamp_every-cl.test b/mysql-test/suite/percona/t/log_slow_timestamp_every-cl.test
1931+--- a/mysql-test/suite/percona/t/log_slow_timestamp_every-cl.test 1970-01-01 03:00:00.000000000 +0300
1932++++ b/mysql-test/suite/percona/t/log_slow_timestamp_every-cl.test 2011-07-13 14:30:28.483361626 +0300
1933+@@ -0,0 +1,2 @@
1934++SHOW VARIABLES LIKE 'log_slow_timestamp_every';
1935++SHOW GLOBAL VARIABLES LIKE 'log_slow_timestamp_every';
1936+diff -ruN a/mysql-test/suite/percona/t/log_slow_timestamp_every.test b/mysql-test/suite/percona/t/log_slow_timestamp_every.test
1937+--- a/mysql-test/suite/percona/t/log_slow_timestamp_every.test 1970-01-01 03:00:00.000000000 +0300
1938++++ b/mysql-test/suite/percona/t/log_slow_timestamp_every.test 2011-07-13 14:30:28.482361618 +0300
1939+@@ -0,0 +1,31 @@
1940++--source include/have_debug.inc
1941++
1942++SET GLOBAL debug="+d,query_exec_time_debug";
1943++SET long_query_time=2;
1944++SET GLOBAL log_slow_timestamp_every=1;
1945++--let log_file=percona.slow_extended.log_slow_timestamp_every
1946++--source suite/percona/include/log_start.inc
1947++
1948++SET SESSION debug="+d,query_exec_time_2.1";
1949++SET SESSION debug="+d,query_exec_time_2.1";
1950++SET SESSION debug="+d,query_exec_time_2.1";
1951++
1952++SET GLOBAL log_slow_timestamp_every=0;
1953++
1954++SET SESSION debug="+d,query_exec_time_2.1";
1955++SET SESSION debug="+d,query_exec_time_2.1";
1956++SET SESSION debug="+d,query_exec_time_2.1";
1957++
1958++SET GLOBAL log_slow_timestamp_every=1;
1959++
1960++SET SESSION debug="+d,query_exec_time_2.1";
1961++SET SESSION debug="+d,query_exec_time_2.1";
1962++SET SESSION debug="+d,query_exec_time_2.1";
1963++
1964++--source suite/percona/include/log_stop.inc
1965++SET GLOBAL log_slow_timestamp_every=default;
1966++SET long_query_time=default;
1967++SET GLOBAL debug='';
1968++
1969++--let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+
1970++--source suite/percona/include/log_grep.inc
1971+diff -ruN a/mysql-test/suite/percona/t/log_slow_verbosity-cl-master.opt b/mysql-test/suite/percona/t/log_slow_verbosity-cl-master.opt
1972+--- a/mysql-test/suite/percona/t/log_slow_verbosity-cl-master.opt 1970-01-01 03:00:00.000000000 +0300
1973++++ b/mysql-test/suite/percona/t/log_slow_verbosity-cl-master.opt 2011-07-13 14:30:28.482361618 +0300
1974+@@ -0,0 +1 @@
1975++--log_slow_verbosity="full"
1976+diff -ruN a/mysql-test/suite/percona/t/log_slow_verbosity-cl.test b/mysql-test/suite/percona/t/log_slow_verbosity-cl.test
1977+--- a/mysql-test/suite/percona/t/log_slow_verbosity-cl.test 1970-01-01 03:00:00.000000000 +0300
1978++++ b/mysql-test/suite/percona/t/log_slow_verbosity-cl.test 2011-07-13 14:30:28.484361633 +0300
1979+@@ -0,0 +1,2 @@
1980++SHOW VARIABLES LIKE 'log_slow_verbosity';
1981++SHOW GLOBAL VARIABLES LIKE 'log_slow_verbosity';
1982+diff -ruN a/mysql-test/suite/percona/t/log_slow_verbosity.test b/mysql-test/suite/percona/t/log_slow_verbosity.test
1983+--- a/mysql-test/suite/percona/t/log_slow_verbosity.test 1970-01-01 03:00:00.000000000 +0300
1984++++ b/mysql-test/suite/percona/t/log_slow_verbosity.test 2011-07-13 14:30:28.483361626 +0300
1985+@@ -0,0 +1,19 @@
1986++--source include/have_innodb.inc
1987++--source include/have_debug.inc
1988++
1989++SET GLOBAL debug="+d,query_exec_time_debug";
1990++SET SESSION long_query_time=1;
1991++--let log_file=percona.slow_extended.log_slow_verbosity
1992++--source suite/percona/include/log_start.inc
1993++
1994++SET SESSION debug="+d,query_exec_time_2.1";
1995++SET SESSION log_slow_verbosity=innodb;
1996++SET SESSION debug="+d,query_exec_time_2.1";
1997++
1998++--source suite/percona/include/log_stop.inc
1999++SET log_slow_verbosity='';
2000++SET long_query_time=default;
2001++SET GLOBAL debug='';
2002++
2003++--let grep_pattern = No InnoDB statistics available for this query
2004++--source suite/percona/include/log_grep.inc
2005+diff -ruN a/mysql-test/suite/percona/t/long_query_time.test b/mysql-test/suite/percona/t/long_query_time.test
2006+--- a/mysql-test/suite/percona/t/long_query_time.test 1970-01-01 03:00:00.000000000 +0300
2007++++ b/mysql-test/suite/percona/t/long_query_time.test 2011-07-13 14:30:28.482361618 +0300
2008+@@ -0,0 +1,25 @@
2009++--source include/have_debug.inc
2010++
2011++SET GLOBAL debug="+d,query_exec_time_debug";
2012++SET long_query_time=2;
2013++--let log_file=percona.slow_extended.long_query_time
2014++--source suite/percona/include/log_start.inc
2015++
2016++SET SESSION debug="+d,query_exec_time_1.1";
2017++SET SESSION debug="+d,query_exec_time_3.1";
2018++SET SESSION debug="+d,query_exec_time_5.1";
2019++
2020++SET long_query_time=4;
2021++
2022++SET SESSION debug="+d,query_exec_time_1.1";
2023++SET SESSION debug="+d,query_exec_time_3.1";
2024++SET SESSION debug="+d,query_exec_time_5.1";
2025++
2026++SET long_query_time=2;
2027++
2028++--source suite/percona/include/log_stop.inc
2029++SET long_query_time=default;
2030++SET GLOBAL debug='';
2031++
2032++--let grep_pattern = Query_time
2033++--source suite/percona/include/log_grep.inc
2034+diff -ruN a/mysql-test/suite/percona/t/min_examined_row_limit.test b/mysql-test/suite/percona/t/min_examined_row_limit.test
2035+--- a/mysql-test/suite/percona/t/min_examined_row_limit.test 1970-01-01 03:00:00.000000000 +0300
2036++++ b/mysql-test/suite/percona/t/min_examined_row_limit.test 2011-07-13 14:30:28.484361633 +0300
2037+@@ -0,0 +1,34 @@
2038++--source include/have_debug.inc
2039++
2040++--disable_warnings
2041++drop table if exists t;
2042++--enable_warnings
2043++
2044++create table t(id INT PRIMARY KEY);
2045++insert into t values(1);
2046++insert into t values(2);
2047++insert into t values(3);
2048++
2049++SET GLOBAL debug="+d,query_exec_time_debug";
2050++SET GLOBAL long_query_time=2;
2051++SET GLOBAL use_global_log_slow_control='long_query_time,min_examined_row_limit';
2052++--let log_file=percona.slow_extended.min_examined_row_limit
2053++--source suite/percona/include/log_start.inc
2054++
2055++SET SESSION debug="+d,query_exec_time_2.1";
2056++
2057++SET GLOBAL min_examined_row_limit=5;
2058++
2059++/* query_exec_time= "2.1" */ select * from t as t1, t as t2;
2060++SET SESSION debug="+d,query_exec_time_2.1";
2061++
2062++--source suite/percona/include/log_stop.inc
2063++SET GLOBAL min_examined_row_limit=default;
2064++SET GLOBAL use_global_log_slow_control='';
2065++SET GLOBAL long_query_time=default;
2066++SET GLOBAL debug='';
2067++
2068++--let grep_pattern = Query_time
2069++--source suite/percona/include/log_grep.inc
2070++
2071++DROP TABLE t;
2072+diff -ruN a/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-cl-master.opt b/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-cl-master.opt
2073+--- a/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-cl-master.opt 1970-01-01 03:00:00.000000000 +0300
2074++++ b/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-cl-master.opt 2011-07-13 14:30:28.483361626 +0300
2075+@@ -0,0 +1 @@
2076++--slow_query_log_microseconds_timestamp
2077+\ No newline at end of file
2078+diff -ruN a/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-cl.test b/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-cl.test
2079+--- a/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-cl.test 1970-01-01 03:00:00.000000000 +0300
2080++++ b/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-cl.test 2011-07-13 14:30:28.484361633 +0300
2081+@@ -0,0 +1,2 @@
2082++SHOW VARIABLES LIKE 'slow_query_log_microseconds_timestamp';
2083++SHOW GLOBAL VARIABLES LIKE 'slow_query_log_microseconds_timestamp';
2084+diff -ruN a/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-master.opt b/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-master.opt
2085+--- a/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-master.opt 1970-01-01 03:00:00.000000000 +0300
2086++++ b/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp-master.opt 2011-07-13 14:30:28.483361626 +0300
2087+@@ -0,0 +1 @@
2088++--log_slow_timestamp_every
2089+\ No newline at end of file
2090+diff -ruN a/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp.test b/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp.test
2091+--- a/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp.test 1970-01-01 03:00:00.000000000 +0300
2092++++ b/mysql-test/suite/percona/t/slow_query_log_microseconds_timestamp.test 2011-07-13 14:30:28.485361641 +0300
2093+@@ -0,0 +1,23 @@
2094++--source include/have_debug.inc
2095++
2096++SET GLOBAL debug="+d,query_exec_time_debug";
2097++SET long_query_time=2;
2098++--let log_file=percona.slow_extended.slow_query_log_microseconds_timestamp
2099++--source suite/percona/include/log_start.inc
2100++
2101++SET SESSION debug="+d,query_exec_time_2.1";
2102++
2103++SET GLOBAL slow_query_log_microseconds_timestamp=1;
2104++
2105++SET SESSION debug="+d,query_exec_time_2.1";
2106++
2107++--source suite/percona/include/log_stop.inc
2108++SET GLOBAL slow_query_log_microseconds_timestamp=default;
2109++SET long_query_time=default;
2110++SET GLOBAL debug="";
2111++
2112++--let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+.[0-9]+
2113++--source suite/percona/include/log_grep.inc
2114++
2115++--let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+
2116++--source suite/percona/include/log_grep.inc
2117+diff -ruN a/mysql-test/suite/percona/t/use_global_log_slow_control-cl-master.opt b/mysql-test/suite/percona/t/use_global_log_slow_control-cl-master.opt
2118+--- a/mysql-test/suite/percona/t/use_global_log_slow_control-cl-master.opt 1970-01-01 03:00:00.000000000 +0300
2119++++ b/mysql-test/suite/percona/t/use_global_log_slow_control-cl-master.opt 2011-07-13 14:30:28.484361633 +0300
2120+@@ -0,0 +1 @@
2121++--use_global_log_slow_control="log_slow_verbosity,long_query_time"
2122+diff -ruN a/mysql-test/suite/percona/t/use_global_log_slow_control-cl.test b/mysql-test/suite/percona/t/use_global_log_slow_control-cl.test
2123+--- a/mysql-test/suite/percona/t/use_global_log_slow_control-cl.test 1970-01-01 03:00:00.000000000 +0300
2124++++ b/mysql-test/suite/percona/t/use_global_log_slow_control-cl.test 2011-07-13 14:30:28.484361633 +0300
2125+@@ -0,0 +1,2 @@
2126++SHOW VARIABLES LIKE 'use_global_log_slow_control';
2127++SHOW GLOBAL VARIABLES LIKE 'use_global_log_slow_control';
2128+diff -ruN a/mysql-test/suite/percona/t/use_global_log_slow_control.test b/mysql-test/suite/percona/t/use_global_log_slow_control.test
2129+--- a/mysql-test/suite/percona/t/use_global_log_slow_control.test 1970-01-01 03:00:00.000000000 +0300
2130++++ b/mysql-test/suite/percona/t/use_global_log_slow_control.test 2011-07-13 14:30:28.483361626 +0300
2131+@@ -0,0 +1,26 @@
2132++--source include/have_debug.inc
2133++--source include/have_innodb.inc
2134++
2135++SET GLOBAL debug="+d,query_exec_time_debug";
2136++SET GLOBAL long_query_time=1;
2137++
2138++--let log_file=percona.slow_extended.use_global_log_slow_control
2139++--source suite/percona/include/log_start.inc
2140++
2141++SET SESSION debug="+d,query_exec_time_1.1";
2142++
2143++SET GLOBAL log_slow_verbosity=innodb;
2144++SET GLOBAL use_global_log_slow_control="log_slow_verbosity,long_query_time";
2145++
2146++SET SESSION debug="+d,query_exec_time_1.1";
2147++
2148++--source suite/percona/include/log_stop.inc
2149++
2150++SET GLOBAL use_global_log_slow_control='';
2151++SET GLOBAL log_slow_verbosity='';
2152++SET GLOBAL long_query_time=default;
2153++SET GLOBAL debug='';
2154++
2155++--let grep_pattern = No InnoDB statistics available for this query
2156++--source suite/percona/include/log_grep.inc
2157++
2158+diff -ruN a/mysql-test/suite/percona/t/use_global_long_query_time.test b/mysql-test/suite/percona/t/use_global_long_query_time.test
2159+--- a/mysql-test/suite/percona/t/use_global_long_query_time.test 1970-01-01 03:00:00.000000000 +0300
2160++++ b/mysql-test/suite/percona/t/use_global_long_query_time.test 2011-07-13 14:30:28.484361633 +0300
2161+@@ -0,0 +1,28 @@
2162++--source include/have_debug.inc
2163++
2164++SET GLOBAL debug="+d,query_exec_time_debug";
2165++
2166++--let log_file=percona.slow_extended.use_global_long_query_time
2167++--source suite/percona/include/log_start.inc
2168++
2169++SET long_query_time=2;
2170++
2171++SET SESSION debug="+d,query_exec_time_1.1";
2172++SET SESSION debug="+d,query_exec_time_3.1";
2173++SET SESSION debug="+d,query_exec_time_5.1";
2174++
2175++SET GLOBAL long_query_time=4;
2176++SET GLOBAL use_global_long_query_time=1;
2177++
2178++SET SESSION debug="+d,query_exec_time_1.1";
2179++SET SESSION debug="+d,query_exec_time_3.1";
2180++SET SESSION debug="+d,query_exec_time_5.1";
2181++
2182++--source suite/percona/include/log_stop.inc
2183++
2184++SET GLOBAL long_query_time=default;
2185++SET GLOBAL use_global_long_query_time=0;
2186++SET GLOBAL debug='';
2187++
2188++--let grep_pattern = Query_time
2189++--source suite/percona/include/log_grep.inc

Subscribers

People subscribed via source and target branches