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

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.5_slow_extended_tests_fixes
Merge into: lp:percona-server/5.5
Prerequisite: lp:~tsarev/percona-server/5.5_query_response_time_fix_bug_803867
Diff against target: 2208 lines (+972/-961)
52 files modified
mysql-test/log_connection_error.patch/percona_log_connection_error-master.opt (+1/-1)
mysql-test/log_connection_error.patch/percona_log_connection_error.result (+2/-1)
mysql-test/log_connection_error.patch/percona_log_connection_error.test (+6/-8)
mysql-test/slow_extended.patch/grep.inc (+0/-16)
mysql-test/slow_extended.patch/percona_bug643149.result (+0/-21)
mysql-test/slow_extended.patch/percona_bug643149.test (+0/-49)
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_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/-24)
mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test (+0/-23)
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/-13)
mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test (+0/-23)
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/-22)
mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test (+0/-51)
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/-89)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test (+0/-107)
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/-94)
mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test (+0/-133)
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-slow_query_log_timestamp_always-cl-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_timestamp_always-cl.result (+0/-3)
mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_timestamp_always-cl.test (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_control-master.opt (+0/-1)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_control.result (+0/-12)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_control.test (+0/-12)
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/-46)
mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test (+0/-40)
slow_extended.patch (+963/-0)
To merge this branch: bzr merge lp:~tsarev/percona-server/5.5_slow_extended_tests_fixes
Reviewer Review Type Date Requested Status
Percona developers 2011-07-13 Pending
Review via email: mp+67824@code.launchpad.net

This proposal supersedes a proposal from 2011-07-13.

Description of the change

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

Subscribers

People subscribed via source and target branches