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

Proposed by Oleg Tsarev
Status: Superseded
Proposed branch: lp:~tsarev/percona-server/5.5_query_response_time_fix_bug_803867
Merge into: lp:percona-server/5.5
Diff against target: 3477 lines (+2018/-1140)
17 files modified
mysql-test/have_response_time_distribution.inc (+0/-4)
mysql-test/have_response_time_distribution.require (+0/-2)
mysql-test/response-time-distribution.patch/percona_query_response_time-replication.result (+0/-66)
mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test (+0/-61)
mysql-test/response-time-distribution.patch/percona_query_response_time-stored.result (+0/-306)
mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test (+0/-85)
mysql-test/response-time-distribution.patch/percona_query_response_time.result (+0/-377)
mysql-test/response-time-distribution.patch/percona_query_response_time.test (+0/-71)
mysql-test/response-time-distribution.patch/percona_query_response_time_flush.inc (+0/-1)
mysql-test/response-time-distribution.patch/percona_query_response_time_show.inc (+0/-8)
mysql-test/response-time-distribution.patch/percona_query_response_time_sleep.inc (+0/-19)
percona_suite.patch (+12/-0)
response_time_distribution.patch (+1901/-122)
series (+1/-0)
show_slave_status_nolock.patch (+2/-2)
slow_extended.patch (+94/-8)
userstat.patch (+8/-8)
To merge this branch: bzr merge lp:~tsarev/percona-server/5.5_query_response_time_fix_bug_803867
Reviewer Review Type Date Requested Status
Alexey Kopytov Pending
Review via email: mp+67024@code.launchpad.net

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

Description of the change

http://jenkins.percona.com/view/Percona%20Server%205.5/job/percona-server-5.5-param/33/

Fixes for bugs #712393 #803867
1) I move query_response_time_collect call from intermediate of log_slow_statement to begin.
Reason of bug #712393 - log_slow_statement exit before call query_response_time_collect
2) I move all DBUG_EXECUTE_IF (what used in percona_query_response_time.test) from response_time_distribution.patch to slow_extended.patch
This functionality requires in the slow_extended sporadic fails
3) If we set "debug" variable:
    SET [SESSION|GLOBAL] debug="+d,query_exec_time_debug"
we can setup exact query_exec_time through set "debug" variable:
    SET [SESSION|GLOBAL] debug="+d,query_exec_time_TIMES";
where TIMES is [0.31|0.32|0.33|0.34|0.35|0.36|0.37|0.38|0.39|0.4|0.5|1.1|1.2|1.3|1.4|1.5|2.1|2.3|2.5]
After this commit we can also add special comment to the begin of query:
    /* query_exec_time="TIMES" */ QUERY;
This changes requires for test SQL_Slave_Thread query execution.
4) I replace logic:
/*----------------------------------------*/
    DBUG_EXECUTE_IF("query_exec_time_debug",
                    if (query_execution_time == 0)
                      opt_query_response_time_stats= 0;
                    else
                      opt_query_response_time_stats= 1;);
/*----------------------------------------*/
By following:
/*----------------------------------------*/
void query_response_time_collect_with_check(ulonglong query_exec_time)
{
  DBUG_ENTER("query_response_time_collect_with_check");
  bool collect= opt_query_response_time_stats;
  DBUG_EXECUTE_IF("query_exec_time_debug",
                  {
                    if (0 == query_exec_time)
                    {
                      collect= false;
                    }
                  });
  if(collect)
  {
    query_response_time_collect(query_exec_time);
  }
  DBUG_VOID_RETURN;
}
/*----------------------------------------*/
Otherwise debug-code has bad side-effect - set QUERY_RESPONSE_TIME_STATS to OFF if query shouldn't collect
5) I rewrite tests for response_time_distribution.patch, now all test unified and wouldn't have sporadic fails in the feature.
This change fixes the bug #803867.
6) I also remove mysql-test/response_time_distribution.patch and move to patch.
  Now this is the suite "percona" and tests "query_response_time[-[stored|replication]]"

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Same comment as in MP #66741.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'mysql-test/have_response_time_distribution.inc'
2--- mysql-test/have_response_time_distribution.inc 2011-01-17 01:49:51 +0000
3+++ mysql-test/have_response_time_distribution.inc 1970-01-01 00:00:00 +0000
4@@ -1,4 +0,0 @@
5--- require r/have_response_time_distribution.require
6-disable_query_log;
7-show variables like 'have_response_time_distribution';
8-enable_query_log;
9
10=== removed file 'mysql-test/have_response_time_distribution.require'
11--- mysql-test/have_response_time_distribution.require 2011-01-17 01:49:51 +0000
12+++ mysql-test/have_response_time_distribution.require 1970-01-01 00:00:00 +0000
13@@ -1,2 +0,0 @@
14-Variable_name Value
15-have_response_time_distribution YES
16
17=== removed directory 'mysql-test/response-time-distribution.patch'
18=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time-replication.result'
19--- mysql-test/response-time-distribution.patch/percona_query_response_time-replication.result 2011-04-10 07:34:52 +0000
20+++ mysql-test/response-time-distribution.patch/percona_query_response_time-replication.result 1970-01-01 00:00:00 +0000
21@@ -1,66 +0,0 @@
22-include/master-slave.inc
23-[connection master]
24-DROP TABLE IF EXISTS t;
25-CREATE TABLE t(id INT);
26-SELECT * from t;
27-id
28-SELECT * from t;
29-id
30-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
31-Warnings:
32-Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
33-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
34-Variable_name Value
35-query_response_time_range_base 2
36-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
37-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
38-Variable_name Value
39-query_response_time_range_base 10
40-FLUSH QUERY_RESPONSE_TIME;
41-SET GLOBAL QUERY_RESPONSE_TIME_STATS=ON;
42-INSERT INTO t SELECT SLEEP(0.4);
43-Warnings:
44-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
45-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
46-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
47-0
48-INSERT INTO t SELECT SLEEP(0.4);
49-Warnings:
50-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
51-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
52-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
53-0
54-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
55-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
56-2
57-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
58-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
59-3
60-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
61-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
62-Variable_name Value
63-query_response_time_range_base 2
64-FLUSH QUERY_RESPONSE_TIME;
65-INSERT INTO t SELECT SLEEP(0.4);
66-Warnings:
67-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
68-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
69-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
70-0
71-INSERT INTO t SELECT SLEEP(0.4);
72-Warnings:
73-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
74-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
75-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
76-0
77-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
78-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
79-2
80-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
81-SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
82-3
83-DROP TABLE IF EXISTS t;
84-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
85-SET GLOBAL QUERY_RESPONSE_TIME_STATS=OFF;
86-STOP SLAVE;
87-include/wait_for_slave_to_stop.inc
88
89=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test'
90--- mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test 2011-04-10 07:34:52 +0000
91+++ mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test 1970-01-01 00:00:00 +0000
92@@ -1,61 +0,0 @@
93---source include/have_response_time_distribution.inc
94---source include/master-slave.inc
95---source include/have_binlog_format_statement.inc
96---source include/have_debug.inc
97---disable_query_log
98-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement:");
99---enable_query_log
100-
101-connection master;
102--- disable_warnings
103-DROP TABLE IF EXISTS t;
104--- enable_warnings
105-CREATE TABLE t(id INT);
106-SELECT * from t;
107-
108-sync_slave_with_master;
109-
110-connection slave;
111-SELECT * from t;
112-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
113-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
114-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
115-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
116-source include/percona_query_response_time_flush.inc;
117-SET GLOBAL QUERY_RESPONSE_TIME_STATS=ON;
118-
119-connection master;
120-INSERT INTO t SELECT SLEEP(0.4);
121-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
122-INSERT INTO t SELECT SLEEP(0.4);
123-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
124-sync_slave_with_master;
125-
126-connection slave;
127-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
128-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
129-
130-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
131-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
132-source include/percona_query_response_time_flush.inc;
133-
134-connection master;
135-INSERT INTO t SELECT SLEEP(0.4);
136-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
137-INSERT INTO t SELECT SLEEP(0.4);
138-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
139-sync_slave_with_master;
140-
141-connection slave;
142-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
143-SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
144-
145-connection master;
146-DROP TABLE IF EXISTS t;
147-sync_slave_with_master;
148-connection slave;
149-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
150-SET GLOBAL QUERY_RESPONSE_TIME_STATS=OFF;
151-
152-STOP SLAVE;
153--- source include/wait_for_slave_to_stop.inc
154
155=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time-stored.result'
156--- mysql-test/response-time-distribution.patch/percona_query_response_time-stored.result 2011-04-10 07:34:52 +0000
157+++ mysql-test/response-time-distribution.patch/percona_query_response_time-stored.result 1970-01-01 00:00:00 +0000
158@@ -1,306 +0,0 @@
159-SET GLOBAL debug="d,query_exec_time_debug";
160-CREATE FUNCTION test_f()
161-RETURNS CHAR(30) DETERMINISTIC
162-BEGIN
163-SET SESSION debug="+d,query_exec_time_1.1";
164-RETURN 'Hello, world!';
165-END/
166-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
167-Warnings:
168-Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
169-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
170-Variable_name Value
171-query_response_time_range_base 2
172-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
173-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
174-Variable_name Value
175-query_response_time_range_base 2
176-FLUSH QUERY_RESPONSE_TIME;
177-SELECT d.count,
178-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
179-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
180-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
181-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
182-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
183-count query_count query_total not_zero_region_count region_count
184-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
185-region_count
186-44
187-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
188-time
189- 0.000001
190- 0.000003
191- 0.000007
192- 0.000015
193- 0.000030
194- 0.000061
195- 0.000122
196- 0.000244
197- 0.000488
198- 0.000976
199- 0.001953
200- 0.003906
201- 0.007812
202- 0.015625
203- 0.031250
204- 0.062500
205- 0.125000
206- 0.250000
207- 0.500000
208- 1.000000
209- 2.000000
210- 4.000000
211- 8.000000
212- 16.000000
213- 32.000000
214- 64.000000
215- 128.000000
216- 256.000000
217- 512.000000
218- 1024.000000
219- 2048.000000
220- 4096.000000
221- 8192.000000
222- 16384.000000
223- 32768.000000
224- 65536.000000
225- 131072.000000
226- 262144.000000
227- 524288.000000
228- 1048576.00000
229- 2097152.00000
230- 4194304.00000
231- 8388608.00000
232-TOO LONG
233-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
234-SELECT test_f();
235-test_f()
236-Hello, world!
237-SELECT test_f();
238-test_f()
239-Hello, world!
240-SELECT test_f();
241-test_f()
242-Hello, world!
243-SELECT test_f();
244-test_f()
245-Hello, world!
246-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
247-SELECT d.count,
248-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
249-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
250-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
251-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
252-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
253-count query_count query_total not_zero_region_count region_count
254-4 4 4 1 44
255-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
256-region_count
257-44
258-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
259-time
260- 0.000001
261- 0.000003
262- 0.000007
263- 0.000015
264- 0.000030
265- 0.000061
266- 0.000122
267- 0.000244
268- 0.000488
269- 0.000976
270- 0.001953
271- 0.003906
272- 0.007812
273- 0.015625
274- 0.031250
275- 0.062500
276- 0.125000
277- 0.250000
278- 0.500000
279- 1.000000
280- 2.000000
281- 4.000000
282- 8.000000
283- 16.000000
284- 32.000000
285- 64.000000
286- 128.000000
287- 256.000000
288- 512.000000
289- 1024.000000
290- 2048.000000
291- 4096.000000
292- 8192.000000
293- 16384.000000
294- 32768.000000
295- 65536.000000
296- 131072.000000
297- 262144.000000
298- 524288.000000
299- 1048576.00000
300- 2097152.00000
301- 4194304.00000
302- 8388608.00000
303-TOO LONG
304-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
305-Variable_name Value
306-query_response_time_range_base 2
307-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
308-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
309-Variable_name Value
310-query_response_time_range_base 10
311-FLUSH QUERY_RESPONSE_TIME;
312-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
313-SELECT test_f();
314-test_f()
315-Hello, world!
316-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
317-SELECT d.count,
318-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
319-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
320-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
321-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
322-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
323-count query_count query_total not_zero_region_count region_count
324-1 1 1 1 14
325-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
326-region_count
327-14
328-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
329-time
330- 0.000001
331- 0.000010
332- 0.000100
333- 0.001000
334- 0.010000
335- 0.100000
336- 1.000000
337- 10.000000
338- 100.000000
339- 1000.000000
340- 10000.000000
341- 100000.000000
342- 1000000.00000
343-TOO LONG
344-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
345-Variable_name Value
346-query_response_time_range_base 10
347-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
348-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
349-Variable_name Value
350-query_response_time_range_base 7
351-FLUSH QUERY_RESPONSE_TIME;
352-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
353-SELECT test_f();
354-test_f()
355-Hello, world!
356-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
357-SELECT d.count,
358-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
359-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
360-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
361-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
362-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
363-count query_count query_total not_zero_region_count region_count
364-1 1 1 1 17
365-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
366-region_count
367-17
368-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
369-time
370- 0.000001
371- 0.000008
372- 0.000059
373- 0.000416
374- 0.002915
375- 0.020408
376- 0.142857
377- 1.000000
378- 7.000000
379- 49.000000
380- 343.000000
381- 2401.000000
382- 16807.000000
383- 117649.000000
384- 823543.000000
385- 5764801.00000
386-TOO LONG
387-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
388-Variable_name Value
389-query_response_time_range_base 7
390-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
391-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
392-Variable_name Value
393-query_response_time_range_base 156
394-FLUSH QUERY_RESPONSE_TIME;
395-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
396-SELECT test_f();
397-test_f()
398-Hello, world!
399-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
400-SELECT d.count,
401-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
402-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
403-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
404-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
405-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
406-count query_count query_total not_zero_region_count region_count
407-1 1 1 1 7
408-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
409-region_count
410-7
411-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
412-time
413- 0.000041
414- 0.006410
415- 1.000000
416- 156.000000
417- 24336.000000
418- 3796416.00000
419-TOO LONG
420-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
421-Variable_name Value
422-query_response_time_range_base 156
423-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
424-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
425-Variable_name Value
426-query_response_time_range_base 1000
427-FLUSH QUERY_RESPONSE_TIME;
428-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
429-SELECT test_f();
430-test_f()
431-Hello, world!
432-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
433-SELECT d.count,
434-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
435-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
436-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
437-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
438-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
439-count query_count query_total not_zero_region_count region_count
440-1 1 1 1 6
441-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
442-region_count
443-6
444-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
445-time
446- 0.000001
447- 0.001000
448- 1.000000
449- 1000.000000
450- 1000000.00000
451-TOO LONG
452-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
453-Variable_name Value
454-query_response_time_range_base 1000
455-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
456-Warnings:
457-Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
458-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
459-Variable_name Value
460-query_response_time_range_base 1000
461-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
462-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
463-DROP FUNCTION test_f;
464-SET GLOBAL debug=default;
465
466=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test'
467--- mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test 2011-04-10 07:34:52 +0000
468+++ mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test 1970-01-01 00:00:00 +0000
469@@ -1,85 +0,0 @@
470---source include/have_response_time_distribution.inc
471---source include/have_debug.inc
472-
473-SET GLOBAL debug="d,query_exec_time_debug";
474-
475-delimiter /;
476-CREATE FUNCTION test_f()
477-RETURNS CHAR(30) DETERMINISTIC
478-BEGIN
479- SET SESSION debug="+d,query_exec_time_1.1";
480- RETURN 'Hello, world!';
481-END/
482-delimiter ;/
483-
484-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
485-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
486-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
487-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
488-
489-source include/percona_query_response_time_flush.inc;
490-source include/percona_query_response_time_show.inc;
491-
492-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
493-SELECT test_f();
494-SELECT test_f();
495-SELECT test_f();
496-SELECT test_f();
497-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
498-
499-source include/percona_query_response_time_show.inc;
500-
501-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
502-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
503-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
504-
505-source include/percona_query_response_time_flush.inc;
506-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
507-SELECT test_f();
508-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
509-
510-source include/percona_query_response_time_show.inc;
511-
512-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
513-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
514-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
515-
516-source include/percona_query_response_time_flush.inc;
517-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
518-SELECT test_f();
519-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
520-
521-source include/percona_query_response_time_show.inc;
522-
523-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
524-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
525-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
526-
527-source include/percona_query_response_time_flush.inc;
528-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
529-SELECT test_f();
530-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
531-
532-source include/percona_query_response_time_show.inc;
533-
534-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
535-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
536-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
537-
538-source include/percona_query_response_time_flush.inc;
539-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
540-SELECT test_f();
541-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
542-
543-source include/percona_query_response_time_show.inc;
544-
545-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
546-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
547-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
548-
549-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
550-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
551-
552-DROP FUNCTION test_f;
553-
554-SET GLOBAL debug=default;
555
556=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time.result'
557--- mysql-test/response-time-distribution.patch/percona_query_response_time.result 2011-04-10 07:34:52 +0000
558+++ mysql-test/response-time-distribution.patch/percona_query_response_time.result 1970-01-01 00:00:00 +0000
559@@ -1,377 +0,0 @@
560-SET GLOBAL debug="d,query_exec_time_debug";
561-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
562-Warnings:
563-Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
564-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
565-Variable_name Value
566-query_response_time_range_base 2
567-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
568-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
569-Variable_name Value
570-query_response_time_range_base 2
571-FLUSH QUERY_RESPONSE_TIME;
572-SELECT d.count,
573-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
574-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
575-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
576-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
577-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
578-count query_count query_total not_zero_region_count region_count
579-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
580-region_count
581-44
582-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
583-time
584- 0.000001
585- 0.000003
586- 0.000007
587- 0.000015
588- 0.000030
589- 0.000061
590- 0.000122
591- 0.000244
592- 0.000488
593- 0.000976
594- 0.001953
595- 0.003906
596- 0.007812
597- 0.015625
598- 0.031250
599- 0.062500
600- 0.125000
601- 0.250000
602- 0.500000
603- 1.000000
604- 2.000000
605- 4.000000
606- 8.000000
607- 16.000000
608- 32.000000
609- 64.000000
610- 128.000000
611- 256.000000
612- 512.000000
613- 1024.000000
614- 2048.000000
615- 4096.000000
616- 8192.000000
617- 16384.000000
618- 32768.000000
619- 65536.000000
620- 131072.000000
621- 262144.000000
622- 524288.000000
623- 1048576.00000
624- 2097152.00000
625- 4194304.00000
626- 8388608.00000
627-TOO LONG
628-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
629-SET SESSION debug="+d,query_exec_time_0.31";
630-SET SESSION debug="+d,query_exec_time_0.32";
631-SET SESSION debug="+d,query_exec_time_0.33";
632-SET SESSION debug="+d,query_exec_time_0.34";
633-SET SESSION debug="+d,query_exec_time_0.35";
634-SET SESSION debug="+d,query_exec_time_0.36";
635-SET SESSION debug="+d,query_exec_time_0.37";
636-SET SESSION debug="+d,query_exec_time_0.38";
637-SET SESSION debug="+d,query_exec_time_0.39";
638-SET SESSION debug="+d,query_exec_time_0.4";
639-SET SESSION debug="+d,query_exec_time_1.1";
640-SET SESSION debug="+d,query_exec_time_1.2";
641-SET SESSION debug="+d,query_exec_time_1.3";
642-SET SESSION debug="+d,query_exec_time_1.5";
643-SET SESSION debug="+d,query_exec_time_1.4";
644-SET SESSION debug="+d,query_exec_time_0.5";
645-SET SESSION debug="+d,query_exec_time_2.1";
646-SET SESSION debug="+d,query_exec_time_2.3";
647-SET SESSION debug="+d,query_exec_time_2.5";
648-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
649-SELECT d.count,
650-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
651-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
652-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
653-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
654-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
655-count query_count query_total not_zero_region_count region_count
656-10 19 15 4 44
657-1 19 15 4 44
658-5 19 15 4 44
659-3 19 15 4 44
660-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
661-region_count
662-44
663-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
664-time
665- 0.000001
666- 0.000003
667- 0.000007
668- 0.000015
669- 0.000030
670- 0.000061
671- 0.000122
672- 0.000244
673- 0.000488
674- 0.000976
675- 0.001953
676- 0.003906
677- 0.007812
678- 0.015625
679- 0.031250
680- 0.062500
681- 0.125000
682- 0.250000
683- 0.500000
684- 1.000000
685- 2.000000
686- 4.000000
687- 8.000000
688- 16.000000
689- 32.000000
690- 64.000000
691- 128.000000
692- 256.000000
693- 512.000000
694- 1024.000000
695- 2048.000000
696- 4096.000000
697- 8192.000000
698- 16384.000000
699- 32768.000000
700- 65536.000000
701- 131072.000000
702- 262144.000000
703- 524288.000000
704- 1048576.00000
705- 2097152.00000
706- 4194304.00000
707- 8388608.00000
708-TOO LONG
709-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
710-Variable_name Value
711-query_response_time_range_base 2
712-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
713-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
714-Variable_name Value
715-query_response_time_range_base 10
716-FLUSH QUERY_RESPONSE_TIME;
717-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
718-SET SESSION debug="+d,query_exec_time_0.31";
719-SET SESSION debug="+d,query_exec_time_0.32";
720-SET SESSION debug="+d,query_exec_time_0.33";
721-SET SESSION debug="+d,query_exec_time_0.34";
722-SET SESSION debug="+d,query_exec_time_0.35";
723-SET SESSION debug="+d,query_exec_time_0.36";
724-SET SESSION debug="+d,query_exec_time_0.37";
725-SET SESSION debug="+d,query_exec_time_0.38";
726-SET SESSION debug="+d,query_exec_time_0.39";
727-SET SESSION debug="+d,query_exec_time_0.4";
728-SET SESSION debug="+d,query_exec_time_1.1";
729-SET SESSION debug="+d,query_exec_time_1.2";
730-SET SESSION debug="+d,query_exec_time_1.3";
731-SET SESSION debug="+d,query_exec_time_1.5";
732-SET SESSION debug="+d,query_exec_time_1.4";
733-SET SESSION debug="+d,query_exec_time_0.5";
734-SET SESSION debug="+d,query_exec_time_2.1";
735-SET SESSION debug="+d,query_exec_time_2.3";
736-SET SESSION debug="+d,query_exec_time_2.5";
737-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
738-SELECT d.count,
739-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
740-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
741-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
742-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
743-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
744-count query_count query_total not_zero_region_count region_count
745-11 19 17 2 14
746-8 19 17 2 14
747-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
748-region_count
749-14
750-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
751-time
752- 0.000001
753- 0.000010
754- 0.000100
755- 0.001000
756- 0.010000
757- 0.100000
758- 1.000000
759- 10.000000
760- 100.000000
761- 1000.000000
762- 10000.000000
763- 100000.000000
764- 1000000.00000
765-TOO LONG
766-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
767-Variable_name Value
768-query_response_time_range_base 10
769-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
770-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
771-Variable_name Value
772-query_response_time_range_base 7
773-FLUSH QUERY_RESPONSE_TIME;
774-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
775-SET SESSION debug="+d,query_exec_time_0.31";
776-SET SESSION debug="+d,query_exec_time_0.32";
777-SET SESSION debug="+d,query_exec_time_0.33";
778-SET SESSION debug="+d,query_exec_time_0.34";
779-SET SESSION debug="+d,query_exec_time_0.35";
780-SET SESSION debug="+d,query_exec_time_0.36";
781-SET SESSION debug="+d,query_exec_time_0.37";
782-SET SESSION debug="+d,query_exec_time_0.38";
783-SET SESSION debug="+d,query_exec_time_0.39";
784-SET SESSION debug="+d,query_exec_time_0.4";
785-SET SESSION debug="+d,query_exec_time_1.1";
786-SET SESSION debug="+d,query_exec_time_1.2";
787-SET SESSION debug="+d,query_exec_time_1.3";
788-SET SESSION debug="+d,query_exec_time_1.5";
789-SET SESSION debug="+d,query_exec_time_1.4";
790-SET SESSION debug="+d,query_exec_time_0.5";
791-SET SESSION debug="+d,query_exec_time_2.1";
792-SET SESSION debug="+d,query_exec_time_2.3";
793-SET SESSION debug="+d,query_exec_time_2.5";
794-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
795-SELECT d.count,
796-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
797-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
798-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
799-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
800-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
801-count query_count query_total not_zero_region_count region_count
802-11 19 17 2 17
803-8 19 17 2 17
804-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
805-region_count
806-17
807-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
808-time
809- 0.000001
810- 0.000008
811- 0.000059
812- 0.000416
813- 0.002915
814- 0.020408
815- 0.142857
816- 1.000000
817- 7.000000
818- 49.000000
819- 343.000000
820- 2401.000000
821- 16807.000000
822- 117649.000000
823- 823543.000000
824- 5764801.00000
825-TOO LONG
826-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
827-Variable_name Value
828-query_response_time_range_base 7
829-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
830-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
831-Variable_name Value
832-query_response_time_range_base 156
833-FLUSH QUERY_RESPONSE_TIME;
834-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
835-SET SESSION debug="+d,query_exec_time_0.31";
836-SET SESSION debug="+d,query_exec_time_0.32";
837-SET SESSION debug="+d,query_exec_time_0.33";
838-SET SESSION debug="+d,query_exec_time_0.34";
839-SET SESSION debug="+d,query_exec_time_0.35";
840-SET SESSION debug="+d,query_exec_time_0.36";
841-SET SESSION debug="+d,query_exec_time_0.37";
842-SET SESSION debug="+d,query_exec_time_0.38";
843-SET SESSION debug="+d,query_exec_time_0.39";
844-SET SESSION debug="+d,query_exec_time_0.4";
845-SET SESSION debug="+d,query_exec_time_1.1";
846-SET SESSION debug="+d,query_exec_time_1.2";
847-SET SESSION debug="+d,query_exec_time_1.3";
848-SET SESSION debug="+d,query_exec_time_1.5";
849-SET SESSION debug="+d,query_exec_time_1.4";
850-SET SESSION debug="+d,query_exec_time_0.5";
851-SET SESSION debug="+d,query_exec_time_2.1";
852-SET SESSION debug="+d,query_exec_time_2.3";
853-SET SESSION debug="+d,query_exec_time_2.5";
854-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
855-SELECT d.count,
856-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
857-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
858-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
859-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
860-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
861-count query_count query_total not_zero_region_count region_count
862-11 19 17 2 7
863-8 19 17 2 7
864-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
865-region_count
866-7
867-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
868-time
869- 0.000041
870- 0.006410
871- 1.000000
872- 156.000000
873- 24336.000000
874- 3796416.00000
875-TOO LONG
876-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
877-Variable_name Value
878-query_response_time_range_base 156
879-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
880-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
881-Variable_name Value
882-query_response_time_range_base 1000
883-FLUSH QUERY_RESPONSE_TIME;
884-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
885-SET SESSION debug="+d,query_exec_time_0.31";
886-SET SESSION debug="+d,query_exec_time_0.32";
887-SET SESSION debug="+d,query_exec_time_0.33";
888-SET SESSION debug="+d,query_exec_time_0.34";
889-SET SESSION debug="+d,query_exec_time_0.35";
890-SET SESSION debug="+d,query_exec_time_0.36";
891-SET SESSION debug="+d,query_exec_time_0.37";
892-SET SESSION debug="+d,query_exec_time_0.38";
893-SET SESSION debug="+d,query_exec_time_0.39";
894-SET SESSION debug="+d,query_exec_time_0.4";
895-SET SESSION debug="+d,query_exec_time_1.1";
896-SET SESSION debug="+d,query_exec_time_1.2";
897-SET SESSION debug="+d,query_exec_time_1.3";
898-SET SESSION debug="+d,query_exec_time_1.5";
899-SET SESSION debug="+d,query_exec_time_1.4";
900-SET SESSION debug="+d,query_exec_time_0.5";
901-SET SESSION debug="+d,query_exec_time_2.1";
902-SET SESSION debug="+d,query_exec_time_2.3";
903-SET SESSION debug="+d,query_exec_time_2.5";
904-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
905-SELECT d.count,
906-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
907-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
908-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
909-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
910-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
911-count query_count query_total not_zero_region_count region_count
912-11 19 17 2 6
913-8 19 17 2 6
914-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
915-region_count
916-6
917-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
918-time
919- 0.000001
920- 0.001000
921- 1.000000
922- 1000.000000
923- 1000000.00000
924-TOO LONG
925-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
926-Variable_name Value
927-query_response_time_range_base 1000
928-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
929-Warnings:
930-Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
931-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
932-Variable_name Value
933-query_response_time_range_base 1000
934-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
935-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
936-SET GLOBAL debug=default;
937
938=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time.test'
939--- mysql-test/response-time-distribution.patch/percona_query_response_time.test 2011-04-10 07:34:52 +0000
940+++ mysql-test/response-time-distribution.patch/percona_query_response_time.test 1970-01-01 00:00:00 +0000
941@@ -1,71 +0,0 @@
942---source include/have_response_time_distribution.inc
943---source include/have_debug.inc
944-
945-SET GLOBAL debug="d,query_exec_time_debug";
946-
947-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
948-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
949-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
950-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
951-
952-source include/percona_query_response_time_flush.inc;
953-source include/percona_query_response_time_show.inc;
954-
955-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
956-source include/percona_query_response_time_sleep.inc;
957-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
958-
959-source include/percona_query_response_time_show.inc;
960-
961-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
962-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
963-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
964-
965-source include/percona_query_response_time_flush.inc;
966-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
967-source include/percona_query_response_time_sleep.inc;
968-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
969-
970-source include/percona_query_response_time_show.inc;
971-
972-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
973-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
974-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
975-
976-source include/percona_query_response_time_flush.inc;
977-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
978-source include/percona_query_response_time_sleep.inc;
979-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
980-
981-source include/percona_query_response_time_show.inc;
982-
983-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
984-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
985-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
986-
987-source include/percona_query_response_time_flush.inc;
988-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
989-source include/percona_query_response_time_sleep.inc;
990-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
991-
992-source include/percona_query_response_time_show.inc;
993-
994-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
995-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
996-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
997-
998-source include/percona_query_response_time_flush.inc;
999-SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1000-source include/percona_query_response_time_sleep.inc;
1001-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1002-
1003-source include/percona_query_response_time_show.inc;
1004-
1005-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1006-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
1007-SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1008-
1009-SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1010-SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
1011-
1012-SET GLOBAL debug=default;
1013
1014=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time_flush.inc'
1015--- mysql-test/response-time-distribution.patch/percona_query_response_time_flush.inc 2010-12-09 18:30:58 +0000
1016+++ mysql-test/response-time-distribution.patch/percona_query_response_time_flush.inc 1970-01-01 00:00:00 +0000
1017@@ -1,1 +0,0 @@
1018-FLUSH QUERY_RESPONSE_TIME;
1019
1020=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time_show.inc'
1021--- mysql-test/response-time-distribution.patch/percona_query_response_time_show.inc 2010-12-09 18:30:58 +0000
1022+++ mysql-test/response-time-distribution.patch/percona_query_response_time_show.inc 1970-01-01 00:00:00 +0000
1023@@ -1,8 +0,0 @@
1024-SELECT d.count,
1025-(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
1026-(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total,
1027-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count,
1028-(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
1029-FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0;
1030-SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1031-SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1032
1033=== removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time_sleep.inc'
1034--- mysql-test/response-time-distribution.patch/percona_query_response_time_sleep.inc 2011-04-10 07:34:52 +0000
1035+++ mysql-test/response-time-distribution.patch/percona_query_response_time_sleep.inc 1970-01-01 00:00:00 +0000
1036@@ -1,19 +0,0 @@
1037-SET SESSION debug="+d,query_exec_time_0.31";
1038-SET SESSION debug="+d,query_exec_time_0.32";
1039-SET SESSION debug="+d,query_exec_time_0.33";
1040-SET SESSION debug="+d,query_exec_time_0.34";
1041-SET SESSION debug="+d,query_exec_time_0.35";
1042-SET SESSION debug="+d,query_exec_time_0.36";
1043-SET SESSION debug="+d,query_exec_time_0.37";
1044-SET SESSION debug="+d,query_exec_time_0.38";
1045-SET SESSION debug="+d,query_exec_time_0.39";
1046-SET SESSION debug="+d,query_exec_time_0.4";
1047-SET SESSION debug="+d,query_exec_time_1.1";
1048-SET SESSION debug="+d,query_exec_time_1.2";
1049-SET SESSION debug="+d,query_exec_time_1.3";
1050-SET SESSION debug="+d,query_exec_time_1.5";
1051-SET SESSION debug="+d,query_exec_time_1.4";
1052-SET SESSION debug="+d,query_exec_time_0.5";
1053-SET SESSION debug="+d,query_exec_time_2.1";
1054-SET SESSION debug="+d,query_exec_time_2.3";
1055-SET SESSION debug="+d,query_exec_time_2.5";
1056
1057=== added file 'percona_suite.patch'
1058--- percona_suite.patch 1970-01-01 00:00:00 +0000
1059+++ percona_suite.patch 2011-07-11 01:29:49 +0000
1060@@ -0,0 +1,12 @@
1061+diff -ruN a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
1062+--- a/mysql-test/mysql-test-run.pl 2011-05-11 14:54:11.000000000 +0300
1063++++ b/mysql-test/mysql-test-run.pl 2011-07-06 14:27:56.931566255 +0300
1064+@@ -162,7 +162,7 @@
1065+
1066+ # If you add a new suite, please check TEST_DIRS in Makefile.am.
1067+ #
1068+-my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,perfschema";
1069++my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,perfschema,percona";
1070+ my $opt_suites;
1071+
1072+ our $opt_verbose= 0; # Verbose output, enable with --verbose
1073
1074=== modified file 'response_time_distribution.patch'
1075--- response_time_distribution.patch 2011-06-21 02:36:36 +0000
1076+++ response_time_distribution.patch 2011-07-11 01:29:49 +0000
1077@@ -6,8 +6,8 @@
1078 # Any small change to this file in the main branch
1079 # should be done or reviewed by the maintainer!
1080 diff -ruN a/CMakeLists.txt b/CMakeLists.txt
1081---- a/CMakeLists.txt 2011-03-31 17:36:18.000000000 +0400
1082-+++ b/CMakeLists.txt 2011-04-09 19:12:12.000000000 +0400
1083+--- a/CMakeLists.txt 2011-05-11 14:54:12.000000000 +0300
1084++++ b/CMakeLists.txt 2011-07-11 04:22:26.301345024 +0300
1085 @@ -165,7 +165,12 @@
1086 OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
1087 MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED)
1088@@ -23,8 +23,8 @@
1089 IF(ENABLE_DEBUG_SYNC)
1090 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
1091 diff -ruN a/include/mysql_com.h b/include/mysql_com.h
1092---- a/include/mysql_com.h 2011-03-31 17:36:18.000000000 +0400
1093-+++ b/include/mysql_com.h 2011-04-10 11:28:51.000000000 +0400
1094+--- a/include/mysql_com.h 2011-05-11 14:54:11.000000000 +0300
1095++++ b/include/mysql_com.h 2011-07-11 04:22:26.302345031 +0300
1096 @@ -141,10 +141,11 @@
1097 #define REFRESH_FAST 32768 /* Intern flag */
1098
1099@@ -41,9 +41,1842 @@
1100
1101 #define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
1102 #define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
1103-diff -ruN /dev/null b/patch_info/response-time-distribution.info
1104---- /dev/null 1970-01-01 00:00:00.000000000 +0000
1105-+++ b/patch_info/response-time-distribution.info 2011-04-09 19:12:12.000000000 +0400
1106+diff -ruN a/mysql-test/include/have_response_time_distribution.inc b/mysql-test/include/have_response_time_distribution.inc
1107+--- a/mysql-test/include/have_response_time_distribution.inc 1970-01-01 03:00:00.000000000 +0300
1108++++ b/mysql-test/include/have_response_time_distribution.inc 2011-07-11 04:23:12.126669991 +0300
1109+@@ -0,0 +1,4 @@
1110++-- require r/have_response_time_distribution.require
1111++disable_query_log;
1112++show variables like 'have_response_time_distribution';
1113++enable_query_log;
1114+diff -ruN a/mysql-test/r/have_response_time_distribution.require b/mysql-test/r/have_response_time_distribution.require
1115+--- a/mysql-test/r/have_response_time_distribution.require 1970-01-01 03:00:00.000000000 +0300
1116++++ b/mysql-test/r/have_response_time_distribution.require 2011-07-11 04:23:03.831611176 +0300
1117+@@ -0,0 +1,2 @@
1118++Variable_name Value
1119++have_response_time_distribution YES
1120+diff -ruN a/mysql-test/suite/percona/include/query_response_time.inc b/mysql-test/suite/percona/include/query_response_time.inc
1121+--- a/mysql-test/suite/percona/include/query_response_time.inc 1970-01-01 03:00:00.000000000 +0300
1122++++ b/mysql-test/suite/percona/include/query_response_time.inc 2011-07-11 04:22:26.303345037 +0300
1123+@@ -0,0 +1,33 @@
1124++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1125++EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base;
1126++FLUSH QUERY_RESPONSE_TIME;
1127++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1128++
1129++SET SESSION debug="+d,query_exec_time_0.31";
1130++SET SESSION debug="+d,query_exec_time_0.32";
1131++SET SESSION debug="+d,query_exec_time_0.33";
1132++SET SESSION debug="+d,query_exec_time_0.34";
1133++SET SESSION debug="+d,query_exec_time_0.35";
1134++SET SESSION debug="+d,query_exec_time_0.36";
1135++SET SESSION debug="+d,query_exec_time_0.37";
1136++SET SESSION debug="+d,query_exec_time_0.38";
1137++SET SESSION debug="+d,query_exec_time_0.39";
1138++SET SESSION debug="+d,query_exec_time_0.4";
1139++SET SESSION debug="+d,query_exec_time_1.1";
1140++SET SESSION debug="+d,query_exec_time_1.2";
1141++SET SESSION debug="+d,query_exec_time_1.3";
1142++SET SESSION debug="+d,query_exec_time_1.5";
1143++SET SESSION debug="+d,query_exec_time_1.4";
1144++SET SESSION debug="+d,query_exec_time_0.5";
1145++SET SESSION debug="+d,query_exec_time_2.1";
1146++SET SESSION debug="+d,query_exec_time_2.3";
1147++SET SESSION debug="+d,query_exec_time_2.5";
1148++SET SESSION debug="+d,query_exec_time_3.1";
1149++SET SESSION debug="+d,query_exec_time_4.1";
1150++SET SESSION debug="+d,query_exec_time_5.1";
1151++
1152++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1153++
1154++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1155++SHOW QUERY_RESPONSE_TIME;
1156++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1157+diff -ruN a/mysql-test/suite/percona/include/query_response_time-replication.inc b/mysql-test/suite/percona/include/query_response_time-replication.inc
1158+--- a/mysql-test/suite/percona/include/query_response_time-replication.inc 1970-01-01 03:00:00.000000000 +0300
1159++++ b/mysql-test/suite/percona/include/query_response_time-replication.inc 2011-07-11 04:22:26.304345044 +0300
1160+@@ -0,0 +1,41 @@
1161++connection slave;
1162++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1163++EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base;
1164++FLUSH QUERY_RESPONSE_TIME;
1165++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1166++
1167++connection master;
1168++--let i=0
1169++EVAL /* query_exec_time= "0.31" */ INSERT INTO t VALUES($i); inc $i;
1170++EVAL /* query_exec_time= "0.32" */ INSERT INTO t VALUES($i); inc $i;
1171++EVAL /* query_exec_time= "0.33" */ INSERT INTO t VALUES($i); inc $i;
1172++EVAL /* query_exec_time= "0.34" */ INSERT INTO t VALUES($i); inc $i;
1173++EVAL /* query_exec_time= "0.35" */ INSERT INTO t VALUES($i); inc $i;
1174++EVAL /* query_exec_time= "0.36" */ INSERT INTO t VALUES($i); inc $i;
1175++EVAL /* query_exec_time= "0.37" */ INSERT INTO t VALUES($i); inc $i;
1176++EVAL /* query_exec_time= "0.38" */ INSERT INTO t VALUES($i); inc $i;
1177++EVAL /* query_exec_time= "0.39" */ INSERT INTO t VALUES($i); inc $i;
1178++EVAL /* query_exec_time= "0.4" */ INSERT INTO t VALUES($i); inc $i;
1179++EVAL /* query_exec_time= "1.1" */ INSERT INTO t VALUES($i); inc $i;
1180++EVAL /* query_exec_time= "1.2" */ INSERT INTO t VALUES($i); inc $i;
1181++EVAL /* query_exec_time= "1.3" */ INSERT INTO t VALUES($i); inc $i;
1182++EVAL /* query_exec_time= "1.5" */ INSERT INTO t VALUES($i); inc $i;
1183++EVAL /* query_exec_time= "1.4" */ INSERT INTO t VALUES($i); inc $i;
1184++EVAL /* query_exec_time= "0.5" */ INSERT INTO t VALUES($i); inc $i;
1185++EVAL /* query_exec_time= "2.1" */ INSERT INTO t VALUES($i); inc $i;
1186++EVAL /* query_exec_time= "2.3" */ INSERT INTO t VALUES($i); inc $i;
1187++EVAL /* query_exec_time= "2.5" */ INSERT INTO t VALUES($i); inc $i;
1188++EVAL /* query_exec_time= "3.1" */ INSERT INTO t VALUES($i); inc $i;
1189++EVAL /* query_exec_time= "4.1" */ INSERT INTO t VALUES($i); inc $i;
1190++EVAL /* query_exec_time= "5.1" */ INSERT INTO t VALUES($i); inc $i;
1191++sync_slave_with_master;
1192++
1193++connection master;
1194++DELETE FROM t;
1195++sync_slave_with_master;
1196++
1197++connection slave;
1198++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1199++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1200++SHOW QUERY_RESPONSE_TIME;
1201++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1202+diff -ruN a/mysql-test/suite/percona/include/query_response_time-stored.inc b/mysql-test/suite/percona/include/query_response_time-stored.inc
1203+--- a/mysql-test/suite/percona/include/query_response_time-stored.inc 1970-01-01 03:00:00.000000000 +0300
1204++++ b/mysql-test/suite/percona/include/query_response_time-stored.inc 2011-07-11 04:22:26.305345052 +0300
1205+@@ -0,0 +1,33 @@
1206++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1207++EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base;
1208++FLUSH QUERY_RESPONSE_TIME;
1209++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1210++
1211++CALL test_f("0.31");
1212++CALL test_f("0.32");
1213++CALL test_f("0.33");
1214++CALL test_f("0.34");
1215++CALL test_f("0.35");
1216++CALL test_f("0.36");
1217++CALL test_f("0.37");
1218++CALL test_f("0.38");
1219++CALL test_f("0.39");
1220++CALL test_f("0.4");
1221++CALL test_f("1.1");
1222++CALL test_f("1.2");
1223++CALL test_f("1.3");
1224++CALL test_f("1.5");
1225++CALL test_f("1.4");
1226++CALL test_f("0.5");
1227++CALL test_f("2.1");
1228++CALL test_f("2.3");
1229++CALL test_f("2.5");
1230++CALL test_f("3.1");
1231++CALL test_f("4.1");
1232++CALL test_f("5.1");
1233++
1234++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1235++
1236++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1237++SHOW QUERY_RESPONSE_TIME;
1238++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1239+diff -ruN a/mysql-test/suite/percona/r/query_response_time-replication.result b/mysql-test/suite/percona/r/query_response_time-replication.result
1240+--- a/mysql-test/suite/percona/r/query_response_time-replication.result 1970-01-01 03:00:00.000000000 +0300
1241++++ b/mysql-test/suite/percona/r/query_response_time-replication.result 2011-07-11 04:22:26.308345073 +0300
1242+@@ -0,0 +1,528 @@
1243++include/master-slave.inc
1244++[connection master]
1245++DROP TABLE IF EXISTS t;
1246++CREATE TABLE t(id INT);
1247++SET GLOBAL debug="+d,query_exec_time_debug";
1248++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1249++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1;
1250++Warnings:
1251++Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
1252++FLUSH QUERY_RESPONSE_TIME;
1253++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1254++SET SESSION debug="+d,query_exec_time_0.31";
1255++SET SESSION debug="+d,query_exec_time_0.32";
1256++SET SESSION debug="+d,query_exec_time_0.33";
1257++SET SESSION debug="+d,query_exec_time_0.34";
1258++SET SESSION debug="+d,query_exec_time_0.35";
1259++SET SESSION debug="+d,query_exec_time_0.36";
1260++SET SESSION debug="+d,query_exec_time_0.37";
1261++SET SESSION debug="+d,query_exec_time_0.38";
1262++SET SESSION debug="+d,query_exec_time_0.39";
1263++SET SESSION debug="+d,query_exec_time_0.4";
1264++SET SESSION debug="+d,query_exec_time_1.1";
1265++SET SESSION debug="+d,query_exec_time_1.2";
1266++SET SESSION debug="+d,query_exec_time_1.3";
1267++SET SESSION debug="+d,query_exec_time_1.5";
1268++SET SESSION debug="+d,query_exec_time_1.4";
1269++SET SESSION debug="+d,query_exec_time_0.5";
1270++SET SESSION debug="+d,query_exec_time_2.1";
1271++SET SESSION debug="+d,query_exec_time_2.3";
1272++SET SESSION debug="+d,query_exec_time_2.5";
1273++SET SESSION debug="+d,query_exec_time_3.1";
1274++SET SESSION debug="+d,query_exec_time_4.1";
1275++SET SESSION debug="+d,query_exec_time_5.1";
1276++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1277++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1278++Variable_name Value
1279++query_response_time_range_base 2
1280++SHOW QUERY_RESPONSE_TIME;
1281++
1282++ 0.000001 0 0.000000
1283++ 0.000003 0 0.000000
1284++ 0.000007 0 0.000000
1285++ 0.000015 0 0.000000
1286++ 0.000030 0 0.000000
1287++ 0.000061 0 0.000000
1288++ 0.000122 0 0.000000
1289++ 0.000244 0 0.000000
1290++ 0.000488 0 0.000000
1291++ 0.000976 0 0.000000
1292++ 0.001953 0 0.000000
1293++ 0.003906 0 0.000000
1294++ 0.007812 0 0.000000
1295++ 0.015625 0 0.000000
1296++ 0.031250 0 0.000000
1297++ 0.062500 0 0.000000
1298++ 0.125000 0 0.000000
1299++ 0.250000 0 0.000000
1300++ 0.500000 10 3.550000
1301++ 1.000000 1 0.500000
1302++ 2.000000 5 6.500000
1303++ 4.000000 4 10.000000
1304++ 8.000000 2 9.200000
1305++ 16.000000 0 0.000000
1306++ 32.000000 0 0.000000
1307++ 64.000000 0 0.000000
1308++ 128.000000 0 0.000000
1309++ 256.000000 0 0.000000
1310++ 512.000000 0 0.000000
1311++ 1024.000000 0 0.000000
1312++ 2048.000000 0 0.000000
1313++ 4096.000000 0 0.000000
1314++ 8192.000000 0 0.000000
1315++ 16384.000000 0 0.000000
1316++ 32768.000000 0 0.000000
1317++ 65536.000000 0 0.000000
1318++ 131072.000000 0 0.000000
1319++ 262144.000000 0 0.000000
1320++ 524288.000000 0 0.000000
1321++ 1048576.00000 0 0.000000
1322++ 2097152.00000 0 0.000000
1323++ 4194304.00000 0 0.000000
1324++ 8388608.00000 0 0.000000
1325++TOO LONG 0 TOO LONG
1326++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1327++time count total
1328++ 0.000001 0 0.000000
1329++ 0.000003 0 0.000000
1330++ 0.000007 0 0.000000
1331++ 0.000015 0 0.000000
1332++ 0.000030 0 0.000000
1333++ 0.000061 0 0.000000
1334++ 0.000122 0 0.000000
1335++ 0.000244 0 0.000000
1336++ 0.000488 0 0.000000
1337++ 0.000976 0 0.000000
1338++ 0.001953 0 0.000000
1339++ 0.003906 0 0.000000
1340++ 0.007812 0 0.000000
1341++ 0.015625 0 0.000000
1342++ 0.031250 0 0.000000
1343++ 0.062500 0 0.000000
1344++ 0.125000 0 0.000000
1345++ 0.250000 0 0.000000
1346++ 0.500000 10 3.550000
1347++ 1.000000 1 0.500000
1348++ 2.000000 5 6.500000
1349++ 4.000000 4 10.000000
1350++ 8.000000 2 9.200000
1351++ 16.000000 0 0.000000
1352++ 32.000000 0 0.000000
1353++ 64.000000 0 0.000000
1354++ 128.000000 0 0.000000
1355++ 256.000000 0 0.000000
1356++ 512.000000 0 0.000000
1357++ 1024.000000 0 0.000000
1358++ 2048.000000 0 0.000000
1359++ 4096.000000 0 0.000000
1360++ 8192.000000 0 0.000000
1361++ 16384.000000 0 0.000000
1362++ 32768.000000 0 0.000000
1363++ 65536.000000 0 0.000000
1364++ 131072.000000 0 0.000000
1365++ 262144.000000 0 0.000000
1366++ 524288.000000 0 0.000000
1367++ 1048576.00000 0 0.000000
1368++ 2097152.00000 0 0.000000
1369++ 4194304.00000 0 0.000000
1370++ 8388608.00000 0 0.000000
1371++TOO LONG 0 TOO LONG
1372++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1373++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2;
1374++FLUSH QUERY_RESPONSE_TIME;
1375++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1376++SET SESSION debug="+d,query_exec_time_0.31";
1377++SET SESSION debug="+d,query_exec_time_0.32";
1378++SET SESSION debug="+d,query_exec_time_0.33";
1379++SET SESSION debug="+d,query_exec_time_0.34";
1380++SET SESSION debug="+d,query_exec_time_0.35";
1381++SET SESSION debug="+d,query_exec_time_0.36";
1382++SET SESSION debug="+d,query_exec_time_0.37";
1383++SET SESSION debug="+d,query_exec_time_0.38";
1384++SET SESSION debug="+d,query_exec_time_0.39";
1385++SET SESSION debug="+d,query_exec_time_0.4";
1386++SET SESSION debug="+d,query_exec_time_1.1";
1387++SET SESSION debug="+d,query_exec_time_1.2";
1388++SET SESSION debug="+d,query_exec_time_1.3";
1389++SET SESSION debug="+d,query_exec_time_1.5";
1390++SET SESSION debug="+d,query_exec_time_1.4";
1391++SET SESSION debug="+d,query_exec_time_0.5";
1392++SET SESSION debug="+d,query_exec_time_2.1";
1393++SET SESSION debug="+d,query_exec_time_2.3";
1394++SET SESSION debug="+d,query_exec_time_2.5";
1395++SET SESSION debug="+d,query_exec_time_3.1";
1396++SET SESSION debug="+d,query_exec_time_4.1";
1397++SET SESSION debug="+d,query_exec_time_5.1";
1398++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1399++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1400++Variable_name Value
1401++query_response_time_range_base 2
1402++SHOW QUERY_RESPONSE_TIME;
1403++
1404++ 0.000001 0 0.000000
1405++ 0.000003 0 0.000000
1406++ 0.000007 0 0.000000
1407++ 0.000015 0 0.000000
1408++ 0.000030 0 0.000000
1409++ 0.000061 0 0.000000
1410++ 0.000122 0 0.000000
1411++ 0.000244 0 0.000000
1412++ 0.000488 0 0.000000
1413++ 0.000976 0 0.000000
1414++ 0.001953 0 0.000000
1415++ 0.003906 0 0.000000
1416++ 0.007812 0 0.000000
1417++ 0.015625 0 0.000000
1418++ 0.031250 0 0.000000
1419++ 0.062500 0 0.000000
1420++ 0.125000 0 0.000000
1421++ 0.250000 0 0.000000
1422++ 0.500000 10 3.550000
1423++ 1.000000 1 0.500000
1424++ 2.000000 5 6.500000
1425++ 4.000000 4 10.000000
1426++ 8.000000 2 9.200000
1427++ 16.000000 0 0.000000
1428++ 32.000000 0 0.000000
1429++ 64.000000 0 0.000000
1430++ 128.000000 0 0.000000
1431++ 256.000000 0 0.000000
1432++ 512.000000 0 0.000000
1433++ 1024.000000 0 0.000000
1434++ 2048.000000 0 0.000000
1435++ 4096.000000 0 0.000000
1436++ 8192.000000 0 0.000000
1437++ 16384.000000 0 0.000000
1438++ 32768.000000 0 0.000000
1439++ 65536.000000 0 0.000000
1440++ 131072.000000 0 0.000000
1441++ 262144.000000 0 0.000000
1442++ 524288.000000 0 0.000000
1443++ 1048576.00000 0 0.000000
1444++ 2097152.00000 0 0.000000
1445++ 4194304.00000 0 0.000000
1446++ 8388608.00000 0 0.000000
1447++TOO LONG 0 TOO LONG
1448++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1449++time count total
1450++ 0.000001 0 0.000000
1451++ 0.000003 0 0.000000
1452++ 0.000007 0 0.000000
1453++ 0.000015 0 0.000000
1454++ 0.000030 0 0.000000
1455++ 0.000061 0 0.000000
1456++ 0.000122 0 0.000000
1457++ 0.000244 0 0.000000
1458++ 0.000488 0 0.000000
1459++ 0.000976 0 0.000000
1460++ 0.001953 0 0.000000
1461++ 0.003906 0 0.000000
1462++ 0.007812 0 0.000000
1463++ 0.015625 0 0.000000
1464++ 0.031250 0 0.000000
1465++ 0.062500 0 0.000000
1466++ 0.125000 0 0.000000
1467++ 0.250000 0 0.000000
1468++ 0.500000 10 3.550000
1469++ 1.000000 1 0.500000
1470++ 2.000000 5 6.500000
1471++ 4.000000 4 10.000000
1472++ 8.000000 2 9.200000
1473++ 16.000000 0 0.000000
1474++ 32.000000 0 0.000000
1475++ 64.000000 0 0.000000
1476++ 128.000000 0 0.000000
1477++ 256.000000 0 0.000000
1478++ 512.000000 0 0.000000
1479++ 1024.000000 0 0.000000
1480++ 2048.000000 0 0.000000
1481++ 4096.000000 0 0.000000
1482++ 8192.000000 0 0.000000
1483++ 16384.000000 0 0.000000
1484++ 32768.000000 0 0.000000
1485++ 65536.000000 0 0.000000
1486++ 131072.000000 0 0.000000
1487++ 262144.000000 0 0.000000
1488++ 524288.000000 0 0.000000
1489++ 1048576.00000 0 0.000000
1490++ 2097152.00000 0 0.000000
1491++ 4194304.00000 0 0.000000
1492++ 8388608.00000 0 0.000000
1493++TOO LONG 0 TOO LONG
1494++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1495++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10;
1496++FLUSH QUERY_RESPONSE_TIME;
1497++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1498++SET SESSION debug="+d,query_exec_time_0.31";
1499++SET SESSION debug="+d,query_exec_time_0.32";
1500++SET SESSION debug="+d,query_exec_time_0.33";
1501++SET SESSION debug="+d,query_exec_time_0.34";
1502++SET SESSION debug="+d,query_exec_time_0.35";
1503++SET SESSION debug="+d,query_exec_time_0.36";
1504++SET SESSION debug="+d,query_exec_time_0.37";
1505++SET SESSION debug="+d,query_exec_time_0.38";
1506++SET SESSION debug="+d,query_exec_time_0.39";
1507++SET SESSION debug="+d,query_exec_time_0.4";
1508++SET SESSION debug="+d,query_exec_time_1.1";
1509++SET SESSION debug="+d,query_exec_time_1.2";
1510++SET SESSION debug="+d,query_exec_time_1.3";
1511++SET SESSION debug="+d,query_exec_time_1.5";
1512++SET SESSION debug="+d,query_exec_time_1.4";
1513++SET SESSION debug="+d,query_exec_time_0.5";
1514++SET SESSION debug="+d,query_exec_time_2.1";
1515++SET SESSION debug="+d,query_exec_time_2.3";
1516++SET SESSION debug="+d,query_exec_time_2.5";
1517++SET SESSION debug="+d,query_exec_time_3.1";
1518++SET SESSION debug="+d,query_exec_time_4.1";
1519++SET SESSION debug="+d,query_exec_time_5.1";
1520++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1521++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1522++Variable_name Value
1523++query_response_time_range_base 10
1524++SHOW QUERY_RESPONSE_TIME;
1525++
1526++ 0.000001 0 0.000000
1527++ 0.000010 0 0.000000
1528++ 0.000100 0 0.000000
1529++ 0.001000 0 0.000000
1530++ 0.010000 0 0.000000
1531++ 0.100000 0 0.000000
1532++ 1.000000 11 4.050000
1533++ 10.000000 11 25.700000
1534++ 100.000000 0 0.000000
1535++ 1000.000000 0 0.000000
1536++ 10000.000000 0 0.000000
1537++ 100000.000000 0 0.000000
1538++ 1000000.00000 0 0.000000
1539++TOO LONG 0 TOO LONG
1540++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1541++time count total
1542++ 0.000001 0 0.000000
1543++ 0.000010 0 0.000000
1544++ 0.000100 0 0.000000
1545++ 0.001000 0 0.000000
1546++ 0.010000 0 0.000000
1547++ 0.100000 0 0.000000
1548++ 1.000000 11 4.050000
1549++ 10.000000 11 25.700000
1550++ 100.000000 0 0.000000
1551++ 1000.000000 0 0.000000
1552++ 10000.000000 0 0.000000
1553++ 100000.000000 0 0.000000
1554++ 1000000.00000 0 0.000000
1555++TOO LONG 0 TOO LONG
1556++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1557++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7;
1558++FLUSH QUERY_RESPONSE_TIME;
1559++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1560++SET SESSION debug="+d,query_exec_time_0.31";
1561++SET SESSION debug="+d,query_exec_time_0.32";
1562++SET SESSION debug="+d,query_exec_time_0.33";
1563++SET SESSION debug="+d,query_exec_time_0.34";
1564++SET SESSION debug="+d,query_exec_time_0.35";
1565++SET SESSION debug="+d,query_exec_time_0.36";
1566++SET SESSION debug="+d,query_exec_time_0.37";
1567++SET SESSION debug="+d,query_exec_time_0.38";
1568++SET SESSION debug="+d,query_exec_time_0.39";
1569++SET SESSION debug="+d,query_exec_time_0.4";
1570++SET SESSION debug="+d,query_exec_time_1.1";
1571++SET SESSION debug="+d,query_exec_time_1.2";
1572++SET SESSION debug="+d,query_exec_time_1.3";
1573++SET SESSION debug="+d,query_exec_time_1.5";
1574++SET SESSION debug="+d,query_exec_time_1.4";
1575++SET SESSION debug="+d,query_exec_time_0.5";
1576++SET SESSION debug="+d,query_exec_time_2.1";
1577++SET SESSION debug="+d,query_exec_time_2.3";
1578++SET SESSION debug="+d,query_exec_time_2.5";
1579++SET SESSION debug="+d,query_exec_time_3.1";
1580++SET SESSION debug="+d,query_exec_time_4.1";
1581++SET SESSION debug="+d,query_exec_time_5.1";
1582++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1583++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1584++Variable_name Value
1585++query_response_time_range_base 7
1586++SHOW QUERY_RESPONSE_TIME;
1587++
1588++ 0.000001 0 0.000000
1589++ 0.000008 0 0.000000
1590++ 0.000059 0 0.000000
1591++ 0.000416 0 0.000000
1592++ 0.002915 0 0.000000
1593++ 0.020408 0 0.000000
1594++ 0.142857 0 0.000000
1595++ 1.000000 11 4.050000
1596++ 7.000000 11 25.700000
1597++ 49.000000 0 0.000000
1598++ 343.000000 0 0.000000
1599++ 2401.000000 0 0.000000
1600++ 16807.000000 0 0.000000
1601++ 117649.000000 0 0.000000
1602++ 823543.000000 0 0.000000
1603++ 5764801.00000 0 0.000000
1604++TOO LONG 0 TOO LONG
1605++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1606++time count total
1607++ 0.000001 0 0.000000
1608++ 0.000008 0 0.000000
1609++ 0.000059 0 0.000000
1610++ 0.000416 0 0.000000
1611++ 0.002915 0 0.000000
1612++ 0.020408 0 0.000000
1613++ 0.142857 0 0.000000
1614++ 1.000000 11 4.050000
1615++ 7.000000 11 25.700000
1616++ 49.000000 0 0.000000
1617++ 343.000000 0 0.000000
1618++ 2401.000000 0 0.000000
1619++ 16807.000000 0 0.000000
1620++ 117649.000000 0 0.000000
1621++ 823543.000000 0 0.000000
1622++ 5764801.00000 0 0.000000
1623++TOO LONG 0 TOO LONG
1624++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1625++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156;
1626++FLUSH QUERY_RESPONSE_TIME;
1627++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1628++SET SESSION debug="+d,query_exec_time_0.31";
1629++SET SESSION debug="+d,query_exec_time_0.32";
1630++SET SESSION debug="+d,query_exec_time_0.33";
1631++SET SESSION debug="+d,query_exec_time_0.34";
1632++SET SESSION debug="+d,query_exec_time_0.35";
1633++SET SESSION debug="+d,query_exec_time_0.36";
1634++SET SESSION debug="+d,query_exec_time_0.37";
1635++SET SESSION debug="+d,query_exec_time_0.38";
1636++SET SESSION debug="+d,query_exec_time_0.39";
1637++SET SESSION debug="+d,query_exec_time_0.4";
1638++SET SESSION debug="+d,query_exec_time_1.1";
1639++SET SESSION debug="+d,query_exec_time_1.2";
1640++SET SESSION debug="+d,query_exec_time_1.3";
1641++SET SESSION debug="+d,query_exec_time_1.5";
1642++SET SESSION debug="+d,query_exec_time_1.4";
1643++SET SESSION debug="+d,query_exec_time_0.5";
1644++SET SESSION debug="+d,query_exec_time_2.1";
1645++SET SESSION debug="+d,query_exec_time_2.3";
1646++SET SESSION debug="+d,query_exec_time_2.5";
1647++SET SESSION debug="+d,query_exec_time_3.1";
1648++SET SESSION debug="+d,query_exec_time_4.1";
1649++SET SESSION debug="+d,query_exec_time_5.1";
1650++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1651++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1652++Variable_name Value
1653++query_response_time_range_base 156
1654++SHOW QUERY_RESPONSE_TIME;
1655++
1656++ 0.000041 0 0.000000
1657++ 0.006410 0 0.000000
1658++ 1.000000 11 4.050000
1659++ 156.000000 11 25.700000
1660++ 24336.000000 0 0.000000
1661++ 3796416.00000 0 0.000000
1662++TOO LONG 0 TOO LONG
1663++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1664++time count total
1665++ 0.000041 0 0.000000
1666++ 0.006410 0 0.000000
1667++ 1.000000 11 4.050000
1668++ 156.000000 11 25.700000
1669++ 24336.000000 0 0.000000
1670++ 3796416.00000 0 0.000000
1671++TOO LONG 0 TOO LONG
1672++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1673++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000;
1674++FLUSH QUERY_RESPONSE_TIME;
1675++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1676++SET SESSION debug="+d,query_exec_time_0.31";
1677++SET SESSION debug="+d,query_exec_time_0.32";
1678++SET SESSION debug="+d,query_exec_time_0.33";
1679++SET SESSION debug="+d,query_exec_time_0.34";
1680++SET SESSION debug="+d,query_exec_time_0.35";
1681++SET SESSION debug="+d,query_exec_time_0.36";
1682++SET SESSION debug="+d,query_exec_time_0.37";
1683++SET SESSION debug="+d,query_exec_time_0.38";
1684++SET SESSION debug="+d,query_exec_time_0.39";
1685++SET SESSION debug="+d,query_exec_time_0.4";
1686++SET SESSION debug="+d,query_exec_time_1.1";
1687++SET SESSION debug="+d,query_exec_time_1.2";
1688++SET SESSION debug="+d,query_exec_time_1.3";
1689++SET SESSION debug="+d,query_exec_time_1.5";
1690++SET SESSION debug="+d,query_exec_time_1.4";
1691++SET SESSION debug="+d,query_exec_time_0.5";
1692++SET SESSION debug="+d,query_exec_time_2.1";
1693++SET SESSION debug="+d,query_exec_time_2.3";
1694++SET SESSION debug="+d,query_exec_time_2.5";
1695++SET SESSION debug="+d,query_exec_time_3.1";
1696++SET SESSION debug="+d,query_exec_time_4.1";
1697++SET SESSION debug="+d,query_exec_time_5.1";
1698++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1699++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1700++Variable_name Value
1701++query_response_time_range_base 1000
1702++SHOW QUERY_RESPONSE_TIME;
1703++
1704++ 0.000001 0 0.000000
1705++ 0.001000 0 0.000000
1706++ 1.000000 11 4.050000
1707++ 1000.000000 11 25.700000
1708++ 1000000.00000 0 0.000000
1709++TOO LONG 0 TOO LONG
1710++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1711++time count total
1712++ 0.000001 0 0.000000
1713++ 0.001000 0 0.000000
1714++ 1.000000 11 4.050000
1715++ 1000.000000 11 25.700000
1716++ 1000000.00000 0 0.000000
1717++TOO LONG 0 TOO LONG
1718++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1719++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001;
1720++Warnings:
1721++Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
1722++FLUSH QUERY_RESPONSE_TIME;
1723++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1724++SET SESSION debug="+d,query_exec_time_0.31";
1725++SET SESSION debug="+d,query_exec_time_0.32";
1726++SET SESSION debug="+d,query_exec_time_0.33";
1727++SET SESSION debug="+d,query_exec_time_0.34";
1728++SET SESSION debug="+d,query_exec_time_0.35";
1729++SET SESSION debug="+d,query_exec_time_0.36";
1730++SET SESSION debug="+d,query_exec_time_0.37";
1731++SET SESSION debug="+d,query_exec_time_0.38";
1732++SET SESSION debug="+d,query_exec_time_0.39";
1733++SET SESSION debug="+d,query_exec_time_0.4";
1734++SET SESSION debug="+d,query_exec_time_1.1";
1735++SET SESSION debug="+d,query_exec_time_1.2";
1736++SET SESSION debug="+d,query_exec_time_1.3";
1737++SET SESSION debug="+d,query_exec_time_1.5";
1738++SET SESSION debug="+d,query_exec_time_1.4";
1739++SET SESSION debug="+d,query_exec_time_0.5";
1740++SET SESSION debug="+d,query_exec_time_2.1";
1741++SET SESSION debug="+d,query_exec_time_2.3";
1742++SET SESSION debug="+d,query_exec_time_2.5";
1743++SET SESSION debug="+d,query_exec_time_3.1";
1744++SET SESSION debug="+d,query_exec_time_4.1";
1745++SET SESSION debug="+d,query_exec_time_5.1";
1746++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1747++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1748++Variable_name Value
1749++query_response_time_range_base 1000
1750++SHOW QUERY_RESPONSE_TIME;
1751++
1752++ 0.000001 0 0.000000
1753++ 0.001000 0 0.000000
1754++ 1.000000 11 4.050000
1755++ 1000.000000 11 25.700000
1756++ 1000000.00000 0 0.000000
1757++TOO LONG 0 TOO LONG
1758++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1759++time count total
1760++ 0.000001 0 0.000000
1761++ 0.001000 0 0.000000
1762++ 1.000000 11 4.050000
1763++ 1000.000000 11 25.700000
1764++ 1000000.00000 0 0.000000
1765++TOO LONG 0 TOO LONG
1766++SET GLOBAL debug="";
1767++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
1768++SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
1769++DROP TABLE t;
1770++include/rpl_end.inc
1771+diff -ruN a/mysql-test/suite/percona/r/query_response_time.result b/mysql-test/suite/percona/r/query_response_time.result
1772+--- a/mysql-test/suite/percona/r/query_response_time.result 1970-01-01 03:00:00.000000000 +0300
1773++++ b/mysql-test/suite/percona/r/query_response_time.result 2011-07-11 04:22:26.310345087 +0300
1774+@@ -0,0 +1,522 @@
1775++SET GLOBAL debug="+d,query_exec_time_debug";
1776++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1777++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1;
1778++Warnings:
1779++Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
1780++FLUSH QUERY_RESPONSE_TIME;
1781++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1782++SET SESSION debug="+d,query_exec_time_0.31";
1783++SET SESSION debug="+d,query_exec_time_0.32";
1784++SET SESSION debug="+d,query_exec_time_0.33";
1785++SET SESSION debug="+d,query_exec_time_0.34";
1786++SET SESSION debug="+d,query_exec_time_0.35";
1787++SET SESSION debug="+d,query_exec_time_0.36";
1788++SET SESSION debug="+d,query_exec_time_0.37";
1789++SET SESSION debug="+d,query_exec_time_0.38";
1790++SET SESSION debug="+d,query_exec_time_0.39";
1791++SET SESSION debug="+d,query_exec_time_0.4";
1792++SET SESSION debug="+d,query_exec_time_1.1";
1793++SET SESSION debug="+d,query_exec_time_1.2";
1794++SET SESSION debug="+d,query_exec_time_1.3";
1795++SET SESSION debug="+d,query_exec_time_1.5";
1796++SET SESSION debug="+d,query_exec_time_1.4";
1797++SET SESSION debug="+d,query_exec_time_0.5";
1798++SET SESSION debug="+d,query_exec_time_2.1";
1799++SET SESSION debug="+d,query_exec_time_2.3";
1800++SET SESSION debug="+d,query_exec_time_2.5";
1801++SET SESSION debug="+d,query_exec_time_3.1";
1802++SET SESSION debug="+d,query_exec_time_4.1";
1803++SET SESSION debug="+d,query_exec_time_5.1";
1804++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1805++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1806++Variable_name Value
1807++query_response_time_range_base 2
1808++SHOW QUERY_RESPONSE_TIME;
1809++
1810++ 0.000001 0 0.000000
1811++ 0.000003 0 0.000000
1812++ 0.000007 0 0.000000
1813++ 0.000015 0 0.000000
1814++ 0.000030 0 0.000000
1815++ 0.000061 0 0.000000
1816++ 0.000122 0 0.000000
1817++ 0.000244 0 0.000000
1818++ 0.000488 0 0.000000
1819++ 0.000976 0 0.000000
1820++ 0.001953 0 0.000000
1821++ 0.003906 0 0.000000
1822++ 0.007812 0 0.000000
1823++ 0.015625 0 0.000000
1824++ 0.031250 0 0.000000
1825++ 0.062500 0 0.000000
1826++ 0.125000 0 0.000000
1827++ 0.250000 0 0.000000
1828++ 0.500000 10 3.550000
1829++ 1.000000 1 0.500000
1830++ 2.000000 5 6.500000
1831++ 4.000000 4 10.000000
1832++ 8.000000 2 9.200000
1833++ 16.000000 0 0.000000
1834++ 32.000000 0 0.000000
1835++ 64.000000 0 0.000000
1836++ 128.000000 0 0.000000
1837++ 256.000000 0 0.000000
1838++ 512.000000 0 0.000000
1839++ 1024.000000 0 0.000000
1840++ 2048.000000 0 0.000000
1841++ 4096.000000 0 0.000000
1842++ 8192.000000 0 0.000000
1843++ 16384.000000 0 0.000000
1844++ 32768.000000 0 0.000000
1845++ 65536.000000 0 0.000000
1846++ 131072.000000 0 0.000000
1847++ 262144.000000 0 0.000000
1848++ 524288.000000 0 0.000000
1849++ 1048576.00000 0 0.000000
1850++ 2097152.00000 0 0.000000
1851++ 4194304.00000 0 0.000000
1852++ 8388608.00000 0 0.000000
1853++TOO LONG 0 TOO LONG
1854++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1855++time count total
1856++ 0.000001 0 0.000000
1857++ 0.000003 0 0.000000
1858++ 0.000007 0 0.000000
1859++ 0.000015 0 0.000000
1860++ 0.000030 0 0.000000
1861++ 0.000061 0 0.000000
1862++ 0.000122 0 0.000000
1863++ 0.000244 0 0.000000
1864++ 0.000488 0 0.000000
1865++ 0.000976 0 0.000000
1866++ 0.001953 0 0.000000
1867++ 0.003906 0 0.000000
1868++ 0.007812 0 0.000000
1869++ 0.015625 0 0.000000
1870++ 0.031250 0 0.000000
1871++ 0.062500 0 0.000000
1872++ 0.125000 0 0.000000
1873++ 0.250000 0 0.000000
1874++ 0.500000 10 3.550000
1875++ 1.000000 1 0.500000
1876++ 2.000000 5 6.500000
1877++ 4.000000 4 10.000000
1878++ 8.000000 2 9.200000
1879++ 16.000000 0 0.000000
1880++ 32.000000 0 0.000000
1881++ 64.000000 0 0.000000
1882++ 128.000000 0 0.000000
1883++ 256.000000 0 0.000000
1884++ 512.000000 0 0.000000
1885++ 1024.000000 0 0.000000
1886++ 2048.000000 0 0.000000
1887++ 4096.000000 0 0.000000
1888++ 8192.000000 0 0.000000
1889++ 16384.000000 0 0.000000
1890++ 32768.000000 0 0.000000
1891++ 65536.000000 0 0.000000
1892++ 131072.000000 0 0.000000
1893++ 262144.000000 0 0.000000
1894++ 524288.000000 0 0.000000
1895++ 1048576.00000 0 0.000000
1896++ 2097152.00000 0 0.000000
1897++ 4194304.00000 0 0.000000
1898++ 8388608.00000 0 0.000000
1899++TOO LONG 0 TOO LONG
1900++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1901++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2;
1902++FLUSH QUERY_RESPONSE_TIME;
1903++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
1904++SET SESSION debug="+d,query_exec_time_0.31";
1905++SET SESSION debug="+d,query_exec_time_0.32";
1906++SET SESSION debug="+d,query_exec_time_0.33";
1907++SET SESSION debug="+d,query_exec_time_0.34";
1908++SET SESSION debug="+d,query_exec_time_0.35";
1909++SET SESSION debug="+d,query_exec_time_0.36";
1910++SET SESSION debug="+d,query_exec_time_0.37";
1911++SET SESSION debug="+d,query_exec_time_0.38";
1912++SET SESSION debug="+d,query_exec_time_0.39";
1913++SET SESSION debug="+d,query_exec_time_0.4";
1914++SET SESSION debug="+d,query_exec_time_1.1";
1915++SET SESSION debug="+d,query_exec_time_1.2";
1916++SET SESSION debug="+d,query_exec_time_1.3";
1917++SET SESSION debug="+d,query_exec_time_1.5";
1918++SET SESSION debug="+d,query_exec_time_1.4";
1919++SET SESSION debug="+d,query_exec_time_0.5";
1920++SET SESSION debug="+d,query_exec_time_2.1";
1921++SET SESSION debug="+d,query_exec_time_2.3";
1922++SET SESSION debug="+d,query_exec_time_2.5";
1923++SET SESSION debug="+d,query_exec_time_3.1";
1924++SET SESSION debug="+d,query_exec_time_4.1";
1925++SET SESSION debug="+d,query_exec_time_5.1";
1926++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
1927++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
1928++Variable_name Value
1929++query_response_time_range_base 2
1930++SHOW QUERY_RESPONSE_TIME;
1931++
1932++ 0.000001 0 0.000000
1933++ 0.000003 0 0.000000
1934++ 0.000007 0 0.000000
1935++ 0.000015 0 0.000000
1936++ 0.000030 0 0.000000
1937++ 0.000061 0 0.000000
1938++ 0.000122 0 0.000000
1939++ 0.000244 0 0.000000
1940++ 0.000488 0 0.000000
1941++ 0.000976 0 0.000000
1942++ 0.001953 0 0.000000
1943++ 0.003906 0 0.000000
1944++ 0.007812 0 0.000000
1945++ 0.015625 0 0.000000
1946++ 0.031250 0 0.000000
1947++ 0.062500 0 0.000000
1948++ 0.125000 0 0.000000
1949++ 0.250000 0 0.000000
1950++ 0.500000 10 3.550000
1951++ 1.000000 1 0.500000
1952++ 2.000000 5 6.500000
1953++ 4.000000 4 10.000000
1954++ 8.000000 2 9.200000
1955++ 16.000000 0 0.000000
1956++ 32.000000 0 0.000000
1957++ 64.000000 0 0.000000
1958++ 128.000000 0 0.000000
1959++ 256.000000 0 0.000000
1960++ 512.000000 0 0.000000
1961++ 1024.000000 0 0.000000
1962++ 2048.000000 0 0.000000
1963++ 4096.000000 0 0.000000
1964++ 8192.000000 0 0.000000
1965++ 16384.000000 0 0.000000
1966++ 32768.000000 0 0.000000
1967++ 65536.000000 0 0.000000
1968++ 131072.000000 0 0.000000
1969++ 262144.000000 0 0.000000
1970++ 524288.000000 0 0.000000
1971++ 1048576.00000 0 0.000000
1972++ 2097152.00000 0 0.000000
1973++ 4194304.00000 0 0.000000
1974++ 8388608.00000 0 0.000000
1975++TOO LONG 0 TOO LONG
1976++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
1977++time count total
1978++ 0.000001 0 0.000000
1979++ 0.000003 0 0.000000
1980++ 0.000007 0 0.000000
1981++ 0.000015 0 0.000000
1982++ 0.000030 0 0.000000
1983++ 0.000061 0 0.000000
1984++ 0.000122 0 0.000000
1985++ 0.000244 0 0.000000
1986++ 0.000488 0 0.000000
1987++ 0.000976 0 0.000000
1988++ 0.001953 0 0.000000
1989++ 0.003906 0 0.000000
1990++ 0.007812 0 0.000000
1991++ 0.015625 0 0.000000
1992++ 0.031250 0 0.000000
1993++ 0.062500 0 0.000000
1994++ 0.125000 0 0.000000
1995++ 0.250000 0 0.000000
1996++ 0.500000 10 3.550000
1997++ 1.000000 1 0.500000
1998++ 2.000000 5 6.500000
1999++ 4.000000 4 10.000000
2000++ 8.000000 2 9.200000
2001++ 16.000000 0 0.000000
2002++ 32.000000 0 0.000000
2003++ 64.000000 0 0.000000
2004++ 128.000000 0 0.000000
2005++ 256.000000 0 0.000000
2006++ 512.000000 0 0.000000
2007++ 1024.000000 0 0.000000
2008++ 2048.000000 0 0.000000
2009++ 4096.000000 0 0.000000
2010++ 8192.000000 0 0.000000
2011++ 16384.000000 0 0.000000
2012++ 32768.000000 0 0.000000
2013++ 65536.000000 0 0.000000
2014++ 131072.000000 0 0.000000
2015++ 262144.000000 0 0.000000
2016++ 524288.000000 0 0.000000
2017++ 1048576.00000 0 0.000000
2018++ 2097152.00000 0 0.000000
2019++ 4194304.00000 0 0.000000
2020++ 8388608.00000 0 0.000000
2021++TOO LONG 0 TOO LONG
2022++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2023++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10;
2024++FLUSH QUERY_RESPONSE_TIME;
2025++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2026++SET SESSION debug="+d,query_exec_time_0.31";
2027++SET SESSION debug="+d,query_exec_time_0.32";
2028++SET SESSION debug="+d,query_exec_time_0.33";
2029++SET SESSION debug="+d,query_exec_time_0.34";
2030++SET SESSION debug="+d,query_exec_time_0.35";
2031++SET SESSION debug="+d,query_exec_time_0.36";
2032++SET SESSION debug="+d,query_exec_time_0.37";
2033++SET SESSION debug="+d,query_exec_time_0.38";
2034++SET SESSION debug="+d,query_exec_time_0.39";
2035++SET SESSION debug="+d,query_exec_time_0.4";
2036++SET SESSION debug="+d,query_exec_time_1.1";
2037++SET SESSION debug="+d,query_exec_time_1.2";
2038++SET SESSION debug="+d,query_exec_time_1.3";
2039++SET SESSION debug="+d,query_exec_time_1.5";
2040++SET SESSION debug="+d,query_exec_time_1.4";
2041++SET SESSION debug="+d,query_exec_time_0.5";
2042++SET SESSION debug="+d,query_exec_time_2.1";
2043++SET SESSION debug="+d,query_exec_time_2.3";
2044++SET SESSION debug="+d,query_exec_time_2.5";
2045++SET SESSION debug="+d,query_exec_time_3.1";
2046++SET SESSION debug="+d,query_exec_time_4.1";
2047++SET SESSION debug="+d,query_exec_time_5.1";
2048++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2049++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2050++Variable_name Value
2051++query_response_time_range_base 10
2052++SHOW QUERY_RESPONSE_TIME;
2053++
2054++ 0.000001 0 0.000000
2055++ 0.000010 0 0.000000
2056++ 0.000100 0 0.000000
2057++ 0.001000 0 0.000000
2058++ 0.010000 0 0.000000
2059++ 0.100000 0 0.000000
2060++ 1.000000 11 4.050000
2061++ 10.000000 11 25.700000
2062++ 100.000000 0 0.000000
2063++ 1000.000000 0 0.000000
2064++ 10000.000000 0 0.000000
2065++ 100000.000000 0 0.000000
2066++ 1000000.00000 0 0.000000
2067++TOO LONG 0 TOO LONG
2068++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2069++time count total
2070++ 0.000001 0 0.000000
2071++ 0.000010 0 0.000000
2072++ 0.000100 0 0.000000
2073++ 0.001000 0 0.000000
2074++ 0.010000 0 0.000000
2075++ 0.100000 0 0.000000
2076++ 1.000000 11 4.050000
2077++ 10.000000 11 25.700000
2078++ 100.000000 0 0.000000
2079++ 1000.000000 0 0.000000
2080++ 10000.000000 0 0.000000
2081++ 100000.000000 0 0.000000
2082++ 1000000.00000 0 0.000000
2083++TOO LONG 0 TOO LONG
2084++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2085++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7;
2086++FLUSH QUERY_RESPONSE_TIME;
2087++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2088++SET SESSION debug="+d,query_exec_time_0.31";
2089++SET SESSION debug="+d,query_exec_time_0.32";
2090++SET SESSION debug="+d,query_exec_time_0.33";
2091++SET SESSION debug="+d,query_exec_time_0.34";
2092++SET SESSION debug="+d,query_exec_time_0.35";
2093++SET SESSION debug="+d,query_exec_time_0.36";
2094++SET SESSION debug="+d,query_exec_time_0.37";
2095++SET SESSION debug="+d,query_exec_time_0.38";
2096++SET SESSION debug="+d,query_exec_time_0.39";
2097++SET SESSION debug="+d,query_exec_time_0.4";
2098++SET SESSION debug="+d,query_exec_time_1.1";
2099++SET SESSION debug="+d,query_exec_time_1.2";
2100++SET SESSION debug="+d,query_exec_time_1.3";
2101++SET SESSION debug="+d,query_exec_time_1.5";
2102++SET SESSION debug="+d,query_exec_time_1.4";
2103++SET SESSION debug="+d,query_exec_time_0.5";
2104++SET SESSION debug="+d,query_exec_time_2.1";
2105++SET SESSION debug="+d,query_exec_time_2.3";
2106++SET SESSION debug="+d,query_exec_time_2.5";
2107++SET SESSION debug="+d,query_exec_time_3.1";
2108++SET SESSION debug="+d,query_exec_time_4.1";
2109++SET SESSION debug="+d,query_exec_time_5.1";
2110++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2111++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2112++Variable_name Value
2113++query_response_time_range_base 7
2114++SHOW QUERY_RESPONSE_TIME;
2115++
2116++ 0.000001 0 0.000000
2117++ 0.000008 0 0.000000
2118++ 0.000059 0 0.000000
2119++ 0.000416 0 0.000000
2120++ 0.002915 0 0.000000
2121++ 0.020408 0 0.000000
2122++ 0.142857 0 0.000000
2123++ 1.000000 11 4.050000
2124++ 7.000000 11 25.700000
2125++ 49.000000 0 0.000000
2126++ 343.000000 0 0.000000
2127++ 2401.000000 0 0.000000
2128++ 16807.000000 0 0.000000
2129++ 117649.000000 0 0.000000
2130++ 823543.000000 0 0.000000
2131++ 5764801.00000 0 0.000000
2132++TOO LONG 0 TOO LONG
2133++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2134++time count total
2135++ 0.000001 0 0.000000
2136++ 0.000008 0 0.000000
2137++ 0.000059 0 0.000000
2138++ 0.000416 0 0.000000
2139++ 0.002915 0 0.000000
2140++ 0.020408 0 0.000000
2141++ 0.142857 0 0.000000
2142++ 1.000000 11 4.050000
2143++ 7.000000 11 25.700000
2144++ 49.000000 0 0.000000
2145++ 343.000000 0 0.000000
2146++ 2401.000000 0 0.000000
2147++ 16807.000000 0 0.000000
2148++ 117649.000000 0 0.000000
2149++ 823543.000000 0 0.000000
2150++ 5764801.00000 0 0.000000
2151++TOO LONG 0 TOO LONG
2152++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2153++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156;
2154++FLUSH QUERY_RESPONSE_TIME;
2155++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2156++SET SESSION debug="+d,query_exec_time_0.31";
2157++SET SESSION debug="+d,query_exec_time_0.32";
2158++SET SESSION debug="+d,query_exec_time_0.33";
2159++SET SESSION debug="+d,query_exec_time_0.34";
2160++SET SESSION debug="+d,query_exec_time_0.35";
2161++SET SESSION debug="+d,query_exec_time_0.36";
2162++SET SESSION debug="+d,query_exec_time_0.37";
2163++SET SESSION debug="+d,query_exec_time_0.38";
2164++SET SESSION debug="+d,query_exec_time_0.39";
2165++SET SESSION debug="+d,query_exec_time_0.4";
2166++SET SESSION debug="+d,query_exec_time_1.1";
2167++SET SESSION debug="+d,query_exec_time_1.2";
2168++SET SESSION debug="+d,query_exec_time_1.3";
2169++SET SESSION debug="+d,query_exec_time_1.5";
2170++SET SESSION debug="+d,query_exec_time_1.4";
2171++SET SESSION debug="+d,query_exec_time_0.5";
2172++SET SESSION debug="+d,query_exec_time_2.1";
2173++SET SESSION debug="+d,query_exec_time_2.3";
2174++SET SESSION debug="+d,query_exec_time_2.5";
2175++SET SESSION debug="+d,query_exec_time_3.1";
2176++SET SESSION debug="+d,query_exec_time_4.1";
2177++SET SESSION debug="+d,query_exec_time_5.1";
2178++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2179++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2180++Variable_name Value
2181++query_response_time_range_base 156
2182++SHOW QUERY_RESPONSE_TIME;
2183++
2184++ 0.000041 0 0.000000
2185++ 0.006410 0 0.000000
2186++ 1.000000 11 4.050000
2187++ 156.000000 11 25.700000
2188++ 24336.000000 0 0.000000
2189++ 3796416.00000 0 0.000000
2190++TOO LONG 0 TOO LONG
2191++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2192++time count total
2193++ 0.000041 0 0.000000
2194++ 0.006410 0 0.000000
2195++ 1.000000 11 4.050000
2196++ 156.000000 11 25.700000
2197++ 24336.000000 0 0.000000
2198++ 3796416.00000 0 0.000000
2199++TOO LONG 0 TOO LONG
2200++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2201++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000;
2202++FLUSH QUERY_RESPONSE_TIME;
2203++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2204++SET SESSION debug="+d,query_exec_time_0.31";
2205++SET SESSION debug="+d,query_exec_time_0.32";
2206++SET SESSION debug="+d,query_exec_time_0.33";
2207++SET SESSION debug="+d,query_exec_time_0.34";
2208++SET SESSION debug="+d,query_exec_time_0.35";
2209++SET SESSION debug="+d,query_exec_time_0.36";
2210++SET SESSION debug="+d,query_exec_time_0.37";
2211++SET SESSION debug="+d,query_exec_time_0.38";
2212++SET SESSION debug="+d,query_exec_time_0.39";
2213++SET SESSION debug="+d,query_exec_time_0.4";
2214++SET SESSION debug="+d,query_exec_time_1.1";
2215++SET SESSION debug="+d,query_exec_time_1.2";
2216++SET SESSION debug="+d,query_exec_time_1.3";
2217++SET SESSION debug="+d,query_exec_time_1.5";
2218++SET SESSION debug="+d,query_exec_time_1.4";
2219++SET SESSION debug="+d,query_exec_time_0.5";
2220++SET SESSION debug="+d,query_exec_time_2.1";
2221++SET SESSION debug="+d,query_exec_time_2.3";
2222++SET SESSION debug="+d,query_exec_time_2.5";
2223++SET SESSION debug="+d,query_exec_time_3.1";
2224++SET SESSION debug="+d,query_exec_time_4.1";
2225++SET SESSION debug="+d,query_exec_time_5.1";
2226++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2227++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2228++Variable_name Value
2229++query_response_time_range_base 1000
2230++SHOW QUERY_RESPONSE_TIME;
2231++
2232++ 0.000001 0 0.000000
2233++ 0.001000 0 0.000000
2234++ 1.000000 11 4.050000
2235++ 1000.000000 11 25.700000
2236++ 1000000.00000 0 0.000000
2237++TOO LONG 0 TOO LONG
2238++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2239++time count total
2240++ 0.000001 0 0.000000
2241++ 0.001000 0 0.000000
2242++ 1.000000 11 4.050000
2243++ 1000.000000 11 25.700000
2244++ 1000000.00000 0 0.000000
2245++TOO LONG 0 TOO LONG
2246++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2247++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001;
2248++Warnings:
2249++Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
2250++FLUSH QUERY_RESPONSE_TIME;
2251++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2252++SET SESSION debug="+d,query_exec_time_0.31";
2253++SET SESSION debug="+d,query_exec_time_0.32";
2254++SET SESSION debug="+d,query_exec_time_0.33";
2255++SET SESSION debug="+d,query_exec_time_0.34";
2256++SET SESSION debug="+d,query_exec_time_0.35";
2257++SET SESSION debug="+d,query_exec_time_0.36";
2258++SET SESSION debug="+d,query_exec_time_0.37";
2259++SET SESSION debug="+d,query_exec_time_0.38";
2260++SET SESSION debug="+d,query_exec_time_0.39";
2261++SET SESSION debug="+d,query_exec_time_0.4";
2262++SET SESSION debug="+d,query_exec_time_1.1";
2263++SET SESSION debug="+d,query_exec_time_1.2";
2264++SET SESSION debug="+d,query_exec_time_1.3";
2265++SET SESSION debug="+d,query_exec_time_1.5";
2266++SET SESSION debug="+d,query_exec_time_1.4";
2267++SET SESSION debug="+d,query_exec_time_0.5";
2268++SET SESSION debug="+d,query_exec_time_2.1";
2269++SET SESSION debug="+d,query_exec_time_2.3";
2270++SET SESSION debug="+d,query_exec_time_2.5";
2271++SET SESSION debug="+d,query_exec_time_3.1";
2272++SET SESSION debug="+d,query_exec_time_4.1";
2273++SET SESSION debug="+d,query_exec_time_5.1";
2274++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2275++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2276++Variable_name Value
2277++query_response_time_range_base 1000
2278++SHOW QUERY_RESPONSE_TIME;
2279++
2280++ 0.000001 0 0.000000
2281++ 0.001000 0 0.000000
2282++ 1.000000 11 4.050000
2283++ 1000.000000 11 25.700000
2284++ 1000000.00000 0 0.000000
2285++TOO LONG 0 TOO LONG
2286++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2287++time count total
2288++ 0.000001 0 0.000000
2289++ 0.001000 0 0.000000
2290++ 1.000000 11 4.050000
2291++ 1000.000000 11 25.700000
2292++ 1000000.00000 0 0.000000
2293++TOO LONG 0 TOO LONG
2294++SET GLOBAL debug="";
2295++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
2296++SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
2297+diff -ruN a/mysql-test/suite/percona/r/query_response_time-stored.result b/mysql-test/suite/percona/r/query_response_time-stored.result
2298+--- a/mysql-test/suite/percona/r/query_response_time-stored.result 1970-01-01 03:00:00.000000000 +0300
2299++++ b/mysql-test/suite/percona/r/query_response_time-stored.result 2011-07-11 04:22:26.312345102 +0300
2300+@@ -0,0 +1,529 @@
2301++CREATE PROCEDURE test_f(time VARCHAR(5),i INT)
2302++BEGIN
2303++SET SESSION debug=CONCAT("+d,query_exec_time_", time);
2304++/* query_exec_time= time */ INSERT INTO t VALUES(i);
2305++DELETE FROM t;
2306++END^
2307++SET GLOBAL debug="+d,query_exec_time_debug";
2308++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2309++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1;
2310++Warnings:
2311++Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
2312++FLUSH QUERY_RESPONSE_TIME;
2313++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2314++SET SESSION debug="+d,query_exec_time_0.31";
2315++SET SESSION debug="+d,query_exec_time_0.32";
2316++SET SESSION debug="+d,query_exec_time_0.33";
2317++SET SESSION debug="+d,query_exec_time_0.34";
2318++SET SESSION debug="+d,query_exec_time_0.35";
2319++SET SESSION debug="+d,query_exec_time_0.36";
2320++SET SESSION debug="+d,query_exec_time_0.37";
2321++SET SESSION debug="+d,query_exec_time_0.38";
2322++SET SESSION debug="+d,query_exec_time_0.39";
2323++SET SESSION debug="+d,query_exec_time_0.4";
2324++SET SESSION debug="+d,query_exec_time_1.1";
2325++SET SESSION debug="+d,query_exec_time_1.2";
2326++SET SESSION debug="+d,query_exec_time_1.3";
2327++SET SESSION debug="+d,query_exec_time_1.5";
2328++SET SESSION debug="+d,query_exec_time_1.4";
2329++SET SESSION debug="+d,query_exec_time_0.5";
2330++SET SESSION debug="+d,query_exec_time_2.1";
2331++SET SESSION debug="+d,query_exec_time_2.3";
2332++SET SESSION debug="+d,query_exec_time_2.5";
2333++SET SESSION debug="+d,query_exec_time_3.1";
2334++SET SESSION debug="+d,query_exec_time_4.1";
2335++SET SESSION debug="+d,query_exec_time_5.1";
2336++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2337++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2338++Variable_name Value
2339++query_response_time_range_base 2
2340++SHOW QUERY_RESPONSE_TIME;
2341++
2342++ 0.000001 0 0.000000
2343++ 0.000003 0 0.000000
2344++ 0.000007 0 0.000000
2345++ 0.000015 0 0.000000
2346++ 0.000030 0 0.000000
2347++ 0.000061 0 0.000000
2348++ 0.000122 0 0.000000
2349++ 0.000244 0 0.000000
2350++ 0.000488 0 0.000000
2351++ 0.000976 0 0.000000
2352++ 0.001953 0 0.000000
2353++ 0.003906 0 0.000000
2354++ 0.007812 0 0.000000
2355++ 0.015625 0 0.000000
2356++ 0.031250 0 0.000000
2357++ 0.062500 0 0.000000
2358++ 0.125000 0 0.000000
2359++ 0.250000 0 0.000000
2360++ 0.500000 10 3.550000
2361++ 1.000000 1 0.500000
2362++ 2.000000 5 6.500000
2363++ 4.000000 4 10.000000
2364++ 8.000000 2 9.200000
2365++ 16.000000 0 0.000000
2366++ 32.000000 0 0.000000
2367++ 64.000000 0 0.000000
2368++ 128.000000 0 0.000000
2369++ 256.000000 0 0.000000
2370++ 512.000000 0 0.000000
2371++ 1024.000000 0 0.000000
2372++ 2048.000000 0 0.000000
2373++ 4096.000000 0 0.000000
2374++ 8192.000000 0 0.000000
2375++ 16384.000000 0 0.000000
2376++ 32768.000000 0 0.000000
2377++ 65536.000000 0 0.000000
2378++ 131072.000000 0 0.000000
2379++ 262144.000000 0 0.000000
2380++ 524288.000000 0 0.000000
2381++ 1048576.00000 0 0.000000
2382++ 2097152.00000 0 0.000000
2383++ 4194304.00000 0 0.000000
2384++ 8388608.00000 0 0.000000
2385++TOO LONG 0 TOO LONG
2386++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2387++time count total
2388++ 0.000001 0 0.000000
2389++ 0.000003 0 0.000000
2390++ 0.000007 0 0.000000
2391++ 0.000015 0 0.000000
2392++ 0.000030 0 0.000000
2393++ 0.000061 0 0.000000
2394++ 0.000122 0 0.000000
2395++ 0.000244 0 0.000000
2396++ 0.000488 0 0.000000
2397++ 0.000976 0 0.000000
2398++ 0.001953 0 0.000000
2399++ 0.003906 0 0.000000
2400++ 0.007812 0 0.000000
2401++ 0.015625 0 0.000000
2402++ 0.031250 0 0.000000
2403++ 0.062500 0 0.000000
2404++ 0.125000 0 0.000000
2405++ 0.250000 0 0.000000
2406++ 0.500000 10 3.550000
2407++ 1.000000 1 0.500000
2408++ 2.000000 5 6.500000
2409++ 4.000000 4 10.000000
2410++ 8.000000 2 9.200000
2411++ 16.000000 0 0.000000
2412++ 32.000000 0 0.000000
2413++ 64.000000 0 0.000000
2414++ 128.000000 0 0.000000
2415++ 256.000000 0 0.000000
2416++ 512.000000 0 0.000000
2417++ 1024.000000 0 0.000000
2418++ 2048.000000 0 0.000000
2419++ 4096.000000 0 0.000000
2420++ 8192.000000 0 0.000000
2421++ 16384.000000 0 0.000000
2422++ 32768.000000 0 0.000000
2423++ 65536.000000 0 0.000000
2424++ 131072.000000 0 0.000000
2425++ 262144.000000 0 0.000000
2426++ 524288.000000 0 0.000000
2427++ 1048576.00000 0 0.000000
2428++ 2097152.00000 0 0.000000
2429++ 4194304.00000 0 0.000000
2430++ 8388608.00000 0 0.000000
2431++TOO LONG 0 TOO LONG
2432++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2433++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2;
2434++FLUSH QUERY_RESPONSE_TIME;
2435++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2436++SET SESSION debug="+d,query_exec_time_0.31";
2437++SET SESSION debug="+d,query_exec_time_0.32";
2438++SET SESSION debug="+d,query_exec_time_0.33";
2439++SET SESSION debug="+d,query_exec_time_0.34";
2440++SET SESSION debug="+d,query_exec_time_0.35";
2441++SET SESSION debug="+d,query_exec_time_0.36";
2442++SET SESSION debug="+d,query_exec_time_0.37";
2443++SET SESSION debug="+d,query_exec_time_0.38";
2444++SET SESSION debug="+d,query_exec_time_0.39";
2445++SET SESSION debug="+d,query_exec_time_0.4";
2446++SET SESSION debug="+d,query_exec_time_1.1";
2447++SET SESSION debug="+d,query_exec_time_1.2";
2448++SET SESSION debug="+d,query_exec_time_1.3";
2449++SET SESSION debug="+d,query_exec_time_1.5";
2450++SET SESSION debug="+d,query_exec_time_1.4";
2451++SET SESSION debug="+d,query_exec_time_0.5";
2452++SET SESSION debug="+d,query_exec_time_2.1";
2453++SET SESSION debug="+d,query_exec_time_2.3";
2454++SET SESSION debug="+d,query_exec_time_2.5";
2455++SET SESSION debug="+d,query_exec_time_3.1";
2456++SET SESSION debug="+d,query_exec_time_4.1";
2457++SET SESSION debug="+d,query_exec_time_5.1";
2458++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2459++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2460++Variable_name Value
2461++query_response_time_range_base 2
2462++SHOW QUERY_RESPONSE_TIME;
2463++
2464++ 0.000001 0 0.000000
2465++ 0.000003 0 0.000000
2466++ 0.000007 0 0.000000
2467++ 0.000015 0 0.000000
2468++ 0.000030 0 0.000000
2469++ 0.000061 0 0.000000
2470++ 0.000122 0 0.000000
2471++ 0.000244 0 0.000000
2472++ 0.000488 0 0.000000
2473++ 0.000976 0 0.000000
2474++ 0.001953 0 0.000000
2475++ 0.003906 0 0.000000
2476++ 0.007812 0 0.000000
2477++ 0.015625 0 0.000000
2478++ 0.031250 0 0.000000
2479++ 0.062500 0 0.000000
2480++ 0.125000 0 0.000000
2481++ 0.250000 0 0.000000
2482++ 0.500000 10 3.550000
2483++ 1.000000 1 0.500000
2484++ 2.000000 5 6.500000
2485++ 4.000000 4 10.000000
2486++ 8.000000 2 9.200000
2487++ 16.000000 0 0.000000
2488++ 32.000000 0 0.000000
2489++ 64.000000 0 0.000000
2490++ 128.000000 0 0.000000
2491++ 256.000000 0 0.000000
2492++ 512.000000 0 0.000000
2493++ 1024.000000 0 0.000000
2494++ 2048.000000 0 0.000000
2495++ 4096.000000 0 0.000000
2496++ 8192.000000 0 0.000000
2497++ 16384.000000 0 0.000000
2498++ 32768.000000 0 0.000000
2499++ 65536.000000 0 0.000000
2500++ 131072.000000 0 0.000000
2501++ 262144.000000 0 0.000000
2502++ 524288.000000 0 0.000000
2503++ 1048576.00000 0 0.000000
2504++ 2097152.00000 0 0.000000
2505++ 4194304.00000 0 0.000000
2506++ 8388608.00000 0 0.000000
2507++TOO LONG 0 TOO LONG
2508++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2509++time count total
2510++ 0.000001 0 0.000000
2511++ 0.000003 0 0.000000
2512++ 0.000007 0 0.000000
2513++ 0.000015 0 0.000000
2514++ 0.000030 0 0.000000
2515++ 0.000061 0 0.000000
2516++ 0.000122 0 0.000000
2517++ 0.000244 0 0.000000
2518++ 0.000488 0 0.000000
2519++ 0.000976 0 0.000000
2520++ 0.001953 0 0.000000
2521++ 0.003906 0 0.000000
2522++ 0.007812 0 0.000000
2523++ 0.015625 0 0.000000
2524++ 0.031250 0 0.000000
2525++ 0.062500 0 0.000000
2526++ 0.125000 0 0.000000
2527++ 0.250000 0 0.000000
2528++ 0.500000 10 3.550000
2529++ 1.000000 1 0.500000
2530++ 2.000000 5 6.500000
2531++ 4.000000 4 10.000000
2532++ 8.000000 2 9.200000
2533++ 16.000000 0 0.000000
2534++ 32.000000 0 0.000000
2535++ 64.000000 0 0.000000
2536++ 128.000000 0 0.000000
2537++ 256.000000 0 0.000000
2538++ 512.000000 0 0.000000
2539++ 1024.000000 0 0.000000
2540++ 2048.000000 0 0.000000
2541++ 4096.000000 0 0.000000
2542++ 8192.000000 0 0.000000
2543++ 16384.000000 0 0.000000
2544++ 32768.000000 0 0.000000
2545++ 65536.000000 0 0.000000
2546++ 131072.000000 0 0.000000
2547++ 262144.000000 0 0.000000
2548++ 524288.000000 0 0.000000
2549++ 1048576.00000 0 0.000000
2550++ 2097152.00000 0 0.000000
2551++ 4194304.00000 0 0.000000
2552++ 8388608.00000 0 0.000000
2553++TOO LONG 0 TOO LONG
2554++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2555++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10;
2556++FLUSH QUERY_RESPONSE_TIME;
2557++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2558++SET SESSION debug="+d,query_exec_time_0.31";
2559++SET SESSION debug="+d,query_exec_time_0.32";
2560++SET SESSION debug="+d,query_exec_time_0.33";
2561++SET SESSION debug="+d,query_exec_time_0.34";
2562++SET SESSION debug="+d,query_exec_time_0.35";
2563++SET SESSION debug="+d,query_exec_time_0.36";
2564++SET SESSION debug="+d,query_exec_time_0.37";
2565++SET SESSION debug="+d,query_exec_time_0.38";
2566++SET SESSION debug="+d,query_exec_time_0.39";
2567++SET SESSION debug="+d,query_exec_time_0.4";
2568++SET SESSION debug="+d,query_exec_time_1.1";
2569++SET SESSION debug="+d,query_exec_time_1.2";
2570++SET SESSION debug="+d,query_exec_time_1.3";
2571++SET SESSION debug="+d,query_exec_time_1.5";
2572++SET SESSION debug="+d,query_exec_time_1.4";
2573++SET SESSION debug="+d,query_exec_time_0.5";
2574++SET SESSION debug="+d,query_exec_time_2.1";
2575++SET SESSION debug="+d,query_exec_time_2.3";
2576++SET SESSION debug="+d,query_exec_time_2.5";
2577++SET SESSION debug="+d,query_exec_time_3.1";
2578++SET SESSION debug="+d,query_exec_time_4.1";
2579++SET SESSION debug="+d,query_exec_time_5.1";
2580++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2581++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2582++Variable_name Value
2583++query_response_time_range_base 10
2584++SHOW QUERY_RESPONSE_TIME;
2585++
2586++ 0.000001 0 0.000000
2587++ 0.000010 0 0.000000
2588++ 0.000100 0 0.000000
2589++ 0.001000 0 0.000000
2590++ 0.010000 0 0.000000
2591++ 0.100000 0 0.000000
2592++ 1.000000 11 4.050000
2593++ 10.000000 11 25.700000
2594++ 100.000000 0 0.000000
2595++ 1000.000000 0 0.000000
2596++ 10000.000000 0 0.000000
2597++ 100000.000000 0 0.000000
2598++ 1000000.00000 0 0.000000
2599++TOO LONG 0 TOO LONG
2600++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2601++time count total
2602++ 0.000001 0 0.000000
2603++ 0.000010 0 0.000000
2604++ 0.000100 0 0.000000
2605++ 0.001000 0 0.000000
2606++ 0.010000 0 0.000000
2607++ 0.100000 0 0.000000
2608++ 1.000000 11 4.050000
2609++ 10.000000 11 25.700000
2610++ 100.000000 0 0.000000
2611++ 1000.000000 0 0.000000
2612++ 10000.000000 0 0.000000
2613++ 100000.000000 0 0.000000
2614++ 1000000.00000 0 0.000000
2615++TOO LONG 0 TOO LONG
2616++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2617++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7;
2618++FLUSH QUERY_RESPONSE_TIME;
2619++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2620++SET SESSION debug="+d,query_exec_time_0.31";
2621++SET SESSION debug="+d,query_exec_time_0.32";
2622++SET SESSION debug="+d,query_exec_time_0.33";
2623++SET SESSION debug="+d,query_exec_time_0.34";
2624++SET SESSION debug="+d,query_exec_time_0.35";
2625++SET SESSION debug="+d,query_exec_time_0.36";
2626++SET SESSION debug="+d,query_exec_time_0.37";
2627++SET SESSION debug="+d,query_exec_time_0.38";
2628++SET SESSION debug="+d,query_exec_time_0.39";
2629++SET SESSION debug="+d,query_exec_time_0.4";
2630++SET SESSION debug="+d,query_exec_time_1.1";
2631++SET SESSION debug="+d,query_exec_time_1.2";
2632++SET SESSION debug="+d,query_exec_time_1.3";
2633++SET SESSION debug="+d,query_exec_time_1.5";
2634++SET SESSION debug="+d,query_exec_time_1.4";
2635++SET SESSION debug="+d,query_exec_time_0.5";
2636++SET SESSION debug="+d,query_exec_time_2.1";
2637++SET SESSION debug="+d,query_exec_time_2.3";
2638++SET SESSION debug="+d,query_exec_time_2.5";
2639++SET SESSION debug="+d,query_exec_time_3.1";
2640++SET SESSION debug="+d,query_exec_time_4.1";
2641++SET SESSION debug="+d,query_exec_time_5.1";
2642++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2643++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2644++Variable_name Value
2645++query_response_time_range_base 7
2646++SHOW QUERY_RESPONSE_TIME;
2647++
2648++ 0.000001 0 0.000000
2649++ 0.000008 0 0.000000
2650++ 0.000059 0 0.000000
2651++ 0.000416 0 0.000000
2652++ 0.002915 0 0.000000
2653++ 0.020408 0 0.000000
2654++ 0.142857 0 0.000000
2655++ 1.000000 11 4.050000
2656++ 7.000000 11 25.700000
2657++ 49.000000 0 0.000000
2658++ 343.000000 0 0.000000
2659++ 2401.000000 0 0.000000
2660++ 16807.000000 0 0.000000
2661++ 117649.000000 0 0.000000
2662++ 823543.000000 0 0.000000
2663++ 5764801.00000 0 0.000000
2664++TOO LONG 0 TOO LONG
2665++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2666++time count total
2667++ 0.000001 0 0.000000
2668++ 0.000008 0 0.000000
2669++ 0.000059 0 0.000000
2670++ 0.000416 0 0.000000
2671++ 0.002915 0 0.000000
2672++ 0.020408 0 0.000000
2673++ 0.142857 0 0.000000
2674++ 1.000000 11 4.050000
2675++ 7.000000 11 25.700000
2676++ 49.000000 0 0.000000
2677++ 343.000000 0 0.000000
2678++ 2401.000000 0 0.000000
2679++ 16807.000000 0 0.000000
2680++ 117649.000000 0 0.000000
2681++ 823543.000000 0 0.000000
2682++ 5764801.00000 0 0.000000
2683++TOO LONG 0 TOO LONG
2684++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2685++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156;
2686++FLUSH QUERY_RESPONSE_TIME;
2687++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2688++SET SESSION debug="+d,query_exec_time_0.31";
2689++SET SESSION debug="+d,query_exec_time_0.32";
2690++SET SESSION debug="+d,query_exec_time_0.33";
2691++SET SESSION debug="+d,query_exec_time_0.34";
2692++SET SESSION debug="+d,query_exec_time_0.35";
2693++SET SESSION debug="+d,query_exec_time_0.36";
2694++SET SESSION debug="+d,query_exec_time_0.37";
2695++SET SESSION debug="+d,query_exec_time_0.38";
2696++SET SESSION debug="+d,query_exec_time_0.39";
2697++SET SESSION debug="+d,query_exec_time_0.4";
2698++SET SESSION debug="+d,query_exec_time_1.1";
2699++SET SESSION debug="+d,query_exec_time_1.2";
2700++SET SESSION debug="+d,query_exec_time_1.3";
2701++SET SESSION debug="+d,query_exec_time_1.5";
2702++SET SESSION debug="+d,query_exec_time_1.4";
2703++SET SESSION debug="+d,query_exec_time_0.5";
2704++SET SESSION debug="+d,query_exec_time_2.1";
2705++SET SESSION debug="+d,query_exec_time_2.3";
2706++SET SESSION debug="+d,query_exec_time_2.5";
2707++SET SESSION debug="+d,query_exec_time_3.1";
2708++SET SESSION debug="+d,query_exec_time_4.1";
2709++SET SESSION debug="+d,query_exec_time_5.1";
2710++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2711++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2712++Variable_name Value
2713++query_response_time_range_base 156
2714++SHOW QUERY_RESPONSE_TIME;
2715++
2716++ 0.000041 0 0.000000
2717++ 0.006410 0 0.000000
2718++ 1.000000 11 4.050000
2719++ 156.000000 11 25.700000
2720++ 24336.000000 0 0.000000
2721++ 3796416.00000 0 0.000000
2722++TOO LONG 0 TOO LONG
2723++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2724++time count total
2725++ 0.000041 0 0.000000
2726++ 0.006410 0 0.000000
2727++ 1.000000 11 4.050000
2728++ 156.000000 11 25.700000
2729++ 24336.000000 0 0.000000
2730++ 3796416.00000 0 0.000000
2731++TOO LONG 0 TOO LONG
2732++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2733++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000;
2734++FLUSH QUERY_RESPONSE_TIME;
2735++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2736++SET SESSION debug="+d,query_exec_time_0.31";
2737++SET SESSION debug="+d,query_exec_time_0.32";
2738++SET SESSION debug="+d,query_exec_time_0.33";
2739++SET SESSION debug="+d,query_exec_time_0.34";
2740++SET SESSION debug="+d,query_exec_time_0.35";
2741++SET SESSION debug="+d,query_exec_time_0.36";
2742++SET SESSION debug="+d,query_exec_time_0.37";
2743++SET SESSION debug="+d,query_exec_time_0.38";
2744++SET SESSION debug="+d,query_exec_time_0.39";
2745++SET SESSION debug="+d,query_exec_time_0.4";
2746++SET SESSION debug="+d,query_exec_time_1.1";
2747++SET SESSION debug="+d,query_exec_time_1.2";
2748++SET SESSION debug="+d,query_exec_time_1.3";
2749++SET SESSION debug="+d,query_exec_time_1.5";
2750++SET SESSION debug="+d,query_exec_time_1.4";
2751++SET SESSION debug="+d,query_exec_time_0.5";
2752++SET SESSION debug="+d,query_exec_time_2.1";
2753++SET SESSION debug="+d,query_exec_time_2.3";
2754++SET SESSION debug="+d,query_exec_time_2.5";
2755++SET SESSION debug="+d,query_exec_time_3.1";
2756++SET SESSION debug="+d,query_exec_time_4.1";
2757++SET SESSION debug="+d,query_exec_time_5.1";
2758++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2759++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2760++Variable_name Value
2761++query_response_time_range_base 1000
2762++SHOW QUERY_RESPONSE_TIME;
2763++
2764++ 0.000001 0 0.000000
2765++ 0.001000 0 0.000000
2766++ 1.000000 11 4.050000
2767++ 1000.000000 11 25.700000
2768++ 1000000.00000 0 0.000000
2769++TOO LONG 0 TOO LONG
2770++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2771++time count total
2772++ 0.000001 0 0.000000
2773++ 0.001000 0 0.000000
2774++ 1.000000 11 4.050000
2775++ 1000.000000 11 25.700000
2776++ 1000000.00000 0 0.000000
2777++TOO LONG 0 TOO LONG
2778++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2779++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001;
2780++Warnings:
2781++Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
2782++FLUSH QUERY_RESPONSE_TIME;
2783++SET GLOBAL QUERY_RESPONSE_TIME_STATS=1;
2784++SET SESSION debug="+d,query_exec_time_0.31";
2785++SET SESSION debug="+d,query_exec_time_0.32";
2786++SET SESSION debug="+d,query_exec_time_0.33";
2787++SET SESSION debug="+d,query_exec_time_0.34";
2788++SET SESSION debug="+d,query_exec_time_0.35";
2789++SET SESSION debug="+d,query_exec_time_0.36";
2790++SET SESSION debug="+d,query_exec_time_0.37";
2791++SET SESSION debug="+d,query_exec_time_0.38";
2792++SET SESSION debug="+d,query_exec_time_0.39";
2793++SET SESSION debug="+d,query_exec_time_0.4";
2794++SET SESSION debug="+d,query_exec_time_1.1";
2795++SET SESSION debug="+d,query_exec_time_1.2";
2796++SET SESSION debug="+d,query_exec_time_1.3";
2797++SET SESSION debug="+d,query_exec_time_1.5";
2798++SET SESSION debug="+d,query_exec_time_1.4";
2799++SET SESSION debug="+d,query_exec_time_0.5";
2800++SET SESSION debug="+d,query_exec_time_2.1";
2801++SET SESSION debug="+d,query_exec_time_2.3";
2802++SET SESSION debug="+d,query_exec_time_2.5";
2803++SET SESSION debug="+d,query_exec_time_3.1";
2804++SET SESSION debug="+d,query_exec_time_4.1";
2805++SET SESSION debug="+d,query_exec_time_5.1";
2806++SET GLOBAL QUERY_RESPONSE_TIME_STATS=0;
2807++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
2808++Variable_name Value
2809++query_response_time_range_base 1000
2810++SHOW QUERY_RESPONSE_TIME;
2811++
2812++ 0.000001 0 0.000000
2813++ 0.001000 0 0.000000
2814++ 1.000000 11 4.050000
2815++ 1000.000000 11 25.700000
2816++ 1000000.00000 0 0.000000
2817++TOO LONG 0 TOO LONG
2818++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
2819++time count total
2820++ 0.000001 0 0.000000
2821++ 0.001000 0 0.000000
2822++ 1.000000 11 4.050000
2823++ 1000.000000 11 25.700000
2824++ 1000000.00000 0 0.000000
2825++TOO LONG 0 TOO LONG
2826++SET GLOBAL debug="";
2827++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
2828++SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
2829++DROP PROCEDURE test_f;
2830+diff -ruN a/mysql-test/suite/percona/t/query_response_time-replication.test b/mysql-test/suite/percona/t/query_response_time-replication.test
2831+--- a/mysql-test/suite/percona/t/query_response_time-replication.test 1970-01-01 03:00:00.000000000 +0300
2832++++ b/mysql-test/suite/percona/t/query_response_time-replication.test 2011-07-11 04:22:26.319345151 +0300
2833+@@ -0,0 +1,40 @@
2834++--source include/have_response_time_distribution.inc
2835++--source include/have_debug.inc
2836++--source include/have_binlog_format_statement.inc
2837++--source include/master-slave.inc
2838++
2839++connection master;
2840++--disable_warnings
2841++DROP TABLE IF EXISTS t;
2842++--enable_warnings
2843++CREATE TABLE t(id INT);
2844++sync_slave_with_master;
2845++
2846++connection slave;
2847++SET GLOBAL debug="+d,query_exec_time_debug";
2848++
2849++--let base=1
2850++--source suite/percona/include/query_response_time.inc
2851++--let base=2
2852++--source suite/percona/include/query_response_time.inc
2853++--let base=10
2854++--source suite/percona/include/query_response_time.inc
2855++--let base=7
2856++--source suite/percona/include/query_response_time.inc
2857++--let base=156
2858++--source suite/percona/include/query_response_time.inc
2859++--let base=1000
2860++--source suite/percona/include/query_response_time.inc
2861++--let base=1001
2862++--source suite/percona/include/query_response_time.inc
2863++
2864++connection slave;
2865++SET GLOBAL debug="";
2866++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
2867++SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
2868++
2869++connection master;
2870++DROP TABLE t;
2871++sync_slave_with_master;
2872++
2873++--source include/rpl_end.inc
2874+diff -ruN a/mysql-test/suite/percona/t/query_response_time-stored.test b/mysql-test/suite/percona/t/query_response_time-stored.test
2875+--- a/mysql-test/suite/percona/t/query_response_time-stored.test 1970-01-01 03:00:00.000000000 +0300
2876++++ b/mysql-test/suite/percona/t/query_response_time-stored.test 2011-07-11 04:22:26.319345151 +0300
2877+@@ -0,0 +1,34 @@
2878++--source include/have_response_time_distribution.inc
2879++--source include/have_debug.inc
2880++
2881++delimiter ^;
2882++CREATE PROCEDURE test_f(time VARCHAR(5),i INT)
2883++BEGIN
2884++ SET SESSION debug=CONCAT("+d,query_exec_time_", time);
2885++ /* query_exec_time= time */ INSERT INTO t VALUES(i);
2886++ DELETE FROM t;
2887++END^
2888++delimiter ;^
2889++
2890++SET GLOBAL debug="+d,query_exec_time_debug";
2891++
2892++--let base=1
2893++--source suite/percona/include/query_response_time.inc
2894++--let base=2
2895++--source suite/percona/include/query_response_time.inc
2896++--let base=10
2897++--source suite/percona/include/query_response_time.inc
2898++--let base=7
2899++--source suite/percona/include/query_response_time.inc
2900++--let base=156
2901++--source suite/percona/include/query_response_time.inc
2902++--let base=1000
2903++--source suite/percona/include/query_response_time.inc
2904++--let base=1001
2905++--source suite/percona/include/query_response_time.inc
2906++
2907++SET GLOBAL debug="";
2908++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
2909++SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
2910++
2911++DROP PROCEDURE test_f;
2912+diff -ruN a/mysql-test/suite/percona/t/query_response_time.test b/mysql-test/suite/percona/t/query_response_time.test
2913+--- a/mysql-test/suite/percona/t/query_response_time.test 1970-01-01 03:00:00.000000000 +0300
2914++++ b/mysql-test/suite/percona/t/query_response_time.test 2011-07-11 04:22:26.319345151 +0300
2915+@@ -0,0 +1,23 @@
2916++--source include/have_response_time_distribution.inc
2917++--source include/have_debug.inc
2918++
2919++SET GLOBAL debug="+d,query_exec_time_debug";
2920++
2921++--let base=1
2922++--source suite/percona/include/query_response_time.inc
2923++--let base=2
2924++--source suite/percona/include/query_response_time.inc
2925++--let base=10
2926++--source suite/percona/include/query_response_time.inc
2927++--let base=7
2928++--source suite/percona/include/query_response_time.inc
2929++--let base=156
2930++--source suite/percona/include/query_response_time.inc
2931++--let base=1000
2932++--source suite/percona/include/query_response_time.inc
2933++--let base=1001
2934++--source suite/percona/include/query_response_time.inc
2935++
2936++SET GLOBAL debug="";
2937++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default;
2938++SET GLOBAL QUERY_RESPONSE_TIME_STATS=default;
2939+diff -ruN a/patch_info/response-time-distribution.info b/patch_info/response-time-distribution.info
2940+--- a/patch_info/response-time-distribution.info 1970-01-01 03:00:00.000000000 +0300
2941++++ b/patch_info/response-time-distribution.info 2011-07-11 04:22:26.320345158 +0300
2942 @@ -0,0 +1,9 @@
2943 +File=response-time-distribution.patch
2944 +Name=Response time distribution
2945@@ -55,8 +1888,8 @@
2946 +2010-07-02 first version avaliable
2947 +2010-09-15 add column 'total'
2948 diff -ruN a/sql/CMakeLists.txt b/sql/CMakeLists.txt
2949---- a/sql/CMakeLists.txt 2011-03-31 17:36:18.000000000 +0400
2950-+++ b/sql/CMakeLists.txt 2011-04-09 19:12:12.000000000 +0400
2951+--- a/sql/CMakeLists.txt 2011-05-11 14:54:12.000000000 +0300
2952++++ b/sql/CMakeLists.txt 2011-07-11 04:22:26.321345166 +0300
2953 @@ -51,7 +51,7 @@
2954 message.h mf_iocache.cc my_decimal.cc ../sql-common/my_time.c
2955 mysqld.cc net_serv.cc keycaches.cc
2956@@ -76,8 +1909,8 @@
2957 debug_sync.cc debug_sync.h
2958 sql_repl.cc sql_select.cc sql_show.cc sql_state.c sql_string.cc
2959 diff -ruN a/sql/handler.h b/sql/handler.h
2960---- a/sql/handler.h 2011-04-09 19:11:54.000000000 +0400
2961-+++ b/sql/handler.h 2011-04-10 11:28:51.000000000 +0400
2962+--- a/sql/handler.h 2011-07-11 04:22:07.914214616 +0300
2963++++ b/sql/handler.h 2011-07-11 04:22:26.322345173 +0300
2964 @@ -580,6 +580,7 @@
2965 SCH_PROFILES,
2966 SCH_REFERENTIAL_CONSTRAINTS,
2967@@ -87,8 +1920,8 @@
2968 SCH_SCHEMA_PRIVILEGES,
2969 SCH_SESSION_STATUS,
2970 diff -ruN a/sql/lex.h b/sql/lex.h
2971---- a/sql/lex.h 2011-03-31 17:36:18.000000000 +0400
2972-+++ b/sql/lex.h 2011-04-10 11:28:52.000000000 +0400
2973+--- a/sql/lex.h 2011-05-11 14:54:12.000000000 +0300
2974++++ b/sql/lex.h 2011-07-11 04:22:26.323345179 +0300
2975 @@ -426,6 +426,7 @@
2976 { "PURGE", SYM(PURGE)},
2977 { "QUARTER", SYM(QUARTER_SYM)},
2978@@ -98,8 +1931,8 @@
2979 { "RANGE", SYM(RANGE_SYM)},
2980 { "READ", SYM(READ_SYM)},
2981 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
2982---- a/sql/mysqld.cc 2011-04-09 19:12:11.000000000 +0400
2983-+++ b/sql/mysqld.cc 2011-04-10 11:28:52.000000000 +0400
2984+--- a/sql/mysqld.cc 2011-07-11 04:22:09.059222736 +0300
2985++++ b/sql/mysqld.cc 2011-07-11 04:22:26.325345194 +0300
2986 @@ -69,6 +69,8 @@
2987 #include "debug_sync.h"
2988 #include "sql_callback.h"
2989@@ -162,8 +1995,8 @@
2990 have_geometry=SHOW_OPTION_YES;
2991 #else
2992 diff -ruN a/sql/mysqld.h b/sql/mysqld.h
2993---- a/sql/mysqld.h 2011-04-09 19:12:11.000000000 +0400
2994-+++ b/sql/mysqld.h 2011-04-10 11:28:52.000000000 +0400
2995+--- a/sql/mysqld.h 2011-07-11 04:22:09.045222637 +0300
2996++++ b/sql/mysqld.h 2011-07-11 04:22:26.327345208 +0300
2997 @@ -98,6 +98,10 @@
2998 extern bool opt_disable_networking, opt_skip_show_db;
2999 extern bool opt_skip_name_resolve;
3000@@ -175,9 +2008,9 @@
3001 extern my_bool opt_character_set_client_handshake;
3002 extern bool volatile abort_loop;
3003 extern bool in_bootstrap;
3004-diff -ruN /dev/null b/sql/query_response_time.cc
3005---- /dev/null 1970-01-01 00:00:00.000000000 +0000
3006-+++ b/sql/query_response_time.cc 2011-04-10 00:27:11.000000000 +0400
3007+diff -ruN a/sql/query_response_time.cc b/sql/query_response_time.cc
3008+--- a/sql/query_response_time.cc 1970-01-01 03:00:00.000000000 +0300
3009++++ b/sql/query_response_time.cc 2011-07-11 04:22:26.328345215 +0300
3010 @@ -0,0 +1,310 @@
3011 +#include "mysql_version.h"
3012 +#include "my_global.h"
3013@@ -489,9 +2322,9 @@
3014 + return query_response_time::g_collector.fill(thd,tables,cond);
3015 +}
3016 +#endif // HAVE_RESPONSE_TIME_DISTRIBUTION
3017-diff -ruN /dev/null b/sql/query_response_time.h
3018---- /dev/null 1970-01-01 00:00:00.000000000 +0000
3019-+++ b/sql/query_response_time.h 2011-04-09 19:12:12.000000000 +0400
3020+diff -ruN a/sql/query_response_time.h b/sql/query_response_time.h
3021+--- a/sql/query_response_time.h 1970-01-01 03:00:00.000000000 +0300
3022++++ b/sql/query_response_time.h 2011-07-11 04:22:26.328345215 +0300
3023 @@ -0,0 +1,71 @@
3024 +#ifndef QUERY_RESPONSE_TIME_H
3025 +#define QUERY_RESPONSE_TIME_H
3026@@ -565,8 +2398,8 @@
3027 +
3028 +#endif // QUERY_RESPONSE_TIME_H
3029 diff -ruN a/sql/set_var.h b/sql/set_var.h
3030---- a/sql/set_var.h 2011-03-31 17:36:18.000000000 +0400
3031-+++ b/sql/set_var.h 2011-04-09 19:12:12.000000000 +0400
3032+--- a/sql/set_var.h 2011-05-11 14:54:11.000000000 +0300
3033++++ b/sql/set_var.h 2011-07-11 04:22:26.328345215 +0300
3034 @@ -293,6 +293,7 @@
3035
3036 extern SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen;
3037@@ -576,8 +2409,8 @@
3038 extern SHOW_COMP_OPTION have_crypt;
3039 extern SHOW_COMP_OPTION have_compress;
3040 diff -ruN a/sql/sql_parse.cc b/sql/sql_parse.cc
3041---- a/sql/sql_parse.cc 2011-04-09 19:12:10.000000000 +0400
3042-+++ b/sql/sql_parse.cc 2011-04-10 11:28:51.000000000 +0400
3043+--- a/sql/sql_parse.cc 2011-07-11 04:22:09.007222367 +0300
3044++++ b/sql/sql_parse.cc 2011-07-11 04:22:26.331345236 +0300
3045 @@ -88,6 +88,7 @@
3046 #include "sp_cache.h"
3047 #include "events.h"
3048@@ -586,93 +2419,39 @@
3049 #include "transaction.h"
3050 #include "sql_audit.h"
3051 #include "sql_prepare.h"
3052-@@ -1482,22 +1483,74 @@
3053- Do not log administrative statements unless the appropriate option is
3054- set.
3055- */
3056-+ #ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
3057-+ if (opt_query_response_time_stats || thd->enable_slow_log)
3058-+#else // HAVE_RESPONSE_TIME_DISTRIBUTION
3059- if (thd->enable_slow_log)
3060-+#endif // HAVE_RESPONSE_TIME_DISTRIBUTION
3061- {
3062-- ulonglong end_utime_of_query= thd->current_utime();
3063-- thd_proc_info(thd, "logging slow query");
3064-+ ulonglong end_utime_of_query = thd->current_utime();
3065-+ ulonglong query_execution_time = end_utime_of_query - thd->utime_after_lock;
3066-+#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
3067-+
3068-+#define DBUG_TEST_QRT(t,v) \
3069-+ DBUG_EXECUTE_IF(t, \
3070-+ { \
3071-+ query_execution_time= v; \
3072-+ DBUG_SET("-d,"t); \
3073-+ })
3074-+
3075-+ DBUG_EXECUTE_IF("query_exec_time_debug", query_execution_time= 0; );
3076-+
3077-+ DBUG_TEST_QRT("query_exec_time_0.31", 310000UL);
3078-+ DBUG_TEST_QRT("query_exec_time_0.32", 320000UL);
3079-+ DBUG_TEST_QRT("query_exec_time_0.33", 330000UL);
3080-+ DBUG_TEST_QRT("query_exec_time_0.34", 340000UL);
3081-+ DBUG_TEST_QRT("query_exec_time_0.35", 350000UL);
3082-+ DBUG_TEST_QRT("query_exec_time_0.36", 360000UL);
3083-+ DBUG_TEST_QRT("query_exec_time_0.37", 370000UL);
3084-+ DBUG_TEST_QRT("query_exec_time_0.38", 380000UL);
3085-+ DBUG_TEST_QRT("query_exec_time_0.39", 390000UL);
3086-+ DBUG_TEST_QRT("query_exec_time_0.4", 400000UL);
3087-+ DBUG_TEST_QRT("query_exec_time_0.5", 500000UL);
3088-+ DBUG_TEST_QRT("query_exec_time_1.1", 1100000UL);
3089-+ DBUG_TEST_QRT("query_exec_time_1.2", 1200000UL);
3090-+ DBUG_TEST_QRT("query_exec_time_1.3", 1300000UL);
3091-+ DBUG_TEST_QRT("query_exec_time_1.4", 1400000UL);
3092-+ DBUG_TEST_QRT("query_exec_time_1.5", 1500000UL);
3093-+ DBUG_TEST_QRT("query_exec_time_2.1", 2100000UL);
3094-+ DBUG_TEST_QRT("query_exec_time_2.3", 2300000UL);
3095-+ DBUG_TEST_QRT("query_exec_time_2.5", 2500000UL);
3096-+
3097-+ DBUG_EXECUTE_IF("query_exec_time_debug",
3098-+ if (query_execution_time == 0)
3099-+ opt_query_response_time_stats= 0;
3100-+ else
3101-+ opt_query_response_time_stats= 1;);
3102-
3103-- if (((thd->server_status & SERVER_QUERY_WAS_SLOW) ||
3104-- ((thd->server_status &
3105-- (SERVER_QUERY_NO_INDEX_USED | SERVER_QUERY_NO_GOOD_INDEX_USED)) &&
3106-- opt_log_queries_not_using_indexes &&
3107-- !(sql_command_flags[thd->lex->sql_command] & CF_STATUS_COMMAND))) &&
3108-- thd->examined_row_count >= thd->variables.min_examined_row_limit)
3109-+#undef DBUG_TEST_QRT
3110-+
3111-+ if(opt_query_response_time_stats)
3112-+ {
3113-+ query_response_time_collect(query_execution_time);
3114-+ }
3115-+#endif // HAVE_RESPONSE_TIME_DISTRIBUTION
3116-+ if (thd->enable_slow_log)
3117- {
3118- thd_proc_info(thd, "logging slow query");
3119-- thd->status_var.long_query_count++;
3120-- slow_log_print(thd, thd->query(), thd->query_length(),
3121-- end_utime_of_query);
3122-+
3123-+ if (((thd->server_status & SERVER_QUERY_WAS_SLOW) ||
3124-+ ((thd->server_status &
3125-+ (SERVER_QUERY_NO_INDEX_USED | SERVER_QUERY_NO_GOOD_INDEX_USED)) &&
3126-+ opt_log_queries_not_using_indexes &&
3127-+ !(sql_command_flags[thd->lex->sql_command] & CF_STATUS_COMMAND))) &&
3128-+ thd->examined_row_count >= thd->variables.min_examined_row_limit)
3129-+ {
3130-+ thd_proc_info(thd, "logging slow query");
3131-+ thd->status_var.long_query_count++;
3132-+ slow_log_print(thd, thd->query(), thd->query_length(),
3133-+ end_utime_of_query);
3134-+ }
3135- }
3136- }
3137- DBUG_VOID_RETURN;
3138-@@ -1616,6 +1669,7 @@
3139+@@ -1502,12 +1503,31 @@
3140+ DBUG_RETURN(query_exec_time);
3141+ }
3142+
3143++void query_response_time_collect_with_check(ulonglong query_exec_time)
3144++{
3145++ DBUG_ENTER("query_response_time_collect_with_check");
3146++ bool collect= opt_query_response_time_stats;
3147++ DBUG_EXECUTE_IF("query_exec_time_debug",
3148++ {
3149++ if (0 == query_exec_time)
3150++ {
3151++ collect= false;
3152++ }
3153++ });
3154++ if(collect)
3155++ {
3156++ query_response_time_collect(query_exec_time);
3157++ }
3158++ DBUG_VOID_RETURN;
3159++}
3160++
3161+ void log_slow_statement(THD *thd)
3162+ {
3163+ DBUG_ENTER("log_slow_statement");
3164+
3165+ ulonglong end_utime_of_query= thd->current_utime();
3166+ ulonglong query_exec_time= ::query_exec_time(thd, end_utime_of_query);
3167++ query_response_time_collect_with_check(query_exec_time);
3168+
3169+ /*
3170+ The following should never be true with our current code base,
3171+@@ -1689,6 +1709,7 @@
3172 case SCH_CHARSETS:
3173 case SCH_ENGINES:
3174 case SCH_COLLATIONS:
3175@@ -681,8 +2460,8 @@
3176 case SCH_USER_PRIVILEGES:
3177 case SCH_SCHEMA_PRIVILEGES:
3178 diff -ruN a/sql/sql_reload.cc b/sql/sql_reload.cc
3179---- a/sql/sql_reload.cc 2011-03-31 17:36:18.000000000 +0400
3180-+++ b/sql/sql_reload.cc 2011-04-10 11:28:51.000000000 +0400
3181+--- a/sql/sql_reload.cc 2011-05-11 14:54:12.000000000 +0300
3182++++ b/sql/sql_reload.cc 2011-07-11 04:22:26.334345257 +0300
3183 @@ -25,7 +25,7 @@
3184 #include "hostname.h" // hostname_cache_refresh
3185 #include "sql_repl.h" // reset_master, reset_slave
3186@@ -706,8 +2485,8 @@
3187 *write_to_binlog= tmp_write_to_binlog;
3188 /*
3189 diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
3190---- a/sql/sql_show.cc 2011-04-09 19:12:10.000000000 +0400
3191-+++ b/sql/sql_show.cc 2011-04-10 11:28:51.000000000 +0400
3192+--- a/sql/sql_show.cc 2011-07-11 04:22:09.024222488 +0300
3193++++ b/sql/sql_show.cc 2011-07-11 04:22:26.337345279 +0300
3194 @@ -50,6 +50,7 @@
3195 #include "event_data_objects.h"
3196 #endif
3197@@ -746,8 +2525,8 @@
3198 fill_schema_schemata, make_schemata_old_format, 0, 1, -1, 0, 0},
3199 {"SCHEMA_PRIVILEGES", schema_privileges_fields_info, create_schema_table,
3200 diff -ruN a/sql/sql_yacc.yy b/sql/sql_yacc.yy
3201---- a/sql/sql_yacc.yy 2011-04-09 19:11:54.000000000 +0400
3202-+++ b/sql/sql_yacc.yy 2011-04-10 11:28:52.000000000 +0400
3203+--- a/sql/sql_yacc.yy 2011-07-11 04:22:07.953214892 +0300
3204++++ b/sql/sql_yacc.yy 2011-07-11 04:22:26.343345322 +0300
3205 @@ -1193,6 +1193,7 @@
3206 %token PURGE
3207 %token QUARTER_SYM
3208@@ -794,8 +2573,8 @@
3209 | READ_ONLY_SYM {}
3210 | REBUILD_SYM {}
3211 diff -ruN a/sql/sys_vars.cc b/sql/sys_vars.cc
3212---- a/sql/sys_vars.cc 2011-04-09 19:12:11.000000000 +0400
3213-+++ b/sql/sys_vars.cc 2011-04-10 11:28:51.000000000 +0400
3214+--- a/sql/sys_vars.cc 2011-07-11 04:22:09.056222715 +0300
3215++++ b/sql/sys_vars.cc 2011-07-11 04:22:26.350345371 +0300
3216 @@ -49,6 +49,7 @@
3217 #include "../storage/perfschema/pfs_server.h"
3218 #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
3219
3220=== modified file 'series'
3221--- series 2011-06-21 13:24:49 +0000
3222+++ series 2011-07-11 01:29:49 +0000
3223@@ -1,3 +1,4 @@
3224+percona_suite.patch
3225 microsec_process.patch
3226 optimizer_fix.patch
3227 mysql_dump_ignore_ct.patch
3228
3229=== modified file 'show_slave_status_nolock.patch'
3230--- show_slave_status_nolock.patch 2011-06-16 01:19:11 +0000
3231+++ show_slave_status_nolock.patch 2011-07-11 01:29:49 +0000
3232@@ -60,7 +60,7 @@
3233 sql_command_flags[SQLCOM_SHOW_CREATE_PROC]= CF_STATUS_COMMAND;
3234 sql_command_flags[SQLCOM_SHOW_CREATE_FUNC]= CF_STATUS_COMMAND;
3235 sql_command_flags[SQLCOM_SHOW_CREATE_TRIGGER]= CF_STATUS_COMMAND;
3236-@@ -2293,12 +2294,16 @@
3237+@@ -2333,12 +2334,16 @@
3238 mysql_mutex_unlock(&LOCK_active_mi);
3239 break;
3240 }
3241@@ -78,7 +78,7 @@
3242 if (active_mi != NULL)
3243 {
3244 res = show_master_info(thd, active_mi);
3245-@@ -2309,7 +2314,10 @@
3246+@@ -2349,7 +2354,10 @@
3247 WARN_NO_MASTER_INFO, ER(WARN_NO_MASTER_INFO));
3248 my_ok(thd);
3249 }
3250
3251=== modified file 'slow_extended.patch'
3252--- slow_extended.patch 2011-06-23 09:08:51 +0000
3253+++ slow_extended.patch 2011-07-11 01:29:49 +0000
3254@@ -714,7 +714,9 @@
3255 diff -ruN a/sql/sql_connect.cc b/sql/sql_connect.cc
3256 --- a/sql/sql_connect.cc 2011-04-09 18:48:05.000000000 +0400
3257 +++ b/sql/sql_connect.cc 2011-04-09 18:48:50.000000000 +0400
3258-@@ -764,4 +764,13 @@
3259+@@ -762,6 +762,15 @@
3260+ MYSQL_CONNECTION_START(thd->thread_id, &thd->security_ctx->priv_user[0],
3261+ (char *) thd->security_ctx->host_or_ip);
3262
3263 + /*
3264 + If rate limiting of slow log writes is enabled, decide whether to log this
3265@@ -731,15 +733,93 @@
3266 diff -ruN a/sql/sql_parse.cc b/sql/sql_parse.cc
3267 --- a/sql/sql_parse.cc 2011-04-09 18:48:20.000000000 +0400
3268 +++ b/sql/sql_parse.cc 2011-04-09 18:48:50.000000000 +0400
3269-@@ -1430,7 +1430,6 @@
3270+@@ -1430,11 +1430,85 @@
3271 DBUG_RETURN(error);
3272 }
3273
3274--
3275++ulonglong query_exec_time(THD *thd, ulonglong end_utime_of_query)
3276++{
3277++ DBUG_ENTER("query_exec_time");
3278++ ulonglong utime_after_lock= thd->utime_after_lock;
3279++ ulonglong query_exec_time= 0;
3280++ if (utime_after_lock < end_utime_of_query)
3281++ {
3282++ query_exec_time= end_utime_of_query - utime_after_lock;
3283++ }
3284++
3285++#define DBUG_QRT_STR "query_exec_time"
3286++#define DBUG_QRT_TEST(t,v) do \
3287++ { \
3288++ const char* prefix= "/* " DBUG_QRT_STR "= \"" t "\" */"; \
3289++ uint32 prefix_length= strlen(prefix); \
3290++ uint32 length= \
3291++ (prefix_length < query_length \
3292++ ? prefix_length : query_length); \
3293++ if (0 == strncmp(prefix, query, length)) \
3294++ { \
3295++ query_exec_time= v; \
3296++ } \
3297++ DBUG_EXECUTE_IF(DBUG_QRT_STR "_" t, \
3298++ { \
3299++ query_exec_time= v; \
3300++ DBUG_SET("-d," DBUG_QRT_STR "_" t); \
3301++ }); \
3302++ } \
3303++ while(false)
3304++
3305++ DBUG_EXECUTE_IF(DBUG_QRT_STR "_debug",
3306++ {
3307++ const char* query= thd->query();
3308++ uint32 query_length= thd->query_length();
3309++ query_exec_time= 0;
3310++ DBUG_QRT_TEST("0.31", 310000UL);
3311++ DBUG_QRT_TEST("0.32", 320000UL);
3312++ DBUG_QRT_TEST("0.33", 330000UL);
3313++ DBUG_QRT_TEST("0.34", 340000UL);
3314++ DBUG_QRT_TEST("0.35", 350000UL);
3315++ DBUG_QRT_TEST("0.36", 360000UL);
3316++ DBUG_QRT_TEST("0.37", 370000UL);
3317++ DBUG_QRT_TEST("0.38", 380000UL);
3318++ DBUG_QRT_TEST("0.39", 390000UL);
3319++ DBUG_QRT_TEST("0.4", 400000UL);
3320++ DBUG_QRT_TEST("0.5", 500000UL);
3321++ DBUG_QRT_TEST("1.1", 1100000UL);
3322++ DBUG_QRT_TEST("1.2", 1200000UL);
3323++ DBUG_QRT_TEST("1.3", 1300000UL);
3324++ DBUG_QRT_TEST("1.4", 1400000UL);
3325++ DBUG_QRT_TEST("1.5", 1500000UL);
3326++ DBUG_QRT_TEST("2.1", 2100000UL);
3327++ DBUG_QRT_TEST("2.3", 2300000UL);
3328++ DBUG_QRT_TEST("2.5", 2500000UL);
3329++ DBUG_QRT_TEST("3.1", 3100000UL);
3330++ DBUG_QRT_TEST("4.1", 4100000UL);
3331++ DBUG_QRT_TEST("5.1", 5100000UL);
3332++ });
3333++#undef DBUG_QRT_TEST
3334++#undef DBUG_QRT_STR
3335++ uint server_query_was_slow= SERVER_QUERY_WAS_SLOW;
3336++ if (query_exec_time > thd->variables.long_query_time)
3337++ {
3338++ thd->server_status|= server_query_was_slow;
3339++ }
3340++ else
3341++ {
3342++ thd->server_status&= ~server_query_was_slow;
3343++ }
3344++ DBUG_RETURN(query_exec_time);
3345++}
3346+
3347 void log_slow_statement(THD *thd)
3348 {
3349 DBUG_ENTER("log_slow_statement");
3350-@@ -1443,6 +1442,42 @@
3351+
3352++ ulonglong end_utime_of_query= thd->current_utime();
3353++ ulonglong query_exec_time= ::query_exec_time(thd, end_utime_of_query);
3354++
3355+ /*
3356+ The following should never be true with our current code base,
3357+ but better to keep this here so we don't accidently try to log a
3358+@@ -1443,13 +1513,47 @@
3359 if (unlikely(thd->in_sub_stmt))
3360 DBUG_VOID_RETURN; // Don't set time for sub stmt
3361
3362@@ -757,7 +837,6 @@
3363 + to make an exception and write to slow log anyway.
3364 + */
3365 +
3366-+ ulonglong end_utime_of_query= thd->current_utime();
3367 +#define USE_GLOBAL_UPDATE(variable_name,enum_value_name) \
3368 + if (opt_slow_query_log_use_global_control & (ULL(1) << enum_value_name)) \
3369 + { \
3370@@ -775,14 +854,21 @@
3371 + /* Do not log this thread's queries due to rate limiting. */
3372 + if (thd->write_to_slow_log != TRUE
3373 + && (thd->variables.long_query_time >= 1000000
3374-+ || (ulong) (end_utime_of_query - thd->utime_after_lock) < 1000000))
3375++ || (ulong) query_exec_time < 1000000))
3376 + DBUG_VOID_RETURN;
3377 +
3378 +
3379 /*
3380 Do not log administrative statements unless the appropriate option is
3381 set.
3382-@@ -1818,6 +1853,9 @@
3383+ */
3384+ if (thd->enable_slow_log)
3385+ {
3386+- ulonglong end_utime_of_query= thd->current_utime();
3387+ thd_proc_info(thd, "logging slow query");
3388+
3389+ if (((thd->server_status & SERVER_QUERY_WAS_SLOW) ||
3390+@@ -1818,6 +1922,9 @@
3391 context.resolve_in_table_list_only(select_lex->
3392 table_list.first);
3393
3394@@ -792,7 +878,7 @@
3395 /*
3396 Reset warning count for each query that uses tables
3397 A better approach would be to reset this for any commands
3398-@@ -5252,6 +5290,21 @@
3399+@@ -5252,6 +5359,21 @@
3400 thd->rand_used= 0;
3401 thd->sent_row_count= thd->examined_row_count= 0;
3402
3403
3404=== modified file 'userstat.patch'
3405--- userstat.patch 2011-06-16 01:19:11 +0000
3406+++ userstat.patch 2011-07-11 01:29:49 +0000
3407@@ -1816,7 +1816,7 @@
3408 /*
3409 Commands which always take a long time are logged into
3410 the slow log only if opt_log_slow_admin_statements is set.
3411-@@ -1663,6 +1676,13 @@
3412+@@ -1703,6 +1716,13 @@
3413 thd->profiling.discard_current_query();
3414 #endif
3415 break;
3416@@ -1830,7 +1830,7 @@
3417 case SCH_OPEN_TABLES:
3418 case SCH_VARIABLES:
3419 case SCH_STATUS:
3420-@@ -1820,6 +1840,7 @@
3421+@@ -1860,6 +1880,7 @@
3422 thd->security_ctx->priv_host)) &&
3423 check_global_access(thd, SUPER_ACL))
3424 {
3425@@ -1838,7 +1838,7 @@
3426 my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER");
3427 DBUG_RETURN(TRUE);
3428 }
3429-@@ -4757,6 +4778,7 @@
3430+@@ -4797,6 +4818,7 @@
3431 case ACL_INTERNAL_ACCESS_DENIED:
3432 if (! no_errors)
3433 {
3434@@ -1846,7 +1846,7 @@
3435 my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
3436 sctx->priv_user, sctx->priv_host, db);
3437 }
3438-@@ -4807,6 +4829,7 @@
3439+@@ -4847,6 +4869,7 @@
3440 DBUG_PRINT("error",("No possible access"));
3441 if (!no_errors)
3442 {
3443@@ -1854,7 +1854,7 @@
3444 if (thd->password == 2)
3445 my_error(ER_ACCESS_DENIED_NO_PASSWORD_ERROR, MYF(0),
3446 sctx->priv_user,
3447-@@ -4923,6 +4946,7 @@
3448+@@ -4963,6 +4986,7 @@
3449
3450 if (!thd->col_access && check_grant_db(thd, dst_db_name))
3451 {
3452@@ -1862,7 +1862,7 @@
3453 my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
3454 thd->security_ctx->priv_user,
3455 thd->security_ctx->priv_host,
3456-@@ -5193,6 +5217,7 @@
3457+@@ -5233,6 +5257,7 @@
3458 if ((thd->security_ctx->master_access & want_access))
3459 return 0;
3460 get_privilege_desc(command, sizeof(command), want_access);
3461@@ -1870,7 +1870,7 @@
3462 my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command);
3463 return 1;
3464 #else
3465-@@ -5574,6 +5599,32 @@
3466+@@ -5614,6 +5639,32 @@
3467 lex_start(thd);
3468 mysql_reset_thd_for_next_command(thd);
3469
3470@@ -1903,7 +1903,7 @@
3471 if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0)
3472 {
3473 LEX *lex= thd->lex;
3474-@@ -5642,6 +5693,52 @@
3475+@@ -5682,6 +5733,52 @@
3476 DBUG_ASSERT(thd->change_list.is_empty());
3477 }
3478

Subscribers

People subscribed via source and target branches