Merge lp:~akopytov/percona-server/slow_extended_and_rtd_fixes into lp:percona-server/5.1
- slow_extended_and_rtd_fixes
- Merge into 5.1
Proposed by
Alexey Kopytov
Status: | Merged |
---|---|
Merged at revision: | 261 |
Proposed branch: | lp:~akopytov/percona-server/slow_extended_and_rtd_fixes |
Merge into: | lp:percona-server/5.1 |
Diff against target: |
10937 lines (+5359/-3875) 79 files modified
bugfix48929.patch (+9/-9) control_online_alter_index.patch (+14/-14) fix-bug671764.patch (+4/-4) microsec_process.patch (+9/-9) mysql-test/have_response_time_distribution.inc (+0/-4) mysql-test/have_response_time_distribution.require (+0/-2) mysql-test/percona_server_variables_debug.result (+1/-0) mysql-test/response-time-distribution.patch/percona_query_response_time-replication.result (+0/-67) mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test (+0/-59) mysql-test/response-time-distribution.patch/percona_query_response_time-stored.result (+0/-313) mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test (+0/-90) mysql-test/response-time-distribution.patch/percona_query_response_time.result (+0/-567) mysql-test/response-time-distribution.patch/percona_query_response_time.test (+0/-68) 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) mysql-test/slow_extended.patch/grep.inc (+0/-16) mysql-test/slow_extended.patch/percona_slow_extended-combined-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-combined.result (+0/-18) mysql-test/slow_extended.patch/percona_slow_extended-combined.test (+0/-6) mysql-test/slow_extended.patch/percona_slow_extended-combined2-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-combined2.result (+0/-12) mysql-test/slow_extended.patch/percona_slow_extended-combined2.test (+0/-4) mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.result (+0/-12) mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.test (+0/-12) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.result (+0/-25) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.test (+0/-32) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result (+0/-3) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result (+0/-3) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result (+0/-9) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test (+0/-3) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result (+0/-9) mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test (+0/-12) mysql-test/slow_extended.patch/percona_slow_extended-long_query_time-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.result (+0/-22) mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test (+0/-19) mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result (+0/-11) mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test (+0/-19) mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result (+0/-25) mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test (+0/-32) mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result (+0/-21) mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test (+0/-38) mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result (+0/-94) mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test (+0/-116) mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.result (+0/-93) mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test (+0/-168) mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result (+0/-3) mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result (+0/-3) mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt (+0/-1) mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result (+0/-59) mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test (+0/-41) mysql_dump_ignore_ct.patch (+7/-8) query_cache_enhance.patch (+53/-79) response_time_distribution.patch (+3930/-1435) series (+1/-1) show_slave_status_nolock.patch (+2/-2) show_temp_51.patch (+3/-3) slow_extended.patch (+1234/-57) userstat.patch (+92/-92) |
To merge this branch: | bzr merge lp:~akopytov/percona-server/slow_extended_and_rtd_fixes |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith | Pending | ||
Review via email: mp+69408@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bugfix48929.patch' |
2 | --- bugfix48929.patch 2011-07-20 03:48:37 +0000 |
3 | +++ bugfix48929.patch 2011-07-27 08:44:25 +0000 |
4 | @@ -6,8 +6,8 @@ |
5 | # Any small change to this file in the main branch |
6 | # should be done or reviewed by the maintainer! |
7 | diff -ruN a/configure.in b/configure.in |
8 | ---- a/configure.in 2010-07-07 03:33:05.008972002 +0400 |
9 | -+++ b/configure.in 2010-07-07 03:33:05.788972002 +0400 |
10 | +--- a/configure.in |
11 | ++++ b/configure.in |
12 | @@ -815,7 +815,7 @@ |
13 | AC_HEADER_STDC |
14 | AC_HEADER_SYS_WAIT |
15 | @@ -18,8 +18,8 @@ |
16 | strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \ |
17 | sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \ |
18 | diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc |
19 | ---- a/sql/mysqld.cc 2010-07-07 03:33:05.278972002 +0400 |
20 | -+++ b/sql/mysqld.cc 2010-07-07 03:33:05.788972002 +0400 |
21 | +--- a/sql/mysqld.cc |
22 | ++++ b/sql/mysqld.cc |
23 | @@ -55,6 +55,10 @@ |
24 | #include "sp_rcontext.h" |
25 | #include "sp_cache.h" |
26 | @@ -31,7 +31,7 @@ |
27 | #define mysqld_charset &my_charset_latin1 |
28 | |
29 | #ifdef HAVE_purify |
30 | -@@ -5124,28 +5128,49 @@ |
31 | +@@ -5125,28 +5129,49 @@ |
32 | { |
33 | my_socket sock,new_sock; |
34 | uint error_count=0; |
35 | @@ -84,7 +84,7 @@ |
36 | #ifdef HAVE_FCNTL |
37 | socket_flags=fcntl(unix_sock, F_GETFL, 0); |
38 | #endif |
39 | -@@ -5155,12 +5180,15 @@ |
40 | +@@ -5156,12 +5181,15 @@ |
41 | MAYBE_BROKEN_SYSCALL; |
42 | while (!abort_loop) |
43 | { |
44 | @@ -105,7 +105,7 @@ |
45 | { |
46 | if (socket_errno != SOCKET_EINTR) |
47 | { |
48 | -@@ -5170,7 +5198,7 @@ |
49 | +@@ -5171,7 +5199,7 @@ |
50 | MAYBE_BROKEN_SYSCALL |
51 | continue; |
52 | } |
53 | @@ -114,7 +114,7 @@ |
54 | if (abort_loop) |
55 | { |
56 | MAYBE_BROKEN_SYSCALL; |
57 | -@@ -5178,6 +5206,21 @@ |
58 | +@@ -5179,6 +5207,21 @@ |
59 | } |
60 | |
61 | /* Is this a new connection request ? */ |
62 | @@ -136,7 +136,7 @@ |
63 | #ifdef HAVE_SYS_UN_H |
64 | if (FD_ISSET(unix_sock,&readFDs)) |
65 | { |
66 | -@@ -5185,11 +5228,12 @@ |
67 | +@@ -5186,11 +5229,12 @@ |
68 | flags= socket_flags; |
69 | } |
70 | else |
71 | |
72 | === modified file 'control_online_alter_index.patch' |
73 | --- control_online_alter_index.patch 2011-05-10 07:31:20 +0000 |
74 | +++ control_online_alter_index.patch 2011-07-27 08:44:25 +0000 |
75 | @@ -6,8 +6,8 @@ |
76 | # Any small change to this file in the main branch |
77 | # should be done or reviewed by the maintainer! |
78 | diff -ruN a/sql/handler.h b/sql/handler.h |
79 | ---- a/sql/handler.h 2010-07-21 22:49:53.660561079 +0900 |
80 | -+++ b/sql/handler.h 2010-07-21 22:50:24.106530090 +0900 |
81 | +--- a/sql/handler.h |
82 | ++++ b/sql/handler.h |
83 | @@ -169,6 +169,19 @@ |
84 | #define HA_ONLINE_DROP_UNIQUE_INDEX (1L << 9) /*drop uniq. online*/ |
85 | #define HA_ONLINE_ADD_PK_INDEX (1L << 10)/*add prim. online*/ |
86 | @@ -29,9 +29,9 @@ |
87 | HA_PARTITION_FUNCTION_SUPPORTED indicates that the function is |
88 | supported at all. |
89 | diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc |
90 | ---- a/sql/mysqld.cc 2010-07-21 22:49:54.011529414 +0900 |
91 | -+++ b/sql/mysqld.cc 2010-07-21 22:50:24.112527179 +0900 |
92 | -@@ -5898,6 +5898,7 @@ |
93 | +--- a/sql/mysqld.cc |
94 | ++++ b/sql/mysqld.cc |
95 | +@@ -5900,6 +5900,7 @@ |
96 | OPT_USERSTAT_RUNNING, |
97 | OPT_THREAD_STATISTICS, |
98 | OPT_OPTIMIZER_FIX, |
99 | @@ -39,7 +39,7 @@ |
100 | OPT_SUPPRESS_LOG_WARNING_1592, |
101 | OPT_QUERY_CACHE_STRIP_COMMENTS, |
102 | OPT_USE_GLOBAL_LONG_QUERY_TIME, |
103 | -@@ -5930,6 +5931,13 @@ |
104 | +@@ -5932,6 +5933,13 @@ |
105 | "from libc.so", |
106 | &opt_allow_suspicious_udfs, &opt_allow_suspicious_udfs, |
107 | 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, |
108 | @@ -54,8 +54,8 @@ |
109 | "will also set transaction isolation level 'serializable'.", 0, 0, 0, |
110 | GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, |
111 | diff -ruN a/sql/set_var.cc b/sql/set_var.cc |
112 | ---- a/sql/set_var.cc 2010-07-21 22:49:54.019529438 +0900 |
113 | -+++ b/sql/set_var.cc 2010-07-21 22:50:24.122532110 +0900 |
114 | +--- a/sql/set_var.cc |
115 | ++++ b/sql/set_var.cc |
116 | @@ -758,6 +758,11 @@ |
117 | sys_engine_condition_pushdown(&vars, "engine_condition_pushdown", |
118 | &SV::engine_condition_pushdown); |
119 | @@ -69,8 +69,8 @@ |
120 | /* ndb thread specific variable settings */ |
121 | static sys_var_thd_ulong |
122 | diff -ruN a/sql/sql_class.h b/sql/sql_class.h |
123 | ---- a/sql/sql_class.h 2010-07-21 22:49:53.742561560 +0900 |
124 | -+++ b/sql/sql_class.h 2010-07-21 22:50:24.130529404 +0900 |
125 | +--- a/sql/sql_class.h |
126 | ++++ b/sql/sql_class.h |
127 | @@ -381,6 +381,8 @@ |
128 | my_bool ndb_use_transactions; |
129 | my_bool ndb_index_stat_enable; |
130 | @@ -81,8 +81,8 @@ |
131 | my_bool old_passwords; |
132 | |
133 | diff -ruN a/sql/sql_partition.cc b/sql/sql_partition.cc |
134 | ---- a/sql/sql_partition.cc 2010-06-04 00:50:11.000000000 +0900 |
135 | -+++ b/sql/sql_partition.cc 2010-07-21 22:50:24.140530183 +0900 |
136 | +--- a/sql/sql_partition.cc |
137 | ++++ b/sql/sql_partition.cc |
138 | @@ -4381,7 +4381,12 @@ |
139 | alter_info->no_parts= curr_part_no - new_part_no; |
140 | } |
141 | @@ -98,8 +98,8 @@ |
142 | my_error(ER_PARTITION_FUNCTION_FAILURE, MYF(0)); |
143 | DBUG_RETURN(1); |
144 | diff -ruN a/sql/sql_table.cc b/sql/sql_table.cc |
145 | ---- a/sql/sql_table.cc 2010-06-04 00:50:11.000000000 +0900 |
146 | -+++ b/sql/sql_table.cc 2010-07-21 22:50:24.146531063 +0900 |
147 | +--- a/sql/sql_table.cc |
148 | ++++ b/sql/sql_table.cc |
149 | @@ -7003,6 +7003,10 @@ |
150 | uint *idx_end_p; |
151 | |
152 | |
153 | === modified file 'fix-bug671764.patch' |
154 | --- fix-bug671764.patch 2011-03-13 21:40:40 +0000 |
155 | +++ fix-bug671764.patch 2011-07-27 08:44:25 +0000 |
156 | @@ -6,9 +6,9 @@ |
157 | # Any small change to this file in the main branch |
158 | # should be done or reviewed by the maintainer! |
159 | diff -ruN a/configure.in b/configure.in |
160 | ---- a/configure.in 2010-11-29 18:45:47.000000000 +0000 |
161 | -+++ b/configure.in 2010-11-29 18:45:51.000000000 +0000 |
162 | -@@ -2727,7 +2727,7 @@ |
163 | +--- a/configure.in |
164 | ++++ b/configure.in |
165 | +@@ -2776,7 +2776,7 @@ |
166 | MAN_DROP="$MAN_DROP embedded" |
167 | grep -v 'embedded' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL |
168 | fi |
169 | @@ -17,7 +17,7 @@ |
170 | then |
171 | MAN_DROP="$MAN_DROP innodb" |
172 | grep -v 'inno' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL |
173 | -@@ -2806,7 +2806,7 @@ |
174 | +@@ -2855,7 +2855,7 @@ |
175 | fi |
176 | |
177 | # "innochecksum" is not in the "innobase/" subdirectory, but should be switched |
178 | |
179 | === modified file 'microsec_process.patch' |
180 | --- microsec_process.patch 2011-05-10 07:31:20 +0000 |
181 | +++ microsec_process.patch 2011-07-27 08:44:25 +0000 |
182 | @@ -5,9 +5,9 @@ |
183 | #!!! notice !!! |
184 | # Any small change to this file in the main branch |
185 | # should be done or reviewed by the maintainer! |
186 | -diff -ruN a/patch_info/microsec_process.info b/patch_info/microsec_process.info |
187 | ---- /dev/null 1970-01-01 09:00:00.000000000 +0900 |
188 | -+++ b/patch_info/microsec_process.info 2010-08-27 14:45:52.941058849 +0900 |
189 | +diff -ruN /dev/null Percona-Server/patch_info/microsec_process.info |
190 | +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 |
191 | ++++ Percona-Server/patch_info/microsec_process.info 2011-07-26 10:21:40.000000000 +0400 |
192 | @@ -0,0 +1,8 @@ |
193 | +File=microsec_process.patch |
194 | +Name=Adds INFOMATION_SCHEMA.PROCESSLIST with TIME_MS column |
195 | @@ -17,10 +17,10 @@ |
196 | +Comment= |
197 | +2010-01 |
198 | +Ported to 5.1.42 |
199 | -diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc |
200 | ---- a/sql/sql_show.cc 2010-08-27 14:38:08.781057666 +0900 |
201 | -+++ b/sql/sql_show.cc 2010-08-27 14:45:52.946058726 +0900 |
202 | -@@ -1913,7 +1913,8 @@ |
203 | +diff -ruN Percona-Server.orig/sql/sql_show.cc Percona-Server/sql/sql_show.cc |
204 | +--- Percona-Server.orig/sql/sql_show.cc 2011-07-26 10:21:36.000000000 +0400 |
205 | ++++ Percona-Server/sql/sql_show.cc 2011-07-26 10:24:56.000000000 +0400 |
206 | +@@ -1913,7 +1913,8 @@ int fill_schema_processlist(THD* thd, TA |
207 | TABLE *table= tables->table; |
208 | CHARSET_INFO *cs= system_charset_info; |
209 | char *user; |
210 | @@ -30,7 +30,7 @@ |
211 | DBUG_ENTER("fill_process_list"); |
212 | |
213 | user= thd->security_ctx->master_access & PROCESS_ACL ? |
214 | -@@ -2018,6 +2019,10 @@ |
215 | +@@ -2018,6 +2019,10 @@ int fill_schema_processlist(THD* thd, TA |
216 | } |
217 | pthread_mutex_unlock(&tmp->LOCK_thd_data); |
218 | |
219 | @@ -41,7 +41,7 @@ |
220 | if (schema_table_store_record(thd, table)) |
221 | { |
222 | VOID(pthread_mutex_unlock(&LOCK_thread_count)); |
223 | -@@ -6718,6 +6723,8 @@ |
224 | +@@ -6718,6 +6723,8 @@ ST_FIELD_INFO processlist_fields_info[]= |
225 | {"STATE", 64, MYSQL_TYPE_STRING, 0, 1, "State", SKIP_OPEN_TABLE}, |
226 | {"INFO", PROCESS_LIST_INFO_WIDTH, MYSQL_TYPE_STRING, 0, 1, "Info", |
227 | SKIP_OPEN_TABLE}, |
228 | |
229 | === removed file 'mysql-test/have_response_time_distribution.inc' |
230 | --- mysql-test/have_response_time_distribution.inc 2010-12-14 20:03:02 +0000 |
231 | +++ mysql-test/have_response_time_distribution.inc 1970-01-01 00:00:00 +0000 |
232 | @@ -1,4 +0,0 @@ |
233 | --- require r/have_response_time_distribution.require |
234 | -disable_query_log; |
235 | -show variables like 'have_response_time_distribution'; |
236 | -enable_query_log; |
237 | |
238 | === removed file 'mysql-test/have_response_time_distribution.require' |
239 | --- mysql-test/have_response_time_distribution.require 2010-12-14 20:03:02 +0000 |
240 | +++ mysql-test/have_response_time_distribution.require 1970-01-01 00:00:00 +0000 |
241 | @@ -1,2 +0,0 @@ |
242 | -Variable_name Value |
243 | -have_response_time_distribution YES |
244 | |
245 | === modified file 'mysql-test/percona_server_variables_debug.result' |
246 | --- mysql-test/percona_server_variables_debug.result 2011-06-23 02:21:00 +0000 |
247 | +++ mysql-test/percona_server_variables_debug.result 2011-07-27 08:44:25 +0000 |
248 | @@ -253,6 +253,7 @@ |
249 | QUERY_CACHE_STRIP_COMMENTS |
250 | QUERY_CACHE_TYPE |
251 | QUERY_CACHE_WLOCK_INVALIDATE |
252 | +QUERY_EXEC_TIME |
253 | QUERY_PREALLOC_SIZE |
254 | QUERY_RESPONSE_TIME_RANGE_BASE |
255 | RAND_SEED1 |
256 | |
257 | === removed directory 'mysql-test/response-time-distribution.patch' |
258 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time-replication.result' |
259 | --- mysql-test/response-time-distribution.patch/percona_query_response_time-replication.result 2011-05-26 11:10:25 +0000 |
260 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time-replication.result 1970-01-01 00:00:00 +0000 |
261 | @@ -1,67 +0,0 @@ |
262 | -include/master-slave.inc |
263 | -[connection master] |
264 | -SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; |
265 | -DROP TABLE IF EXISTS t; |
266 | -CREATE TABLE t(id INT); |
267 | -SELECT * from t; |
268 | -id |
269 | -SELECT * from t; |
270 | -id |
271 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; |
272 | -Warnings: |
273 | -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' |
274 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
275 | -Variable_name Value |
276 | -query_response_time_range_base 2 |
277 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; |
278 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
279 | -Variable_name Value |
280 | -query_response_time_range_base 10 |
281 | -FLUSH QUERY_RESPONSE_TIME; |
282 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON; |
283 | -INSERT INTO t SELECT SLEEP(0.4); |
284 | -Warnings: |
285 | -Note 1592 Statement may not be safe to log in statement format. |
286 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
287 | -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) |
288 | -0 |
289 | -INSERT INTO t SELECT SLEEP(0.4); |
290 | -Warnings: |
291 | -Note 1592 Statement may not be safe to log in statement format. |
292 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
293 | -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) |
294 | -0 |
295 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
296 | -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) |
297 | -2 |
298 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
299 | -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) |
300 | -3 |
301 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; |
302 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
303 | -Variable_name Value |
304 | -query_response_time_range_base 2 |
305 | -FLUSH QUERY_RESPONSE_TIME; |
306 | -INSERT INTO t SELECT SLEEP(0.4); |
307 | -Warnings: |
308 | -Note 1592 Statement may not be safe to log in statement format. |
309 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
310 | -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) |
311 | -0 |
312 | -INSERT INTO t SELECT SLEEP(0.4); |
313 | -Warnings: |
314 | -Note 1592 Statement may not be safe to log in statement format. |
315 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
316 | -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) |
317 | -0 |
318 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
319 | -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) |
320 | -2 |
321 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
322 | -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) |
323 | -3 |
324 | -DROP TABLE IF EXISTS t; |
325 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; |
326 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF; |
327 | -SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; |
328 | -include/rpl_end.inc |
329 | |
330 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test' |
331 | --- mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test 2011-05-26 11:10:25 +0000 |
332 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test 1970-01-01 00:00:00 +0000 |
333 | @@ -1,59 +0,0 @@ |
334 | ---source include/have_response_time_distribution.inc |
335 | ---source include/master-slave.inc |
336 | ---source include/have_binlog_format_statement.inc |
337 | ---source include/have_debug.inc |
338 | -SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; |
339 | - |
340 | -connection master; |
341 | --- disable_warnings |
342 | -DROP TABLE IF EXISTS t; |
343 | --- enable_warnings |
344 | -CREATE TABLE t(id INT); |
345 | -SELECT * from t; |
346 | - |
347 | -sync_slave_with_master; |
348 | - |
349 | -connection slave; |
350 | -SELECT * from t; |
351 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; |
352 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
353 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; |
354 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
355 | -source include/percona_query_response_time_flush.inc; |
356 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON; |
357 | - |
358 | -connection master; |
359 | -INSERT INTO t SELECT SLEEP(0.4); |
360 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
361 | -INSERT INTO t SELECT SLEEP(0.4); |
362 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
363 | -sync_slave_with_master; |
364 | - |
365 | -connection slave; |
366 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
367 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
368 | - |
369 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; |
370 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
371 | -source include/percona_query_response_time_flush.inc; |
372 | - |
373 | -connection master; |
374 | -INSERT INTO t SELECT SLEEP(0.4); |
375 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
376 | -INSERT INTO t SELECT SLEEP(0.4); |
377 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
378 | -sync_slave_with_master; |
379 | - |
380 | -connection slave; |
381 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
382 | -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
383 | - |
384 | -connection master; |
385 | -DROP TABLE IF EXISTS t; |
386 | -sync_slave_with_master; |
387 | -connection slave; |
388 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; |
389 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF; |
390 | -SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; |
391 | - |
392 | ---source include/rpl_end.inc |
393 | |
394 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time-stored.result' |
395 | --- mysql-test/response-time-distribution.patch/percona_query_response_time-stored.result 2010-12-06 03:08:42 +0000 |
396 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time-stored.result 1970-01-01 00:00:00 +0000 |
397 | @@ -1,313 +0,0 @@ |
398 | -SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; |
399 | -CREATE FUNCTION test_f() |
400 | -RETURNS CHAR(30) DETERMINISTIC |
401 | -BEGIN |
402 | -DECLARE first VARCHAR(5); |
403 | -DECLARE second VARCHAR(5); |
404 | -DECLARE result VARCHAR(20); |
405 | -SELECT SLEEP(1.11) INTO first; |
406 | -SET first= 'Hello'; |
407 | -SET second=', '; |
408 | -SET result= CONCAT(first,second); |
409 | -SET result= CONCAT(result,'world!'); |
410 | -RETURN result; |
411 | -END/ |
412 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; |
413 | -Warnings: |
414 | -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' |
415 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
416 | -Variable_name Value |
417 | -query_response_time_range_base 2 |
418 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; |
419 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
420 | -Variable_name Value |
421 | -query_response_time_range_base 2 |
422 | -FLUSH QUERY_RESPONSE_TIME; |
423 | -SELECT d.count, |
424 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
425 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
426 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
427 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
428 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
429 | -count query_count query_total not_zero_region_count region_count |
430 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
431 | -region_count |
432 | -44 |
433 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
434 | -time |
435 | - 0.000001 |
436 | - 0.000003 |
437 | - 0.000007 |
438 | - 0.000015 |
439 | - 0.000030 |
440 | - 0.000061 |
441 | - 0.000122 |
442 | - 0.000244 |
443 | - 0.000488 |
444 | - 0.000976 |
445 | - 0.001953 |
446 | - 0.003906 |
447 | - 0.007812 |
448 | - 0.015625 |
449 | - 0.031250 |
450 | - 0.062500 |
451 | - 0.125000 |
452 | - 0.250000 |
453 | - 0.500000 |
454 | - 1.000000 |
455 | - 2.000000 |
456 | - 4.000000 |
457 | - 8.000000 |
458 | - 16.000000 |
459 | - 32.000000 |
460 | - 64.000000 |
461 | - 128.000000 |
462 | - 256.000000 |
463 | - 512.000000 |
464 | - 1024.000000 |
465 | - 2048.000000 |
466 | - 4096.000000 |
467 | - 8192.000000 |
468 | - 16384.000000 |
469 | - 32768.000000 |
470 | - 65536.000000 |
471 | - 131072.000000 |
472 | - 262144.000000 |
473 | - 524288.000000 |
474 | - 1048576.00000 |
475 | - 2097152.00000 |
476 | - 4194304.00000 |
477 | - 8388608.00000 |
478 | -TOO LONG |
479 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
480 | -SELECT test_f(); |
481 | -test_f() |
482 | -Hello, world! |
483 | -SELECT test_f(); |
484 | -test_f() |
485 | -Hello, world! |
486 | -SELECT test_f(); |
487 | -test_f() |
488 | -Hello, world! |
489 | -SELECT test_f(); |
490 | -test_f() |
491 | -Hello, world! |
492 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
493 | -SELECT d.count, |
494 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
495 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
496 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
497 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
498 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
499 | -count query_count query_total not_zero_region_count region_count |
500 | -4 4 4 1 44 |
501 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
502 | -region_count |
503 | -44 |
504 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
505 | -time |
506 | - 0.000001 |
507 | - 0.000003 |
508 | - 0.000007 |
509 | - 0.000015 |
510 | - 0.000030 |
511 | - 0.000061 |
512 | - 0.000122 |
513 | - 0.000244 |
514 | - 0.000488 |
515 | - 0.000976 |
516 | - 0.001953 |
517 | - 0.003906 |
518 | - 0.007812 |
519 | - 0.015625 |
520 | - 0.031250 |
521 | - 0.062500 |
522 | - 0.125000 |
523 | - 0.250000 |
524 | - 0.500000 |
525 | - 1.000000 |
526 | - 2.000000 |
527 | - 4.000000 |
528 | - 8.000000 |
529 | - 16.000000 |
530 | - 32.000000 |
531 | - 64.000000 |
532 | - 128.000000 |
533 | - 256.000000 |
534 | - 512.000000 |
535 | - 1024.000000 |
536 | - 2048.000000 |
537 | - 4096.000000 |
538 | - 8192.000000 |
539 | - 16384.000000 |
540 | - 32768.000000 |
541 | - 65536.000000 |
542 | - 131072.000000 |
543 | - 262144.000000 |
544 | - 524288.000000 |
545 | - 1048576.00000 |
546 | - 2097152.00000 |
547 | - 4194304.00000 |
548 | - 8388608.00000 |
549 | -TOO LONG |
550 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
551 | -Variable_name Value |
552 | -query_response_time_range_base 2 |
553 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; |
554 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
555 | -Variable_name Value |
556 | -query_response_time_range_base 10 |
557 | -FLUSH QUERY_RESPONSE_TIME; |
558 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
559 | -SELECT test_f(); |
560 | -test_f() |
561 | -Hello, world! |
562 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
563 | -SELECT d.count, |
564 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
565 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
566 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
567 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
568 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
569 | -count query_count query_total not_zero_region_count region_count |
570 | -1 1 1 1 14 |
571 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
572 | -region_count |
573 | -14 |
574 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
575 | -time |
576 | - 0.000001 |
577 | - 0.000010 |
578 | - 0.000100 |
579 | - 0.001000 |
580 | - 0.010000 |
581 | - 0.100000 |
582 | - 1.000000 |
583 | - 10.000000 |
584 | - 100.000000 |
585 | - 1000.000000 |
586 | - 10000.000000 |
587 | - 100000.000000 |
588 | - 1000000.00000 |
589 | -TOO LONG |
590 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
591 | -Variable_name Value |
592 | -query_response_time_range_base 10 |
593 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; |
594 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
595 | -Variable_name Value |
596 | -query_response_time_range_base 7 |
597 | -FLUSH QUERY_RESPONSE_TIME; |
598 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
599 | -SELECT test_f(); |
600 | -test_f() |
601 | -Hello, world! |
602 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
603 | -SELECT d.count, |
604 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
605 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
606 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
607 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
608 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
609 | -count query_count query_total not_zero_region_count region_count |
610 | -1 1 1 1 17 |
611 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
612 | -region_count |
613 | -17 |
614 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
615 | -time |
616 | - 0.000001 |
617 | - 0.000008 |
618 | - 0.000059 |
619 | - 0.000416 |
620 | - 0.002915 |
621 | - 0.020408 |
622 | - 0.142857 |
623 | - 1.000000 |
624 | - 7.000000 |
625 | - 49.000000 |
626 | - 343.000000 |
627 | - 2401.000000 |
628 | - 16807.000000 |
629 | - 117649.000000 |
630 | - 823543.000000 |
631 | - 5764801.00000 |
632 | -TOO LONG |
633 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
634 | -Variable_name Value |
635 | -query_response_time_range_base 7 |
636 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; |
637 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
638 | -Variable_name Value |
639 | -query_response_time_range_base 156 |
640 | -FLUSH QUERY_RESPONSE_TIME; |
641 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
642 | -SELECT test_f(); |
643 | -test_f() |
644 | -Hello, world! |
645 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
646 | -SELECT d.count, |
647 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
648 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
649 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
650 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
651 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
652 | -count query_count query_total not_zero_region_count region_count |
653 | -1 1 1 1 7 |
654 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
655 | -region_count |
656 | -7 |
657 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
658 | -time |
659 | - 0.000041 |
660 | - 0.006410 |
661 | - 1.000000 |
662 | - 156.000000 |
663 | - 24336.000000 |
664 | - 3796416.00000 |
665 | -TOO LONG |
666 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
667 | -Variable_name Value |
668 | -query_response_time_range_base 156 |
669 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; |
670 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
671 | -Variable_name Value |
672 | -query_response_time_range_base 1000 |
673 | -FLUSH QUERY_RESPONSE_TIME; |
674 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
675 | -SELECT test_f(); |
676 | -test_f() |
677 | -Hello, world! |
678 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
679 | -SELECT d.count, |
680 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
681 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
682 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
683 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
684 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
685 | -count query_count query_total not_zero_region_count region_count |
686 | -1 1 1 1 6 |
687 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
688 | -region_count |
689 | -6 |
690 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
691 | -time |
692 | - 0.000001 |
693 | - 0.001000 |
694 | - 1.000000 |
695 | - 1000.000000 |
696 | - 1000000.00000 |
697 | -TOO LONG |
698 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
699 | -Variable_name Value |
700 | -query_response_time_range_base 1000 |
701 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; |
702 | -Warnings: |
703 | -Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' |
704 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
705 | -Variable_name Value |
706 | -query_response_time_range_base 1000 |
707 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
708 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; |
709 | -DROP FUNCTION test_f; |
710 | -SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; |
711 | |
712 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test' |
713 | --- mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test 2010-12-14 20:03:02 +0000 |
714 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test 1970-01-01 00:00:00 +0000 |
715 | @@ -1,90 +0,0 @@ |
716 | ---source include/have_response_time_distribution.inc |
717 | ---source include/have_debug.inc |
718 | -SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; |
719 | - |
720 | -delimiter /; |
721 | -CREATE FUNCTION test_f() |
722 | -RETURNS CHAR(30) DETERMINISTIC |
723 | -BEGIN |
724 | - DECLARE first VARCHAR(5); |
725 | - DECLARE second VARCHAR(5); |
726 | - DECLARE result VARCHAR(20); |
727 | - SELECT SLEEP(1.11) INTO first; |
728 | - SET first= 'Hello'; |
729 | - SET second=', '; |
730 | - SET result= CONCAT(first,second); |
731 | - SET result= CONCAT(result,'world!'); |
732 | - RETURN result; |
733 | -END/ |
734 | -delimiter ;/ |
735 | - |
736 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; |
737 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
738 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; |
739 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
740 | - |
741 | -source include/percona_query_response_time_flush.inc; |
742 | -source include/percona_query_response_time_show.inc; |
743 | - |
744 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
745 | -SELECT test_f(); |
746 | -SELECT test_f(); |
747 | -SELECT test_f(); |
748 | -SELECT test_f(); |
749 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
750 | - |
751 | -source include/percona_query_response_time_show.inc; |
752 | - |
753 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
754 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; |
755 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
756 | - |
757 | -source include/percona_query_response_time_flush.inc; |
758 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
759 | -SELECT test_f(); |
760 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
761 | - |
762 | -source include/percona_query_response_time_show.inc; |
763 | - |
764 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
765 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; |
766 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
767 | - |
768 | -source include/percona_query_response_time_flush.inc; |
769 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
770 | -SELECT test_f(); |
771 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
772 | - |
773 | -source include/percona_query_response_time_show.inc; |
774 | - |
775 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
776 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; |
777 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
778 | - |
779 | -source include/percona_query_response_time_flush.inc; |
780 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
781 | -SELECT test_f(); |
782 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
783 | - |
784 | -source include/percona_query_response_time_show.inc; |
785 | - |
786 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
787 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; |
788 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
789 | - |
790 | -source include/percona_query_response_time_flush.inc; |
791 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
792 | -SELECT test_f(); |
793 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
794 | - |
795 | -source include/percona_query_response_time_show.inc; |
796 | - |
797 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
798 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; |
799 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
800 | - |
801 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
802 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; |
803 | - |
804 | -DROP FUNCTION test_f; |
805 | -SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; |
806 | |
807 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time.result' |
808 | --- mysql-test/response-time-distribution.patch/percona_query_response_time.result 2010-12-06 03:08:42 +0000 |
809 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time.result 1970-01-01 00:00:00 +0000 |
810 | @@ -1,567 +0,0 @@ |
811 | -SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; |
812 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; |
813 | -Warnings: |
814 | -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' |
815 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
816 | -Variable_name Value |
817 | -query_response_time_range_base 2 |
818 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; |
819 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
820 | -Variable_name Value |
821 | -query_response_time_range_base 2 |
822 | -FLUSH QUERY_RESPONSE_TIME; |
823 | -SELECT d.count, |
824 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
825 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
826 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
827 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
828 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
829 | -count query_count query_total not_zero_region_count region_count |
830 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
831 | -region_count |
832 | -44 |
833 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
834 | -time |
835 | - 0.000001 |
836 | - 0.000003 |
837 | - 0.000007 |
838 | - 0.000015 |
839 | - 0.000030 |
840 | - 0.000061 |
841 | - 0.000122 |
842 | - 0.000244 |
843 | - 0.000488 |
844 | - 0.000976 |
845 | - 0.001953 |
846 | - 0.003906 |
847 | - 0.007812 |
848 | - 0.015625 |
849 | - 0.031250 |
850 | - 0.062500 |
851 | - 0.125000 |
852 | - 0.250000 |
853 | - 0.500000 |
854 | - 1.000000 |
855 | - 2.000000 |
856 | - 4.000000 |
857 | - 8.000000 |
858 | - 16.000000 |
859 | - 32.000000 |
860 | - 64.000000 |
861 | - 128.000000 |
862 | - 256.000000 |
863 | - 512.000000 |
864 | - 1024.000000 |
865 | - 2048.000000 |
866 | - 4096.000000 |
867 | - 8192.000000 |
868 | - 16384.000000 |
869 | - 32768.000000 |
870 | - 65536.000000 |
871 | - 131072.000000 |
872 | - 262144.000000 |
873 | - 524288.000000 |
874 | - 1048576.00000 |
875 | - 2097152.00000 |
876 | - 4194304.00000 |
877 | - 8388608.00000 |
878 | -TOO LONG |
879 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
880 | -SELECT SLEEP(0.31); |
881 | -SLEEP(0.31) |
882 | -0 |
883 | -SELECT SLEEP(0.32); |
884 | -SLEEP(0.32) |
885 | -0 |
886 | -SELECT SLEEP(0.33); |
887 | -SLEEP(0.33) |
888 | -0 |
889 | -SELECT SLEEP(0.34); |
890 | -SLEEP(0.34) |
891 | -0 |
892 | -SELECT SLEEP(0.35); |
893 | -SLEEP(0.35) |
894 | -0 |
895 | -SELECT SLEEP(0.36); |
896 | -SLEEP(0.36) |
897 | -0 |
898 | -SELECT SLEEP(0.37); |
899 | -SLEEP(0.37) |
900 | -0 |
901 | -SELECT SLEEP(0.38); |
902 | -SLEEP(0.38) |
903 | -0 |
904 | -SELECT SLEEP(0.39); |
905 | -SLEEP(0.39) |
906 | -0 |
907 | -SELECT SLEEP(0.40); |
908 | -SLEEP(0.40) |
909 | -0 |
910 | -SELECT SLEEP(1.1); |
911 | -SLEEP(1.1) |
912 | -0 |
913 | -SELECT SLEEP(1.2); |
914 | -SLEEP(1.2) |
915 | -0 |
916 | -SELECT SLEEP(1.3); |
917 | -SLEEP(1.3) |
918 | -0 |
919 | -SELECT SLEEP(1.5); |
920 | -SLEEP(1.5) |
921 | -0 |
922 | -SELECT SLEEP(1.4); |
923 | -SLEEP(1.4) |
924 | -0 |
925 | -SELECT SLEEP(0.5); |
926 | -SLEEP(0.5) |
927 | -0 |
928 | -SELECT SLEEP(2.1); |
929 | -SLEEP(2.1) |
930 | -0 |
931 | -SELECT SLEEP(2.3); |
932 | -SLEEP(2.3) |
933 | -0 |
934 | -SELECT SLEEP(2.5); |
935 | -SLEEP(2.5) |
936 | -0 |
937 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
938 | -SELECT d.count, |
939 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
940 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
941 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
942 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
943 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
944 | -count query_count query_total not_zero_region_count region_count |
945 | -10 19 15 4 44 |
946 | -1 19 15 4 44 |
947 | -5 19 15 4 44 |
948 | -3 19 15 4 44 |
949 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
950 | -region_count |
951 | -44 |
952 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
953 | -time |
954 | - 0.000001 |
955 | - 0.000003 |
956 | - 0.000007 |
957 | - 0.000015 |
958 | - 0.000030 |
959 | - 0.000061 |
960 | - 0.000122 |
961 | - 0.000244 |
962 | - 0.000488 |
963 | - 0.000976 |
964 | - 0.001953 |
965 | - 0.003906 |
966 | - 0.007812 |
967 | - 0.015625 |
968 | - 0.031250 |
969 | - 0.062500 |
970 | - 0.125000 |
971 | - 0.250000 |
972 | - 0.500000 |
973 | - 1.000000 |
974 | - 2.000000 |
975 | - 4.000000 |
976 | - 8.000000 |
977 | - 16.000000 |
978 | - 32.000000 |
979 | - 64.000000 |
980 | - 128.000000 |
981 | - 256.000000 |
982 | - 512.000000 |
983 | - 1024.000000 |
984 | - 2048.000000 |
985 | - 4096.000000 |
986 | - 8192.000000 |
987 | - 16384.000000 |
988 | - 32768.000000 |
989 | - 65536.000000 |
990 | - 131072.000000 |
991 | - 262144.000000 |
992 | - 524288.000000 |
993 | - 1048576.00000 |
994 | - 2097152.00000 |
995 | - 4194304.00000 |
996 | - 8388608.00000 |
997 | -TOO LONG |
998 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
999 | -Variable_name Value |
1000 | -query_response_time_range_base 2 |
1001 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; |
1002 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1003 | -Variable_name Value |
1004 | -query_response_time_range_base 10 |
1005 | -FLUSH QUERY_RESPONSE_TIME; |
1006 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1007 | -SELECT SLEEP(0.31); |
1008 | -SLEEP(0.31) |
1009 | -0 |
1010 | -SELECT SLEEP(0.32); |
1011 | -SLEEP(0.32) |
1012 | -0 |
1013 | -SELECT SLEEP(0.33); |
1014 | -SLEEP(0.33) |
1015 | -0 |
1016 | -SELECT SLEEP(0.34); |
1017 | -SLEEP(0.34) |
1018 | -0 |
1019 | -SELECT SLEEP(0.35); |
1020 | -SLEEP(0.35) |
1021 | -0 |
1022 | -SELECT SLEEP(0.36); |
1023 | -SLEEP(0.36) |
1024 | -0 |
1025 | -SELECT SLEEP(0.37); |
1026 | -SLEEP(0.37) |
1027 | -0 |
1028 | -SELECT SLEEP(0.38); |
1029 | -SLEEP(0.38) |
1030 | -0 |
1031 | -SELECT SLEEP(0.39); |
1032 | -SLEEP(0.39) |
1033 | -0 |
1034 | -SELECT SLEEP(0.40); |
1035 | -SLEEP(0.40) |
1036 | -0 |
1037 | -SELECT SLEEP(1.1); |
1038 | -SLEEP(1.1) |
1039 | -0 |
1040 | -SELECT SLEEP(1.2); |
1041 | -SLEEP(1.2) |
1042 | -0 |
1043 | -SELECT SLEEP(1.3); |
1044 | -SLEEP(1.3) |
1045 | -0 |
1046 | -SELECT SLEEP(1.5); |
1047 | -SLEEP(1.5) |
1048 | -0 |
1049 | -SELECT SLEEP(1.4); |
1050 | -SLEEP(1.4) |
1051 | -0 |
1052 | -SELECT SLEEP(0.5); |
1053 | -SLEEP(0.5) |
1054 | -0 |
1055 | -SELECT SLEEP(2.1); |
1056 | -SLEEP(2.1) |
1057 | -0 |
1058 | -SELECT SLEEP(2.3); |
1059 | -SLEEP(2.3) |
1060 | -0 |
1061 | -SELECT SLEEP(2.5); |
1062 | -SLEEP(2.5) |
1063 | -0 |
1064 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1065 | -SELECT d.count, |
1066 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
1067 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
1068 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
1069 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
1070 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
1071 | -count query_count query_total not_zero_region_count region_count |
1072 | -11 19 17 2 14 |
1073 | -8 19 17 2 14 |
1074 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1075 | -region_count |
1076 | -14 |
1077 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1078 | -time |
1079 | - 0.000001 |
1080 | - 0.000010 |
1081 | - 0.000100 |
1082 | - 0.001000 |
1083 | - 0.010000 |
1084 | - 0.100000 |
1085 | - 1.000000 |
1086 | - 10.000000 |
1087 | - 100.000000 |
1088 | - 1000.000000 |
1089 | - 10000.000000 |
1090 | - 100000.000000 |
1091 | - 1000000.00000 |
1092 | -TOO LONG |
1093 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1094 | -Variable_name Value |
1095 | -query_response_time_range_base 10 |
1096 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; |
1097 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1098 | -Variable_name Value |
1099 | -query_response_time_range_base 7 |
1100 | -FLUSH QUERY_RESPONSE_TIME; |
1101 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1102 | -SELECT SLEEP(0.31); |
1103 | -SLEEP(0.31) |
1104 | -0 |
1105 | -SELECT SLEEP(0.32); |
1106 | -SLEEP(0.32) |
1107 | -0 |
1108 | -SELECT SLEEP(0.33); |
1109 | -SLEEP(0.33) |
1110 | -0 |
1111 | -SELECT SLEEP(0.34); |
1112 | -SLEEP(0.34) |
1113 | -0 |
1114 | -SELECT SLEEP(0.35); |
1115 | -SLEEP(0.35) |
1116 | -0 |
1117 | -SELECT SLEEP(0.36); |
1118 | -SLEEP(0.36) |
1119 | -0 |
1120 | -SELECT SLEEP(0.37); |
1121 | -SLEEP(0.37) |
1122 | -0 |
1123 | -SELECT SLEEP(0.38); |
1124 | -SLEEP(0.38) |
1125 | -0 |
1126 | -SELECT SLEEP(0.39); |
1127 | -SLEEP(0.39) |
1128 | -0 |
1129 | -SELECT SLEEP(0.40); |
1130 | -SLEEP(0.40) |
1131 | -0 |
1132 | -SELECT SLEEP(1.1); |
1133 | -SLEEP(1.1) |
1134 | -0 |
1135 | -SELECT SLEEP(1.2); |
1136 | -SLEEP(1.2) |
1137 | -0 |
1138 | -SELECT SLEEP(1.3); |
1139 | -SLEEP(1.3) |
1140 | -0 |
1141 | -SELECT SLEEP(1.5); |
1142 | -SLEEP(1.5) |
1143 | -0 |
1144 | -SELECT SLEEP(1.4); |
1145 | -SLEEP(1.4) |
1146 | -0 |
1147 | -SELECT SLEEP(0.5); |
1148 | -SLEEP(0.5) |
1149 | -0 |
1150 | -SELECT SLEEP(2.1); |
1151 | -SLEEP(2.1) |
1152 | -0 |
1153 | -SELECT SLEEP(2.3); |
1154 | -SLEEP(2.3) |
1155 | -0 |
1156 | -SELECT SLEEP(2.5); |
1157 | -SLEEP(2.5) |
1158 | -0 |
1159 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1160 | -SELECT d.count, |
1161 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
1162 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
1163 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
1164 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
1165 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
1166 | -count query_count query_total not_zero_region_count region_count |
1167 | -11 19 17 2 17 |
1168 | -8 19 17 2 17 |
1169 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1170 | -region_count |
1171 | -17 |
1172 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1173 | -time |
1174 | - 0.000001 |
1175 | - 0.000008 |
1176 | - 0.000059 |
1177 | - 0.000416 |
1178 | - 0.002915 |
1179 | - 0.020408 |
1180 | - 0.142857 |
1181 | - 1.000000 |
1182 | - 7.000000 |
1183 | - 49.000000 |
1184 | - 343.000000 |
1185 | - 2401.000000 |
1186 | - 16807.000000 |
1187 | - 117649.000000 |
1188 | - 823543.000000 |
1189 | - 5764801.00000 |
1190 | -TOO LONG |
1191 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1192 | -Variable_name Value |
1193 | -query_response_time_range_base 7 |
1194 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; |
1195 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1196 | -Variable_name Value |
1197 | -query_response_time_range_base 156 |
1198 | -FLUSH QUERY_RESPONSE_TIME; |
1199 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1200 | -SELECT SLEEP(0.31); |
1201 | -SLEEP(0.31) |
1202 | -0 |
1203 | -SELECT SLEEP(0.32); |
1204 | -SLEEP(0.32) |
1205 | -0 |
1206 | -SELECT SLEEP(0.33); |
1207 | -SLEEP(0.33) |
1208 | -0 |
1209 | -SELECT SLEEP(0.34); |
1210 | -SLEEP(0.34) |
1211 | -0 |
1212 | -SELECT SLEEP(0.35); |
1213 | -SLEEP(0.35) |
1214 | -0 |
1215 | -SELECT SLEEP(0.36); |
1216 | -SLEEP(0.36) |
1217 | -0 |
1218 | -SELECT SLEEP(0.37); |
1219 | -SLEEP(0.37) |
1220 | -0 |
1221 | -SELECT SLEEP(0.38); |
1222 | -SLEEP(0.38) |
1223 | -0 |
1224 | -SELECT SLEEP(0.39); |
1225 | -SLEEP(0.39) |
1226 | -0 |
1227 | -SELECT SLEEP(0.40); |
1228 | -SLEEP(0.40) |
1229 | -0 |
1230 | -SELECT SLEEP(1.1); |
1231 | -SLEEP(1.1) |
1232 | -0 |
1233 | -SELECT SLEEP(1.2); |
1234 | -SLEEP(1.2) |
1235 | -0 |
1236 | -SELECT SLEEP(1.3); |
1237 | -SLEEP(1.3) |
1238 | -0 |
1239 | -SELECT SLEEP(1.5); |
1240 | -SLEEP(1.5) |
1241 | -0 |
1242 | -SELECT SLEEP(1.4); |
1243 | -SLEEP(1.4) |
1244 | -0 |
1245 | -SELECT SLEEP(0.5); |
1246 | -SLEEP(0.5) |
1247 | -0 |
1248 | -SELECT SLEEP(2.1); |
1249 | -SLEEP(2.1) |
1250 | -0 |
1251 | -SELECT SLEEP(2.3); |
1252 | -SLEEP(2.3) |
1253 | -0 |
1254 | -SELECT SLEEP(2.5); |
1255 | -SLEEP(2.5) |
1256 | -0 |
1257 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1258 | -SELECT d.count, |
1259 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
1260 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
1261 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
1262 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
1263 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
1264 | -count query_count query_total not_zero_region_count region_count |
1265 | -11 19 17 2 7 |
1266 | -8 19 17 2 7 |
1267 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1268 | -region_count |
1269 | -7 |
1270 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1271 | -time |
1272 | - 0.000041 |
1273 | - 0.006410 |
1274 | - 1.000000 |
1275 | - 156.000000 |
1276 | - 24336.000000 |
1277 | - 3796416.00000 |
1278 | -TOO LONG |
1279 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1280 | -Variable_name Value |
1281 | -query_response_time_range_base 156 |
1282 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; |
1283 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1284 | -Variable_name Value |
1285 | -query_response_time_range_base 1000 |
1286 | -FLUSH QUERY_RESPONSE_TIME; |
1287 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1288 | -SELECT SLEEP(0.31); |
1289 | -SLEEP(0.31) |
1290 | -0 |
1291 | -SELECT SLEEP(0.32); |
1292 | -SLEEP(0.32) |
1293 | -0 |
1294 | -SELECT SLEEP(0.33); |
1295 | -SLEEP(0.33) |
1296 | -0 |
1297 | -SELECT SLEEP(0.34); |
1298 | -SLEEP(0.34) |
1299 | -0 |
1300 | -SELECT SLEEP(0.35); |
1301 | -SLEEP(0.35) |
1302 | -0 |
1303 | -SELECT SLEEP(0.36); |
1304 | -SLEEP(0.36) |
1305 | -0 |
1306 | -SELECT SLEEP(0.37); |
1307 | -SLEEP(0.37) |
1308 | -0 |
1309 | -SELECT SLEEP(0.38); |
1310 | -SLEEP(0.38) |
1311 | -0 |
1312 | -SELECT SLEEP(0.39); |
1313 | -SLEEP(0.39) |
1314 | -0 |
1315 | -SELECT SLEEP(0.40); |
1316 | -SLEEP(0.40) |
1317 | -0 |
1318 | -SELECT SLEEP(1.1); |
1319 | -SLEEP(1.1) |
1320 | -0 |
1321 | -SELECT SLEEP(1.2); |
1322 | -SLEEP(1.2) |
1323 | -0 |
1324 | -SELECT SLEEP(1.3); |
1325 | -SLEEP(1.3) |
1326 | -0 |
1327 | -SELECT SLEEP(1.5); |
1328 | -SLEEP(1.5) |
1329 | -0 |
1330 | -SELECT SLEEP(1.4); |
1331 | -SLEEP(1.4) |
1332 | -0 |
1333 | -SELECT SLEEP(0.5); |
1334 | -SLEEP(0.5) |
1335 | -0 |
1336 | -SELECT SLEEP(2.1); |
1337 | -SLEEP(2.1) |
1338 | -0 |
1339 | -SELECT SLEEP(2.3); |
1340 | -SLEEP(2.3) |
1341 | -0 |
1342 | -SELECT SLEEP(2.5); |
1343 | -SLEEP(2.5) |
1344 | -0 |
1345 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1346 | -SELECT d.count, |
1347 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
1348 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
1349 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
1350 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
1351 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
1352 | -count query_count query_total not_zero_region_count region_count |
1353 | -11 19 17 2 6 |
1354 | -8 19 17 2 6 |
1355 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1356 | -region_count |
1357 | -6 |
1358 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1359 | -time |
1360 | - 0.000001 |
1361 | - 0.001000 |
1362 | - 1.000000 |
1363 | - 1000.000000 |
1364 | - 1000000.00000 |
1365 | -TOO LONG |
1366 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1367 | -Variable_name Value |
1368 | -query_response_time_range_base 1000 |
1369 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; |
1370 | -Warnings: |
1371 | -Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' |
1372 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1373 | -Variable_name Value |
1374 | -query_response_time_range_base 1000 |
1375 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1376 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; |
1377 | -SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; |
1378 | |
1379 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time.test' |
1380 | --- mysql-test/response-time-distribution.patch/percona_query_response_time.test 2010-12-14 20:03:02 +0000 |
1381 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time.test 1970-01-01 00:00:00 +0000 |
1382 | @@ -1,68 +0,0 @@ |
1383 | ---source include/have_response_time_distribution.inc |
1384 | ---source include/have_debug.inc |
1385 | -SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; |
1386 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; |
1387 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1388 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; |
1389 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1390 | - |
1391 | -source include/percona_query_response_time_flush.inc; |
1392 | -source include/percona_query_response_time_show.inc; |
1393 | - |
1394 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1395 | -source include/percona_query_response_time_sleep.inc; |
1396 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1397 | - |
1398 | -source include/percona_query_response_time_show.inc; |
1399 | - |
1400 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1401 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; |
1402 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1403 | - |
1404 | -source include/percona_query_response_time_flush.inc; |
1405 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1406 | -source include/percona_query_response_time_sleep.inc; |
1407 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1408 | - |
1409 | -source include/percona_query_response_time_show.inc; |
1410 | - |
1411 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1412 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; |
1413 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1414 | - |
1415 | -source include/percona_query_response_time_flush.inc; |
1416 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1417 | -source include/percona_query_response_time_sleep.inc; |
1418 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1419 | - |
1420 | -source include/percona_query_response_time_show.inc; |
1421 | - |
1422 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1423 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; |
1424 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1425 | - |
1426 | -source include/percona_query_response_time_flush.inc; |
1427 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1428 | -source include/percona_query_response_time_sleep.inc; |
1429 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1430 | - |
1431 | -source include/percona_query_response_time_show.inc; |
1432 | - |
1433 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1434 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; |
1435 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1436 | - |
1437 | -source include/percona_query_response_time_flush.inc; |
1438 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
1439 | -source include/percona_query_response_time_sleep.inc; |
1440 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1441 | - |
1442 | -source include/percona_query_response_time_show.inc; |
1443 | - |
1444 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1445 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; |
1446 | -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
1447 | - |
1448 | -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
1449 | -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; |
1450 | -SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; |
1451 | |
1452 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time_flush.inc' |
1453 | --- mysql-test/response-time-distribution.patch/percona_query_response_time_flush.inc 2010-09-29 21:16:20 +0000 |
1454 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time_flush.inc 1970-01-01 00:00:00 +0000 |
1455 | @@ -1,1 +0,0 @@ |
1456 | -FLUSH QUERY_RESPONSE_TIME; |
1457 | |
1458 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time_show.inc' |
1459 | --- mysql-test/response-time-distribution.patch/percona_query_response_time_show.inc 2010-09-29 21:16:20 +0000 |
1460 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time_show.inc 1970-01-01 00:00:00 +0000 |
1461 | @@ -1,8 +0,0 @@ |
1462 | -SELECT d.count, |
1463 | -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, |
1464 | -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, |
1465 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, |
1466 | -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count |
1467 | -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; |
1468 | -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1469 | -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
1470 | |
1471 | === removed file 'mysql-test/response-time-distribution.patch/percona_query_response_time_sleep.inc' |
1472 | --- mysql-test/response-time-distribution.patch/percona_query_response_time_sleep.inc 2010-09-29 21:16:20 +0000 |
1473 | +++ mysql-test/response-time-distribution.patch/percona_query_response_time_sleep.inc 1970-01-01 00:00:00 +0000 |
1474 | @@ -1,19 +0,0 @@ |
1475 | -SELECT SLEEP(0.31); |
1476 | -SELECT SLEEP(0.32); |
1477 | -SELECT SLEEP(0.33); |
1478 | -SELECT SLEEP(0.34); |
1479 | -SELECT SLEEP(0.35); |
1480 | -SELECT SLEEP(0.36); |
1481 | -SELECT SLEEP(0.37); |
1482 | -SELECT SLEEP(0.38); |
1483 | -SELECT SLEEP(0.39); |
1484 | -SELECT SLEEP(0.40); |
1485 | -SELECT SLEEP(1.1); |
1486 | -SELECT SLEEP(1.2); |
1487 | -SELECT SLEEP(1.3); |
1488 | -SELECT SLEEP(1.5); |
1489 | -SELECT SLEEP(1.4); |
1490 | -SELECT SLEEP(0.5); |
1491 | -SELECT SLEEP(2.1); |
1492 | -SELECT SLEEP(2.3); |
1493 | -SELECT SLEEP(2.5); |
1494 | |
1495 | === removed directory 'mysql-test/slow_extended.patch' |
1496 | === removed file 'mysql-test/slow_extended.patch/grep.inc' |
1497 | --- mysql-test/slow_extended.patch/grep.inc 2010-12-24 16:44:23 +0000 |
1498 | +++ mysql-test/slow_extended.patch/grep.inc 1970-01-01 00:00:00 +0000 |
1499 | @@ -1,16 +0,0 @@ |
1500 | -perl; |
1501 | - |
1502 | - $file = $ENV{'grep_file'}; |
1503 | - $pattern = $ENV{'grep_pattern'}; |
1504 | - |
1505 | - open(FILE, "$file") |
1506 | - or die("Cannot open file $file: $!\n"); |
1507 | - |
1508 | - $lines = 0; |
1509 | - while(<FILE>) { |
1510 | - $lines++ if (/$pattern/); |
1511 | - } |
1512 | - print "$lines\n"; |
1513 | - |
1514 | - close(FILE); |
1515 | -EOF |
1516 | |
1517 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined-master.opt' |
1518 | --- mysql-test/slow_extended.patch/percona_slow_extended-combined-master.opt 2010-12-22 20:15:33 +0000 |
1519 | +++ mysql-test/slow_extended.patch/percona_slow_extended-combined-master.opt 1970-01-01 00:00:00 +0000 |
1520 | @@ -1,1 +0,0 @@ |
1521 | ---use_global_long_query_time --log_slow_verbosity="full" |
1522 | |
1523 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined.result' |
1524 | --- mysql-test/slow_extended.patch/percona_slow_extended-combined.result 2010-12-22 20:15:33 +0000 |
1525 | +++ mysql-test/slow_extended.patch/percona_slow_extended-combined.result 1970-01-01 00:00:00 +0000 |
1526 | @@ -1,18 +0,0 @@ |
1527 | -show variables like 'use_global_long_query_time'; |
1528 | -Variable_name Value |
1529 | -use_global_long_query_time ON |
1530 | -show variables like 'use_global_log_slow_control'; |
1531 | -Variable_name Value |
1532 | -use_global_log_slow_control long_query_time |
1533 | -show variables like 'log_slow_verbosity'; |
1534 | -Variable_name Value |
1535 | -log_slow_verbosity microtime,query_plan,innodb |
1536 | -show global variables like 'use_global_long_query_time'; |
1537 | -Variable_name Value |
1538 | -use_global_long_query_time ON |
1539 | -show global variables like 'log_slow_verbosity'; |
1540 | -Variable_name Value |
1541 | -log_slow_verbosity microtime,query_plan,innodb |
1542 | -show global variables like 'use_global_log_slow_control'; |
1543 | -Variable_name Value |
1544 | -use_global_log_slow_control long_query_time |
1545 | |
1546 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined.test' |
1547 | --- mysql-test/slow_extended.patch/percona_slow_extended-combined.test 2010-12-22 20:15:33 +0000 |
1548 | +++ mysql-test/slow_extended.patch/percona_slow_extended-combined.test 1970-01-01 00:00:00 +0000 |
1549 | @@ -1,6 +0,0 @@ |
1550 | -show variables like 'use_global_long_query_time'; |
1551 | -show variables like 'use_global_log_slow_control'; |
1552 | -show variables like 'log_slow_verbosity'; |
1553 | -show global variables like 'use_global_long_query_time'; |
1554 | -show global variables like 'log_slow_verbosity'; |
1555 | -show global variables like 'use_global_log_slow_control'; |
1556 | |
1557 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined2-master.opt' |
1558 | --- mysql-test/slow_extended.patch/percona_slow_extended-combined2-master.opt 2010-12-22 20:15:33 +0000 |
1559 | +++ mysql-test/slow_extended.patch/percona_slow_extended-combined2-master.opt 1970-01-01 00:00:00 +0000 |
1560 | @@ -1,1 +0,0 @@ |
1561 | ---use_global_log_slow_control="long_query_time" |
1562 | |
1563 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined2.result' |
1564 | --- mysql-test/slow_extended.patch/percona_slow_extended-combined2.result 2010-12-22 20:15:33 +0000 |
1565 | +++ mysql-test/slow_extended.patch/percona_slow_extended-combined2.result 1970-01-01 00:00:00 +0000 |
1566 | @@ -1,12 +0,0 @@ |
1567 | -show variables like 'use_global_long_query_time'; |
1568 | -Variable_name Value |
1569 | -use_global_long_query_time ON |
1570 | -show variables like 'use_global_log_slow_control'; |
1571 | -Variable_name Value |
1572 | -use_global_log_slow_control long_query_time |
1573 | -show global variables like 'use_global_long_query_time'; |
1574 | -Variable_name Value |
1575 | -use_global_long_query_time ON |
1576 | -show global variables like 'use_global_log_slow_control'; |
1577 | -Variable_name Value |
1578 | -use_global_log_slow_control long_query_time |
1579 | |
1580 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-combined2.test' |
1581 | --- mysql-test/slow_extended.patch/percona_slow_extended-combined2.test 2010-12-22 20:15:33 +0000 |
1582 | +++ mysql-test/slow_extended.patch/percona_slow_extended-combined2.test 1970-01-01 00:00:00 +0000 |
1583 | @@ -1,4 +0,0 @@ |
1584 | -show variables like 'use_global_long_query_time'; |
1585 | -show variables like 'use_global_log_slow_control'; |
1586 | -show global variables like 'use_global_long_query_time'; |
1587 | -show global variables like 'use_global_log_slow_control'; |
1588 | |
1589 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt' |
1590 | --- mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt 2010-12-06 03:50:48 +0000 |
1591 | +++ mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt 1970-01-01 00:00:00 +0000 |
1592 | @@ -1,1 +0,0 @@ |
1593 | ---slow-query-log-file=percona_slow_query_log-control_global_slow.log --long-query-time=1 |
1594 | |
1595 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.result' |
1596 | --- mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.result 2010-12-29 19:06:24 +0000 |
1597 | +++ mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.result 1970-01-01 00:00:00 +0000 |
1598 | @@ -1,12 +0,0 @@ |
1599 | -SELECT sleep(2); |
1600 | -sleep(2) |
1601 | -0 |
1602 | -set global log_slow_verbosity=innodb; |
1603 | -set global use_global_log_slow_control="log_slow_verbosity,long_query_time"; |
1604 | -SELECT sleep(2); |
1605 | -sleep(2) |
1606 | -0 |
1607 | -set global use_global_log_slow_control=none; |
1608 | -set global log_slow_verbosity=microtime; |
1609 | -FLUSH LOGS; |
1610 | -1 |
1611 | |
1612 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.test' |
1613 | --- mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.test 2010-12-29 19:06:24 +0000 |
1614 | +++ mysql-test/slow_extended.patch/percona_slow_extended-control_global_slow.test 1970-01-01 00:00:00 +0000 |
1615 | @@ -1,12 +0,0 @@ |
1616 | -source include/have_innodb.inc; |
1617 | -SELECT sleep(2); |
1618 | -set global log_slow_verbosity=innodb; |
1619 | -set global use_global_log_slow_control="log_slow_verbosity,long_query_time"; |
1620 | -SELECT sleep(2); |
1621 | -set global use_global_log_slow_control=none; |
1622 | -set global log_slow_verbosity=microtime; |
1623 | - |
1624 | -FLUSH LOGS; |
1625 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-control_global_slow.log |
1626 | ---let grep_pattern = No InnoDB statistics available for this query |
1627 | ---source include/grep.inc |
1628 | |
1629 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt' |
1630 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt 2010-12-06 03:50:48 +0000 |
1631 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt 1970-01-01 00:00:00 +0000 |
1632 | @@ -1,1 +0,0 @@ |
1633 | ---slow-query-log-file=percona_slow_query_log-log_slow_filter.log --long-query-time=1 |
1634 | |
1635 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.result' |
1636 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.result 2010-12-29 19:06:24 +0000 |
1637 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.result 1970-01-01 00:00:00 +0000 |
1638 | @@ -1,25 +0,0 @@ |
1639 | -SET GLOBAL SLOW_QUERY_LOG=OFF; |
1640 | -drop table if exists t; |
1641 | -# Create test table |
1642 | -create table t(id INT PRIMARY KEY) engine=InnoDB; |
1643 | -# Insert two rows to test table |
1644 | -insert into t values(1); |
1645 | -insert into t values(2); |
1646 | -insert into t values(3); |
1647 | -SET GLOBAL SLOW_QUERY_LOG=ON; |
1648 | -SELECT sleep(2); |
1649 | -sleep(2) |
1650 | -0 |
1651 | -set log_slow_filter=full_join; |
1652 | -SELECT sleep(2) union select t2.id from t as t1,t as t2; |
1653 | -sleep(2) |
1654 | -0 |
1655 | -1 |
1656 | -2 |
1657 | -3 |
1658 | -SELECT sleep(2); |
1659 | -sleep(2) |
1660 | -0 |
1661 | -drop table if exists t; |
1662 | -FLUSH LOGS; |
1663 | -2 |
1664 | |
1665 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.test' |
1666 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.test 2010-12-29 19:06:24 +0000 |
1667 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_filter.test 1970-01-01 00:00:00 +0000 |
1668 | @@ -1,32 +0,0 @@ |
1669 | -source include/have_innodb.inc; |
1670 | - |
1671 | -SET GLOBAL SLOW_QUERY_LOG=OFF; |
1672 | - |
1673 | ---disable_warnings |
1674 | -drop table if exists t; |
1675 | ---enable_warnings |
1676 | - |
1677 | ---echo # Create test table |
1678 | -create table t(id INT PRIMARY KEY) engine=InnoDB; |
1679 | ---echo # Insert two rows to test table |
1680 | -insert into t values(1); |
1681 | -insert into t values(2); |
1682 | -insert into t values(3); |
1683 | - |
1684 | -SET GLOBAL SLOW_QUERY_LOG=ON; |
1685 | - |
1686 | -SELECT sleep(2); |
1687 | - |
1688 | -set log_slow_filter=full_join; |
1689 | - |
1690 | -SELECT sleep(2) union select t2.id from t as t1,t as t2; |
1691 | -SELECT sleep(2); |
1692 | - |
1693 | ---disable_warnings |
1694 | -drop table if exists t; |
1695 | ---enable_warnings |
1696 | - |
1697 | -FLUSH LOGS; |
1698 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-log_slow_filter.log |
1699 | ---let grep_pattern = Query_time |
1700 | ---source include/grep.inc |
1701 | |
1702 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt' |
1703 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt 2010-12-22 20:15:33 +0000 |
1704 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt 1970-01-01 00:00:00 +0000 |
1705 | @@ -1,1 +0,0 @@ |
1706 | ---log_slow_sp_statements |
1707 | |
1708 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result' |
1709 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result 2010-12-22 20:15:33 +0000 |
1710 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result 1970-01-01 00:00:00 +0000 |
1711 | @@ -1,3 +0,0 @@ |
1712 | -show global variables like 'log_slow_sp_statements'; |
1713 | -Variable_name Value |
1714 | -log_slow_sp_statements ON |
1715 | |
1716 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test' |
1717 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test 2010-12-22 20:15:33 +0000 |
1718 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test 1970-01-01 00:00:00 +0000 |
1719 | @@ -1,1 +0,0 @@ |
1720 | -show global variables like 'log_slow_sp_statements'; |
1721 | |
1722 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt' |
1723 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt 2010-12-22 20:15:33 +0000 |
1724 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt 1970-01-01 00:00:00 +0000 |
1725 | @@ -1,1 +0,0 @@ |
1726 | ---log_slow_timestamp_every |
1727 | |
1728 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result' |
1729 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result 2010-12-22 20:15:33 +0000 |
1730 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result 1970-01-01 00:00:00 +0000 |
1731 | @@ -1,3 +0,0 @@ |
1732 | -show global variables like 'log_slow_timestamp_every'; |
1733 | -Variable_name Value |
1734 | -log_slow_timestamp_every ON |
1735 | |
1736 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test' |
1737 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test 2010-12-22 20:15:33 +0000 |
1738 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test 1970-01-01 00:00:00 +0000 |
1739 | @@ -1,1 +0,0 @@ |
1740 | -show global variables like 'log_slow_timestamp_every'; |
1741 | |
1742 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt' |
1743 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt 2010-12-22 20:15:33 +0000 |
1744 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt 1970-01-01 00:00:00 +0000 |
1745 | @@ -1,1 +0,0 @@ |
1746 | ---log_slow_verbosity="full" |
1747 | |
1748 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result' |
1749 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result 2010-12-22 20:15:33 +0000 |
1750 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result 1970-01-01 00:00:00 +0000 |
1751 | @@ -1,9 +0,0 @@ |
1752 | -show global variables like 'log_slow_verbosity'; |
1753 | -Variable_name Value |
1754 | -log_slow_verbosity microtime,query_plan,innodb |
1755 | -show variables like 'log_slow_verbosity'; |
1756 | -Variable_name Value |
1757 | -log_slow_verbosity microtime,query_plan,innodb |
1758 | -select @@log_slow_verbosity; |
1759 | -@@log_slow_verbosity |
1760 | -microtime,query_plan,innodb |
1761 | |
1762 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test' |
1763 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test 2010-12-22 20:15:33 +0000 |
1764 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test 1970-01-01 00:00:00 +0000 |
1765 | @@ -1,3 +0,0 @@ |
1766 | -show global variables like 'log_slow_verbosity'; |
1767 | -show variables like 'log_slow_verbosity'; |
1768 | -select @@log_slow_verbosity; |
1769 | |
1770 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt' |
1771 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt 2010-12-06 03:50:48 +0000 |
1772 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt 1970-01-01 00:00:00 +0000 |
1773 | @@ -1,1 +0,0 @@ |
1774 | ---slow-query-log-file=percona_slow_query_log-log_slow_verbosity.log --long-query-time=1 |
1775 | |
1776 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result' |
1777 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result 2010-12-29 19:06:24 +0000 |
1778 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result 1970-01-01 00:00:00 +0000 |
1779 | @@ -1,9 +0,0 @@ |
1780 | -SELECT sleep(2); |
1781 | -sleep(2) |
1782 | -0 |
1783 | -set log_slow_verbosity=innodb; |
1784 | -SELECT sleep(2); |
1785 | -sleep(2) |
1786 | -0 |
1787 | -FLUSH LOGS; |
1788 | -1 |
1789 | |
1790 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test' |
1791 | --- mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test 2010-12-29 19:06:24 +0000 |
1792 | +++ mysql-test/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test 1970-01-01 00:00:00 +0000 |
1793 | @@ -1,12 +0,0 @@ |
1794 | -source include/have_innodb.inc; |
1795 | - |
1796 | -SELECT sleep(2); |
1797 | - |
1798 | -set log_slow_verbosity=innodb; |
1799 | - |
1800 | -SELECT sleep(2); |
1801 | - |
1802 | -FLUSH LOGS; |
1803 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-log_slow_verbosity.log |
1804 | ---let grep_pattern = No InnoDB statistics available for this query |
1805 | ---source include/grep.inc |
1806 | |
1807 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-long_query_time-master.opt' |
1808 | --- mysql-test/slow_extended.patch/percona_slow_extended-long_query_time-master.opt 2010-12-06 03:50:48 +0000 |
1809 | +++ mysql-test/slow_extended.patch/percona_slow_extended-long_query_time-master.opt 1970-01-01 00:00:00 +0000 |
1810 | @@ -1,1 +0,0 @@ |
1811 | ---slow-query-log-file=percona_slow_query_log-long_query_time.log --long-query-time=2 |
1812 | |
1813 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.result' |
1814 | --- mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.result 2010-12-29 19:06:24 +0000 |
1815 | +++ mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.result 1970-01-01 00:00:00 +0000 |
1816 | @@ -1,22 +0,0 @@ |
1817 | -SELECT sleep(1); |
1818 | -sleep(1) |
1819 | -0 |
1820 | -SELECT sleep(3); |
1821 | -sleep(3) |
1822 | -0 |
1823 | -SELECT sleep(5); |
1824 | -sleep(5) |
1825 | -0 |
1826 | -set long_query_time=4; |
1827 | -SELECT sleep(1); |
1828 | -sleep(1) |
1829 | -0 |
1830 | -SELECT sleep(3); |
1831 | -sleep(3) |
1832 | -0 |
1833 | -SELECT sleep(5); |
1834 | -sleep(5) |
1835 | -0 |
1836 | -set long_query_time=2; |
1837 | -FLUSH LOGS; |
1838 | -3 |
1839 | |
1840 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test' |
1841 | --- mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test 2010-12-29 19:06:24 +0000 |
1842 | +++ mysql-test/slow_extended.patch/percona_slow_extended-long_query_time.test 1970-01-01 00:00:00 +0000 |
1843 | @@ -1,19 +0,0 @@ |
1844 | -source include/have_innodb.inc; |
1845 | - |
1846 | -SELECT sleep(1); |
1847 | -SELECT sleep(3); |
1848 | -SELECT sleep(5); |
1849 | - |
1850 | -set long_query_time=4; |
1851 | - |
1852 | -SELECT sleep(1); |
1853 | -SELECT sleep(3); |
1854 | -SELECT sleep(5); |
1855 | - |
1856 | -set long_query_time=2; |
1857 | - |
1858 | -FLUSH LOGS; |
1859 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-long_query_time.log |
1860 | ---let grep_pattern = Query_time |
1861 | ---source include/grep.inc |
1862 | - |
1863 | |
1864 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt' |
1865 | --- mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt 2010-12-06 03:50:48 +0000 |
1866 | +++ mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt 1970-01-01 00:00:00 +0000 |
1867 | @@ -1,1 +0,0 @@ |
1868 | ---slow-query-log-file=percona_slow_query_log-microseconds_in_slow_query_log.log --long-query-time=1 |
1869 | |
1870 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result' |
1871 | --- mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result 2010-12-29 19:06:24 +0000 |
1872 | +++ mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result 1970-01-01 00:00:00 +0000 |
1873 | @@ -1,11 +0,0 @@ |
1874 | -SELECT sleep(2); |
1875 | -sleep(2) |
1876 | -0 |
1877 | -set global slow_query_log_microseconds_timestamp=ON; |
1878 | -SELECT sleep(2); |
1879 | -sleep(2) |
1880 | -0 |
1881 | -set global slow_query_log_microseconds_timestamp=OFF; |
1882 | -FLUSH LOGS; |
1883 | -1 |
1884 | -2 |
1885 | |
1886 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test' |
1887 | --- mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test 2010-12-29 19:06:24 +0000 |
1888 | +++ mysql-test/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test 1970-01-01 00:00:00 +0000 |
1889 | @@ -1,19 +0,0 @@ |
1890 | -source include/have_innodb.inc; |
1891 | - |
1892 | -SELECT sleep(2); |
1893 | - |
1894 | -set global slow_query_log_microseconds_timestamp=ON; |
1895 | - |
1896 | -SELECT sleep(2); |
1897 | - |
1898 | -set global slow_query_log_microseconds_timestamp=OFF; |
1899 | - |
1900 | -FLUSH LOGS; |
1901 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log |
1902 | ---let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+.[0-9]+ |
1903 | ---source include/grep.inc |
1904 | - |
1905 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log |
1906 | ---let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+ |
1907 | ---source include/grep.inc |
1908 | - |
1909 | |
1910 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt' |
1911 | --- mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt 2010-12-06 03:50:48 +0000 |
1912 | +++ mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt 1970-01-01 00:00:00 +0000 |
1913 | @@ -1,1 +0,0 @@ |
1914 | ---slow-query-log-file=percona_slow_query_log-min_examined_row_limit.log --long-query-time=1 |
1915 | |
1916 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result' |
1917 | --- mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result 2010-12-29 19:06:24 +0000 |
1918 | +++ mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result 1970-01-01 00:00:00 +0000 |
1919 | @@ -1,25 +0,0 @@ |
1920 | -SET GLOBAL SLOW_QUERY_LOG=OFF; |
1921 | -drop table if exists t; |
1922 | -# Create test table |
1923 | -create table t(id INT PRIMARY KEY) engine=InnoDB; |
1924 | -# Insert two rows to test table |
1925 | -insert into t values(1); |
1926 | -insert into t values(2); |
1927 | -insert into t values(3); |
1928 | -SET GLOBAL SLOW_QUERY_LOG=ON; |
1929 | -SELECT sleep(2); |
1930 | -sleep(2) |
1931 | -0 |
1932 | -set min_examined_row_limit=5; |
1933 | -SELECT sleep(2) union select t2.id from t as t1,t as t2; |
1934 | -sleep(2) |
1935 | -0 |
1936 | -1 |
1937 | -2 |
1938 | -3 |
1939 | -SELECT sleep(2); |
1940 | -sleep(2) |
1941 | -0 |
1942 | -drop table if exists t; |
1943 | -FLUSH LOGS; |
1944 | -2 |
1945 | |
1946 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test' |
1947 | --- mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test 2010-12-29 19:06:24 +0000 |
1948 | +++ mysql-test/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test 1970-01-01 00:00:00 +0000 |
1949 | @@ -1,32 +0,0 @@ |
1950 | -source include/have_innodb.inc; |
1951 | - |
1952 | -SET GLOBAL SLOW_QUERY_LOG=OFF; |
1953 | - |
1954 | ---disable_warnings |
1955 | -drop table if exists t; |
1956 | ---enable_warnings |
1957 | - |
1958 | ---echo # Create test table |
1959 | -create table t(id INT PRIMARY KEY) engine=InnoDB; |
1960 | ---echo # Insert two rows to test table |
1961 | -insert into t values(1); |
1962 | -insert into t values(2); |
1963 | -insert into t values(3); |
1964 | - |
1965 | -SET GLOBAL SLOW_QUERY_LOG=ON; |
1966 | - |
1967 | -SELECT sleep(2); |
1968 | - |
1969 | -set min_examined_row_limit=5; |
1970 | - |
1971 | -SELECT sleep(2) union select t2.id from t as t1,t as t2; |
1972 | -SELECT sleep(2); |
1973 | - |
1974 | ---disable_warnings |
1975 | -drop table if exists t; |
1976 | ---enable_warnings |
1977 | - |
1978 | -FLUSH LOGS; |
1979 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-min_examined_row_limit.log |
1980 | ---let grep_pattern = Query_time |
1981 | ---source include/grep.inc |
1982 | |
1983 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt' |
1984 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt 2010-11-18 12:38:25 +0000 |
1985 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt 1970-01-01 00:00:00 +0000 |
1986 | @@ -1,1 +0,0 @@ |
1987 | ---long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements |
1988 | |
1989 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt' |
1990 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt 2010-11-18 12:38:25 +0000 |
1991 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt 1970-01-01 00:00:00 +0000 |
1992 | @@ -1,1 +0,0 @@ |
1993 | ---long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements |
1994 | |
1995 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result' |
1996 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result 2011-05-26 10:57:17 +0000 |
1997 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result 1970-01-01 00:00:00 +0000 |
1998 | @@ -1,21 +0,0 @@ |
1999 | -include/master-slave.inc |
2000 | -[connection master] |
2001 | -DROP TABLE IF EXISTS t; |
2002 | -CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB; |
2003 | -INSERT INTO t VALUES |
2004 | -(1,"aaaaabbbbbcccccdddddeeeeefffff"), |
2005 | -(2,"aaaaabbbbbcccccdddddeeeeefffff"), |
2006 | -(3,"aaaaabbbbbcccccdddddeeeeefffff"), |
2007 | -(4,"aaaaabbbbbcccccdddddeeeeefffff"), |
2008 | -(5,"aaaaabbbbbcccccdddddeeeeefffff"); |
2009 | -INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2; |
2010 | -INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2; |
2011 | -STOP SLAVE; |
2012 | -include/wait_for_slave_to_stop.inc |
2013 | -START SLAVE; |
2014 | -include/wait_for_slave_to_start.inc |
2015 | -INSERT INTO t SELECT t.id,t.data from t; |
2016 | -FLUSH LOGS; |
2017 | -4 |
2018 | -DROP TABLE IF EXISTS t; |
2019 | -include/rpl_end.inc |
2020 | |
2021 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test' |
2022 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test 2011-05-26 10:57:17 +0000 |
2023 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test 1970-01-01 00:00:00 +0000 |
2024 | @@ -1,38 +0,0 @@ |
2025 | --- source include/have_binlog_format_mixed_or_statement.inc |
2026 | --- source include/have_innodb.inc |
2027 | --- source include/master-slave.inc |
2028 | - |
2029 | -connection master; |
2030 | --- disable_warnings |
2031 | -DROP TABLE IF EXISTS t; |
2032 | --- enable_warnings |
2033 | -CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB; |
2034 | -INSERT INTO t VALUES |
2035 | -(1,"aaaaabbbbbcccccdddddeeeeefffff"), |
2036 | -(2,"aaaaabbbbbcccccdddddeeeeefffff"), |
2037 | -(3,"aaaaabbbbbcccccdddddeeeeefffff"), |
2038 | -(4,"aaaaabbbbbcccccdddddeeeeefffff"), |
2039 | -(5,"aaaaabbbbbcccccdddddeeeeefffff"); |
2040 | -INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2; |
2041 | -INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2; |
2042 | -sync_slave_with_master; |
2043 | - |
2044 | -connection slave; |
2045 | -STOP SLAVE; |
2046 | --- source include/wait_for_slave_to_stop.inc |
2047 | -START SLAVE; |
2048 | --- source include/wait_for_slave_to_start.inc |
2049 | - |
2050 | -connection master; |
2051 | -INSERT INTO t SELECT t.id,t.data from t; |
2052 | -sync_slave_with_master; |
2053 | - |
2054 | -connection slave; |
2055 | -FLUSH LOGS; |
2056 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.2/mysqld-slow.log |
2057 | ---let grep_pattern = InnoDB_IO_r_ops |
2058 | ---source include/grep.inc |
2059 | - |
2060 | -connection master; |
2061 | -DROP TABLE IF EXISTS t; |
2062 | ---source include/rpl_end.inc |
2063 | |
2064 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt' |
2065 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt 2010-12-06 03:50:48 +0000 |
2066 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt 1970-01-01 00:00:00 +0000 |
2067 | @@ -1,1 +0,0 @@ |
2068 | ---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=1 |
2069 | |
2070 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt' |
2071 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt 2010-12-06 03:50:48 +0000 |
2072 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt 1970-01-01 00:00:00 +0000 |
2073 | @@ -1,1 +0,0 @@ |
2074 | ---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=1 |
2075 | |
2076 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result' |
2077 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result 2011-02-26 09:03:28 +0000 |
2078 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result 1970-01-01 00:00:00 +0000 |
2079 | @@ -1,94 +0,0 @@ |
2080 | -# Activate master-slave replication |
2081 | -include/master-slave.inc |
2082 | -[connection master] |
2083 | -# Make table t for test |
2084 | -DROP TABLE IF EXISTS t; |
2085 | -CREATE TABLE t(id INT); |
2086 | -# Start slave replication |
2087 | -START SLAVE; |
2088 | -include/wait_for_slave_to_start.inc |
2089 | -INSERT INTO t VALUES (1); |
2090 | -# Read and change log_slow_slave_statements to ON on slave |
2091 | -show variables like 'log_slow_slave_statements'; |
2092 | -Variable_name Value |
2093 | -log_slow_slave_statements OFF |
2094 | -set global log_slow_slave_statements=ON; |
2095 | -show variables like 'log_slow_slave_statements'; |
2096 | -Variable_name Value |
2097 | -log_slow_slave_statements ON |
2098 | -INSERT INTO t VALUES (2); |
2099 | -# Restart slave |
2100 | -STOP SLAVE; |
2101 | -include/wait_for_slave_to_stop.inc |
2102 | -START SLAVE; |
2103 | -include/wait_for_slave_to_start.inc |
2104 | -INSERT INTO t VALUES (3); |
2105 | -show variables like 'long_query_time'; |
2106 | -Variable_name Value |
2107 | -long_query_time 1.000000 |
2108 | -show global variables like 'long_query_time'; |
2109 | -Variable_name Value |
2110 | -long_query_time 1.000000 |
2111 | -show global variables like 'use_global_long_query_time'; |
2112 | -Variable_name Value |
2113 | -use_global_long_query_time OFF |
2114 | -set global long_query_time=0; |
2115 | -show variables like 'long_query_time'; |
2116 | -Variable_name Value |
2117 | -long_query_time 1.000000 |
2118 | -show global variables like 'long_query_time'; |
2119 | -Variable_name Value |
2120 | -long_query_time 0.000000 |
2121 | -show global variables like 'use_global_long_query_time'; |
2122 | -Variable_name Value |
2123 | -use_global_long_query_time OFF |
2124 | -INSERT INTO t VALUES (4); |
2125 | -show variables like 'long_query_time'; |
2126 | -Variable_name Value |
2127 | -long_query_time 1.000000 |
2128 | -show global variables like 'long_query_time'; |
2129 | -Variable_name Value |
2130 | -long_query_time 0.000000 |
2131 | -show global variables like 'use_global_long_query_time'; |
2132 | -Variable_name Value |
2133 | -use_global_long_query_time OFF |
2134 | -set global use_global_long_query_time=1; |
2135 | -show variables like 'long_query_time'; |
2136 | -Variable_name Value |
2137 | -long_query_time 0.000000 |
2138 | -show global variables like 'long_query_time'; |
2139 | -Variable_name Value |
2140 | -long_query_time 0.000000 |
2141 | -show global variables like 'use_global_long_query_time'; |
2142 | -Variable_name Value |
2143 | -use_global_long_query_time ON |
2144 | -INSERT INTO t VALUES (5); |
2145 | -show variables like 'long_query_time'; |
2146 | -Variable_name Value |
2147 | -long_query_time 0.000000 |
2148 | -show global variables like 'long_query_time'; |
2149 | -Variable_name Value |
2150 | -long_query_time 0.000000 |
2151 | -show global variables like 'use_global_long_query_time'; |
2152 | -Variable_name Value |
2153 | -use_global_long_query_time ON |
2154 | -set global long_query_time=1; |
2155 | -set global use_global_long_query_time=0; |
2156 | -FLUSH LOGS; |
2157 | -# Analyse master slow_query_log |
2158 | -0 |
2159 | -0 |
2160 | -0 |
2161 | -0 |
2162 | -0 |
2163 | -FLUSH LOGS; |
2164 | -# Analyse slave slow_query_log |
2165 | -0 |
2166 | -0 |
2167 | -0 |
2168 | -0 |
2169 | -1 |
2170 | -set global log_slow_slave_statements=OFF; |
2171 | -DROP TABLE t; |
2172 | -STOP SLAVE; |
2173 | -include/wait_for_slave_to_stop.inc |
2174 | |
2175 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test' |
2176 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test 2011-02-26 09:03:28 +0000 |
2177 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test 1970-01-01 00:00:00 +0000 |
2178 | @@ -1,116 +0,0 @@ |
2179 | --- source include/have_binlog_format_mixed_or_statement.inc |
2180 | --- echo # Activate master-slave replication |
2181 | --- source include/master-slave.inc |
2182 | - |
2183 | -connection master; |
2184 | --- echo # Make table t for test |
2185 | --- disable_warnings |
2186 | -DROP TABLE IF EXISTS t; |
2187 | --- enable_warnings |
2188 | -CREATE TABLE t(id INT); |
2189 | - |
2190 | - |
2191 | --- echo # Start slave replication |
2192 | --- disable_warnings |
2193 | -connection slave; |
2194 | -START SLAVE; |
2195 | --- source include/wait_for_slave_to_start.inc |
2196 | --- enable_warnings |
2197 | - |
2198 | -#-- echo # Make insert(1) on master |
2199 | -connection master; |
2200 | -INSERT INTO t VALUES (1); |
2201 | -sync_slave_with_master; |
2202 | -connection slave; |
2203 | --- echo # Read and change log_slow_slave_statements to ON on slave |
2204 | -show variables like 'log_slow_slave_statements'; |
2205 | -set global log_slow_slave_statements=ON; |
2206 | -show variables like 'log_slow_slave_statements'; |
2207 | - |
2208 | -#-- echo # Make insert(2) on master |
2209 | -connection master; |
2210 | -INSERT INTO t VALUES (2); |
2211 | -sync_slave_with_master; |
2212 | -connection slave; |
2213 | --- echo # Restart slave |
2214 | -STOP SLAVE; |
2215 | --- source include/wait_for_slave_to_stop.inc |
2216 | -START SLAVE; |
2217 | --- source include/wait_for_slave_to_start.inc |
2218 | - |
2219 | -#-- echo # Make insert(3) on master |
2220 | -connection master; |
2221 | -INSERT INTO t VALUES (3); |
2222 | -sync_slave_with_master; |
2223 | -connection slave; |
2224 | -show variables like 'long_query_time'; |
2225 | -show global variables like 'long_query_time'; |
2226 | -show global variables like 'use_global_long_query_time'; |
2227 | -set global long_query_time=0; |
2228 | -show variables like 'long_query_time'; |
2229 | -show global variables like 'long_query_time'; |
2230 | -show global variables like 'use_global_long_query_time'; |
2231 | - |
2232 | -#-- echo # Make insert(4) on master |
2233 | -connection master; |
2234 | -INSERT INTO t VALUES (4); |
2235 | -sync_slave_with_master; |
2236 | -connection slave; |
2237 | -show variables like 'long_query_time'; |
2238 | -show global variables like 'long_query_time'; |
2239 | -show global variables like 'use_global_long_query_time'; |
2240 | -set global use_global_long_query_time=1; |
2241 | -show variables like 'long_query_time'; |
2242 | -show global variables like 'long_query_time'; |
2243 | -show global variables like 'use_global_long_query_time'; |
2244 | - |
2245 | -#-- echo # Make insert(5) on master |
2246 | -connection master; |
2247 | -INSERT INTO t VALUES (5); |
2248 | -sync_slave_with_master; |
2249 | -connection slave; |
2250 | -show variables like 'long_query_time'; |
2251 | -show global variables like 'long_query_time'; |
2252 | -show global variables like 'use_global_long_query_time'; |
2253 | -set global long_query_time=1; |
2254 | -set global use_global_long_query_time=0; |
2255 | - |
2256 | -connection master; |
2257 | -FLUSH LOGS; |
2258 | - |
2259 | --- echo # Analyse master slow_query_log |
2260 | -let $i=5; |
2261 | -let $k=1; |
2262 | -while($i) |
2263 | -{ |
2264 | - --let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_log_slow_slave_statements-master.log |
2265 | - --let grep_pattern = INSERT INTO t VALUES \($k\) |
2266 | - --source include/grep.inc |
2267 | - dec $i; |
2268 | - inc $k; |
2269 | -} |
2270 | - |
2271 | -connection slave; |
2272 | -FLUSH LOGS; |
2273 | - |
2274 | --- echo # Analyse slave slow_query_log |
2275 | -let $i=5; |
2276 | -let $k=1; |
2277 | -while($i) |
2278 | -{ |
2279 | - --let grep_file = $MYSQLTEST_VARDIR/mysqld.2/data/percona_log_slow_slave_statements-slave.log |
2280 | - --let grep_pattern = INSERT INTO t VALUES \($k\) |
2281 | - --source include/grep.inc |
2282 | - dec $i; |
2283 | - inc $k; |
2284 | -} |
2285 | -set global log_slow_slave_statements=OFF; |
2286 | - |
2287 | -connection master; |
2288 | -DROP TABLE t; |
2289 | - |
2290 | -sync_slave_with_master; |
2291 | -connection slave; |
2292 | - |
2293 | -STOP SLAVE; |
2294 | --- source include/wait_for_slave_to_stop.inc |
2295 | |
2296 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-master.opt' |
2297 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-master.opt 2010-12-06 03:50:48 +0000 |
2298 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-master.opt 1970-01-01 00:00:00 +0000 |
2299 | @@ -1,1 +0,0 @@ |
2300 | ---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=0 |
2301 | |
2302 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt' |
2303 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt 2010-12-06 03:50:48 +0000 |
2304 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt 1970-01-01 00:00:00 +0000 |
2305 | @@ -1,1 +0,0 @@ |
2306 | ---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=0 |
2307 | |
2308 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.result' |
2309 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.result 2011-02-26 09:03:28 +0000 |
2310 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.result 1970-01-01 00:00:00 +0000 |
2311 | @@ -1,93 +0,0 @@ |
2312 | -# Activate master-slave replication |
2313 | -include/master-slave.inc |
2314 | -[connection master] |
2315 | -# Make table t for test |
2316 | -DROP TABLE IF EXISTS t; |
2317 | -CREATE TABLE t(id INT); |
2318 | -# Start slave replication |
2319 | -START SLAVE; |
2320 | -include/wait_for_slave_to_start.inc |
2321 | -INSERT INTO t VALUES (1); |
2322 | -# Read information about master binlog |
2323 | -# Sync(1) slave thread |
2324 | -# Read and change log_slow_slave_statements to ON on slave |
2325 | -show variables like 'log_slow_slave_statements'; |
2326 | -Variable_name Value |
2327 | -log_slow_slave_statements OFF |
2328 | -set global log_slow_slave_statements=ON; |
2329 | -show variables like 'log_slow_slave_statements'; |
2330 | -Variable_name Value |
2331 | -log_slow_slave_statements ON |
2332 | -INSERT INTO t VALUES (2); |
2333 | -# Read information about master binlog |
2334 | -# Sync slave(2) thread |
2335 | -# Restart slave |
2336 | -STOP SLAVE; |
2337 | -include/wait_for_slave_to_stop.inc |
2338 | -START SLAVE; |
2339 | -include/wait_for_slave_to_start.inc |
2340 | -INSERT INTO t VALUES (3); |
2341 | -# Read information about master binlog |
2342 | -# Sync(3) slave thread |
2343 | -# Read and change log_slow_slave_statements to OFF on slave |
2344 | -show variables like 'log_slow_slave_statements'; |
2345 | -Variable_name Value |
2346 | -log_slow_slave_statements ON |
2347 | -set global log_slow_slave_statements=OFF; |
2348 | -show variables like 'log_slow_slave_statements'; |
2349 | -Variable_name Value |
2350 | -log_slow_slave_statements OFF |
2351 | -INSERT INTO t VALUES (4); |
2352 | -# Read information about master binlog |
2353 | -# Sync slave(4) thread |
2354 | -# Restart slave |
2355 | -STOP SLAVE; |
2356 | -include/wait_for_slave_to_stop.inc |
2357 | -START SLAVE; |
2358 | -include/wait_for_slave_to_start.inc |
2359 | -INSERT INTO t VALUES (5); |
2360 | -# Read information about master binlog |
2361 | -# Sync slave(5) thread |
2362 | -# Read and change log_slow_slave_statements to ON on slave |
2363 | -show variables like 'log_slow_slave_statements'; |
2364 | -Variable_name Value |
2365 | -log_slow_slave_statements OFF |
2366 | -set global log_slow_slave_statements=ON; |
2367 | -show variables like 'log_slow_slave_statements'; |
2368 | -Variable_name Value |
2369 | -log_slow_slave_statements ON |
2370 | -INSERT INTO t VALUES (6); |
2371 | -# Read information about master binlog |
2372 | -# Sync slave(6) thread |
2373 | -# Restart slave |
2374 | -STOP SLAVE; |
2375 | -include/wait_for_slave_to_stop.inc |
2376 | -START SLAVE; |
2377 | -include/wait_for_slave_to_start.inc |
2378 | -INSERT INTO t VALUES (7); |
2379 | -# Read information about master binlog |
2380 | -# Sync slave(7) thread |
2381 | -FLUSH LOGS; |
2382 | -# Analyse master slow_query_log |
2383 | -1 |
2384 | -1 |
2385 | -1 |
2386 | -1 |
2387 | -1 |
2388 | -1 |
2389 | -1 |
2390 | -FLUSH LOGS; |
2391 | -# Analyse slave slow_query_log |
2392 | -0 |
2393 | -0 |
2394 | -1 |
2395 | -0 |
2396 | -0 |
2397 | -0 |
2398 | -1 |
2399 | -set global log_slow_slave_statements=OFF; |
2400 | -DROP TABLE t; |
2401 | -# Read information about master binlog |
2402 | -# Sync slave(8) thread |
2403 | -STOP SLAVE; |
2404 | -include/wait_for_slave_to_stop.inc |
2405 | |
2406 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test' |
2407 | --- mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test 2011-02-26 09:03:28 +0000 |
2408 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slave_statements.test 1970-01-01 00:00:00 +0000 |
2409 | @@ -1,168 +0,0 @@ |
2410 | --- source include/have_binlog_format_mixed_or_statement.inc |
2411 | --- echo # Activate master-slave replication |
2412 | --- source include/master-slave.inc |
2413 | - |
2414 | -connection master; |
2415 | --- echo # Make table t for test |
2416 | --- disable_warnings |
2417 | -DROP TABLE IF EXISTS t; |
2418 | --- enable_warnings |
2419 | -CREATE TABLE t(id INT); |
2420 | - |
2421 | - |
2422 | --- echo # Start slave replication |
2423 | --- disable_warnings |
2424 | -connection slave; |
2425 | -START SLAVE; |
2426 | --- source include/wait_for_slave_to_start.inc |
2427 | --- enable_warnings |
2428 | - |
2429 | -#-- echo # Make insert(1) on master |
2430 | -connection master; |
2431 | -INSERT INTO t VALUES (1); |
2432 | --- echo # Read information about master binlog |
2433 | -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); |
2434 | -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); |
2435 | - |
2436 | --- echo # Sync(1) slave thread |
2437 | -connection slave; |
2438 | -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; |
2439 | - |
2440 | --- echo # Read and change log_slow_slave_statements to ON on slave |
2441 | -show variables like 'log_slow_slave_statements'; |
2442 | -set global log_slow_slave_statements=ON; |
2443 | -show variables like 'log_slow_slave_statements'; |
2444 | - |
2445 | -#-- echo # Make insert(2) on master |
2446 | -connection master; |
2447 | -INSERT INTO t VALUES (2); |
2448 | --- echo # Read information about master binlog |
2449 | -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); |
2450 | -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); |
2451 | - |
2452 | --- echo # Sync slave(2) thread |
2453 | -connection slave; |
2454 | -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; |
2455 | --- echo # Restart slave |
2456 | -STOP SLAVE; |
2457 | --- source include/wait_for_slave_to_stop.inc |
2458 | -START SLAVE; |
2459 | --- source include/wait_for_slave_to_start.inc |
2460 | - |
2461 | -#-- echo # Make insert(3) on master |
2462 | -connection master; |
2463 | -INSERT INTO t VALUES (3); |
2464 | --- echo # Read information about master binlog |
2465 | -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); |
2466 | -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); |
2467 | - |
2468 | --- echo # Sync(3) slave thread |
2469 | -connection slave; |
2470 | -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; |
2471 | --- echo # Read and change log_slow_slave_statements to OFF on slave |
2472 | -show variables like 'log_slow_slave_statements'; |
2473 | -set global log_slow_slave_statements=OFF; |
2474 | -show variables like 'log_slow_slave_statements'; |
2475 | - |
2476 | -#-- echo # Make insert(4) on master |
2477 | -connection master; |
2478 | -INSERT INTO t VALUES (4); |
2479 | --- echo # Read information about master binlog |
2480 | -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); |
2481 | -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); |
2482 | - |
2483 | --- echo # Sync slave(4) thread |
2484 | -connection slave; |
2485 | -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; |
2486 | --- echo # Restart slave |
2487 | -STOP SLAVE; |
2488 | --- source include/wait_for_slave_to_stop.inc |
2489 | -START SLAVE; |
2490 | --- source include/wait_for_slave_to_start.inc |
2491 | - |
2492 | -#-- echo # Make insert(5) on master |
2493 | -connection master; |
2494 | -INSERT INTO t VALUES (5); |
2495 | --- echo # Read information about master binlog |
2496 | -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); |
2497 | -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); |
2498 | - |
2499 | --- echo # Sync slave(5) thread |
2500 | -connection slave; |
2501 | -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; |
2502 | --- echo # Read and change log_slow_slave_statements to ON on slave |
2503 | -show variables like 'log_slow_slave_statements'; |
2504 | -set global log_slow_slave_statements=ON; |
2505 | -show variables like 'log_slow_slave_statements'; |
2506 | - |
2507 | -#-- echo # Make insert(6) on master |
2508 | -connection master; |
2509 | -INSERT INTO t VALUES (6); |
2510 | --- echo # Read information about master binlog |
2511 | -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); |
2512 | -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); |
2513 | - |
2514 | --- echo # Sync slave(6) thread |
2515 | -connection slave; |
2516 | -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; |
2517 | --- echo # Restart slave |
2518 | -STOP SLAVE; |
2519 | --- source include/wait_for_slave_to_stop.inc |
2520 | -START SLAVE; |
2521 | --- source include/wait_for_slave_to_start.inc |
2522 | - |
2523 | -#-- echo # Make insert(7) on master |
2524 | -connection master; |
2525 | -INSERT INTO t VALUES (7); |
2526 | --- echo # Read information about master binlog |
2527 | -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); |
2528 | -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); |
2529 | - |
2530 | --- echo # Sync slave(7) thread |
2531 | -connection slave; |
2532 | -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; |
2533 | - |
2534 | -connection master; |
2535 | -FLUSH LOGS; |
2536 | - |
2537 | --- echo # Analyse master slow_query_log |
2538 | -let $i=7; |
2539 | -let $k=1; |
2540 | -while($i) |
2541 | -{ |
2542 | - --let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_log_slow_slave_statements-master.log |
2543 | - --let grep_pattern = INSERT INTO t VALUES \($k\) |
2544 | - --source include/grep.inc |
2545 | - dec $i; |
2546 | - inc $k; |
2547 | -} |
2548 | - |
2549 | -connection slave; |
2550 | -FLUSH LOGS; |
2551 | - |
2552 | --- echo # Analyse slave slow_query_log |
2553 | -let $i=7; |
2554 | -let $k=1; |
2555 | -while($i) |
2556 | -{ |
2557 | - --let grep_file = $MYSQLTEST_VARDIR/mysqld.2/data/percona_log_slow_slave_statements-slave.log |
2558 | - --let grep_pattern = INSERT INTO t VALUES \($k\) |
2559 | - --source include/grep.inc |
2560 | - dec $i; |
2561 | - inc $k; |
2562 | -} |
2563 | -set global log_slow_slave_statements=OFF; |
2564 | - |
2565 | -connection master; |
2566 | -DROP TABLE t; |
2567 | - |
2568 | --- echo # Read information about master binlog |
2569 | -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); |
2570 | -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); |
2571 | - |
2572 | --- echo # Sync slave(8) thread |
2573 | -connection slave; |
2574 | -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; |
2575 | - |
2576 | -STOP SLAVE; |
2577 | --- source include/wait_for_slave_to_stop.inc |
2578 | |
2579 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt' |
2580 | --- mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt 2010-12-22 20:15:33 +0000 |
2581 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt 1970-01-01 00:00:00 +0000 |
2582 | @@ -1,1 +0,0 @@ |
2583 | ---slow_query_log_microseconds_timestamp |
2584 | |
2585 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result' |
2586 | --- mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result 2010-12-22 20:15:33 +0000 |
2587 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result 1970-01-01 00:00:00 +0000 |
2588 | @@ -1,3 +0,0 @@ |
2589 | -show global variables like 'slow_query_log_microseconds_timestamp'; |
2590 | -Variable_name Value |
2591 | -slow_query_log_microseconds_timestamp ON |
2592 | |
2593 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test' |
2594 | --- mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test 2010-12-22 20:15:33 +0000 |
2595 | +++ mysql-test/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test 1970-01-01 00:00:00 +0000 |
2596 | @@ -1,1 +0,0 @@ |
2597 | -show global variables like 'slow_query_log_microseconds_timestamp'; |
2598 | |
2599 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt' |
2600 | --- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt 2010-12-22 20:15:33 +0000 |
2601 | +++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt 1970-01-01 00:00:00 +0000 |
2602 | @@ -1,1 +0,0 @@ |
2603 | ---use_global_long_query_time |
2604 | |
2605 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result' |
2606 | --- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result 2010-12-22 20:15:33 +0000 |
2607 | +++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result 1970-01-01 00:00:00 +0000 |
2608 | @@ -1,3 +0,0 @@ |
2609 | -show global variables like 'use_global_long_query_time'; |
2610 | -Variable_name Value |
2611 | -use_global_long_query_time ON |
2612 | |
2613 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test' |
2614 | --- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test 2010-12-22 20:15:33 +0000 |
2615 | +++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test 1970-01-01 00:00:00 +0000 |
2616 | @@ -1,1 +0,0 @@ |
2617 | -show global variables like 'use_global_long_query_time'; |
2618 | |
2619 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt' |
2620 | --- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt 2010-12-06 03:50:48 +0000 |
2621 | +++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt 1970-01-01 00:00:00 +0000 |
2622 | @@ -1,1 +0,0 @@ |
2623 | ---slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2 --use_global_log_slow_control=long_query_time --use_global_long_query_time=1 |
2624 | |
2625 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result' |
2626 | --- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result 2010-12-29 19:06:24 +0000 |
2627 | +++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result 1970-01-01 00:00:00 +0000 |
2628 | @@ -1,59 +0,0 @@ |
2629 | -SELECT sleep(1); |
2630 | -sleep(1) |
2631 | -0 |
2632 | -SELECT sleep(3); |
2633 | -sleep(3) |
2634 | -0 |
2635 | -SELECT sleep(5); |
2636 | -sleep(5) |
2637 | -0 |
2638 | -set global long_query_time=4; |
2639 | -set global use_global_long_query_time=1; |
2640 | -SELECT sleep(1); |
2641 | -sleep(1) |
2642 | -0 |
2643 | -SELECT sleep(3); |
2644 | -sleep(3) |
2645 | -0 |
2646 | -SELECT sleep(5); |
2647 | -sleep(5) |
2648 | -0 |
2649 | -set global long_query_time=2; |
2650 | -set global use_global_long_query_time=0; |
2651 | -FLUSH LOGS; |
2652 | -3 |
2653 | -show global variables like 'use_global_log_slow_control'; |
2654 | -Variable_name Value |
2655 | -use_global_log_slow_control none |
2656 | -show global variables like 'use_global_long_query_time'; |
2657 | -Variable_name Value |
2658 | -use_global_long_query_time OFF |
2659 | -set global use_global_log_slow_control = long_query_time; |
2660 | -show global variables like 'use_global_log_slow_control'; |
2661 | -Variable_name Value |
2662 | -use_global_log_slow_control long_query_time |
2663 | -show global variables like 'use_global_long_query_time'; |
2664 | -Variable_name Value |
2665 | -use_global_long_query_time ON |
2666 | -set global use_global_log_slow_control = log_slow_filter; |
2667 | -show global variables like 'use_global_log_slow_control'; |
2668 | -Variable_name Value |
2669 | -use_global_log_slow_control log_slow_filter |
2670 | -show global variables like 'use_global_long_query_time'; |
2671 | -Variable_name Value |
2672 | -use_global_long_query_time OFF |
2673 | -set global use_global_long_query_time = ON; |
2674 | -show global variables like 'use_global_log_slow_control'; |
2675 | -Variable_name Value |
2676 | -use_global_log_slow_control log_slow_filter,long_query_time |
2677 | -show global variables like 'use_global_long_query_time'; |
2678 | -Variable_name Value |
2679 | -use_global_long_query_time ON |
2680 | -set global use_global_long_query_time = OFF; |
2681 | -show global variables like 'use_global_log_slow_control'; |
2682 | -Variable_name Value |
2683 | -use_global_log_slow_control log_slow_filter |
2684 | -show global variables like 'use_global_long_query_time'; |
2685 | -Variable_name Value |
2686 | -use_global_long_query_time OFF |
2687 | -set global use_global_log_slow_control = long_query_time; |
2688 | |
2689 | === removed file 'mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test' |
2690 | --- mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test 2010-12-29 19:06:24 +0000 |
2691 | +++ mysql-test/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test 1970-01-01 00:00:00 +0000 |
2692 | @@ -1,41 +0,0 @@ |
2693 | -source include/have_innodb.inc; |
2694 | - |
2695 | -SELECT sleep(1); |
2696 | -SELECT sleep(3); |
2697 | -SELECT sleep(5); |
2698 | - |
2699 | -set global long_query_time=4; |
2700 | -set global use_global_long_query_time=1; |
2701 | - |
2702 | -SELECT sleep(1); |
2703 | -SELECT sleep(3); |
2704 | -SELECT sleep(5); |
2705 | - |
2706 | -set global long_query_time=2; |
2707 | -set global use_global_long_query_time=0; |
2708 | - |
2709 | -FLUSH LOGS; |
2710 | ---let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-use_global_long_query_time.log |
2711 | ---let grep_pattern = Query_time |
2712 | ---source include/grep.inc |
2713 | - |
2714 | -show global variables like 'use_global_log_slow_control'; |
2715 | -show global variables like 'use_global_long_query_time'; |
2716 | - |
2717 | -set global use_global_log_slow_control = long_query_time; |
2718 | -show global variables like 'use_global_log_slow_control'; |
2719 | -show global variables like 'use_global_long_query_time'; |
2720 | - |
2721 | -set global use_global_log_slow_control = log_slow_filter; |
2722 | -show global variables like 'use_global_log_slow_control'; |
2723 | -show global variables like 'use_global_long_query_time'; |
2724 | - |
2725 | -set global use_global_long_query_time = ON; |
2726 | -show global variables like 'use_global_log_slow_control'; |
2727 | -show global variables like 'use_global_long_query_time'; |
2728 | - |
2729 | -set global use_global_long_query_time = OFF; |
2730 | -show global variables like 'use_global_log_slow_control'; |
2731 | -show global variables like 'use_global_long_query_time'; |
2732 | - |
2733 | -set global use_global_log_slow_control = long_query_time; |
2734 | |
2735 | === modified file 'mysql_dump_ignore_ct.patch' |
2736 | --- mysql_dump_ignore_ct.patch 2011-05-10 07:31:20 +0000 |
2737 | +++ mysql_dump_ignore_ct.patch 2011-07-27 08:44:25 +0000 |
2738 | @@ -6,8 +6,8 @@ |
2739 | # Any small change to this file in the main branch |
2740 | # should be done or reviewed by the maintainer! |
2741 | diff -ruN a/client/client_priv.h b/client/client_priv.h |
2742 | ---- a/client/client_priv.h 2010-04-06 23:03:48.000000000 +0900 |
2743 | -+++ b/client/client_priv.h 2010-04-30 19:37:42.000000000 +0900 |
2744 | +--- a/client/client_priv.h |
2745 | ++++ b/client/client_priv.h |
2746 | @@ -68,6 +68,7 @@ |
2747 | OPT_MYSQL_LOCK_DIRECTORY, |
2748 | OPT_USE_THREADS, |
2749 | @@ -17,8 +17,8 @@ |
2750 | OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE, |
2751 | OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA, |
2752 | diff -ruN a/client/mysqldump.c b/client/mysqldump.c |
2753 | ---- a/client/mysqldump.c 2010-04-06 23:03:49.000000000 +0900 |
2754 | -+++ b/client/mysqldump.c 2010-04-30 19:41:20.000000000 +0900 |
2755 | +--- a/client/mysqldump.c |
2756 | ++++ b/client/mysqldump.c |
2757 | @@ -98,7 +98,7 @@ |
2758 | opt_complete_insert= 0, opt_drop_database= 0, |
2759 | opt_replace_into= 0, |
2760 | @@ -38,16 +38,15 @@ |
2761 | {"lines-terminated-by", OPT_LTB, |
2762 | "Lines in the output file are terminated by the given string.", |
2763 | &lines_terminated, &lines_terminated, 0, GET_STR, |
2764 | -@@ -2318,13 +2321,21 @@ |
2765 | - /* Make an sql-file, if path was given iow. option -T was given */ |
2766 | +@@ -2319,12 +2322,20 @@ |
2767 | char buff[20+FN_REFLEN]; |
2768 | MYSQL_FIELD *field; |
2769 | -+ |
2770 | + |
2771 | + my_bool old_ignore_errors=ignore_errors; |
2772 | + //fprintf(stderr, "ignore create table %d\n", opt_ignore_show_create_table_error); |
2773 | + if (opt_ignore_show_create_table_error) |
2774 | + ignore_errors=1; |
2775 | - |
2776 | ++ |
2777 | my_snprintf(buff, sizeof(buff), "show create table %s", result_table); |
2778 | |
2779 | if (switch_character_set_results(mysql, "binary") || |
2780 | |
2781 | === modified file 'query_cache_enhance.patch' |
2782 | --- query_cache_enhance.patch 2011-05-12 11:00:37 +0000 |
2783 | +++ query_cache_enhance.patch 2011-07-27 08:44:25 +0000 |
2784 | @@ -5,9 +5,9 @@ |
2785 | #!!! notice !!! |
2786 | # Any small change to this file in the main branch |
2787 | # should be done or reviewed by the maintainer! |
2788 | -diff -ruN a/patch_info/query_cache_enhance.patch b/patch_info/query_cache_enhance.patch |
2789 | ---- a/patch_info/query_cache_enhance.patch 1970-01-01 03:00:00.000000000 +0300 |
2790 | -+++ b/patch_info/query_cache_enhance.patch 2010-07-21 01:42:09.650424002 +0400 |
2791 | +diff -ruN /dev/null b/patch_info/query_cache_enhance.patch |
2792 | +--- /dev/null |
2793 | ++++ b/patch_info/query_cache_enhance.patch |
2794 | @@ -0,0 +1,14 @@ |
2795 | +File=query_cache_enhance.patch |
2796 | +Name= query cache Percona's cumulative patch |
2797 | @@ -24,9 +24,9 @@ |
2798 | +2010-07 - Fix incorrect behavior diff (query_cache_with_comments.patch) |
2799 | +2010-09 - Merge patches to one |
2800 | diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc |
2801 | ---- a/sql/mysqld.cc 2010-07-28 16:47:41.134069529 +0400 |
2802 | -+++ b/sql/mysqld.cc 2010-07-28 16:47:41.704071184 +0400 |
2803 | -@@ -526,6 +526,7 @@ |
2804 | +--- a/sql/mysqld.cc |
2805 | ++++ b/sql/mysqld.cc |
2806 | +@@ -527,6 +527,7 @@ |
2807 | my_bool opt_log_slow_slave_statements= 0; |
2808 | my_bool opt_log_slow_sp_statements= 0; |
2809 | my_bool opt_log_slow_timestamp_every= 0; |
2810 | @@ -34,7 +34,7 @@ |
2811 | my_bool opt_use_global_long_query_time= 0; |
2812 | my_bool opt_slow_query_log_microseconds_timestamp= 0; |
2813 | my_bool lower_case_file_system= 0; |
2814 | -@@ -5898,6 +5899,7 @@ |
2815 | +@@ -5900,6 +5901,7 @@ |
2816 | OPT_THREAD_STATISTICS, |
2817 | OPT_OPTIMIZER_FIX, |
2818 | OPT_SUPPRESS_LOG_WARNING_1592, |
2819 | @@ -42,7 +42,7 @@ |
2820 | OPT_USE_GLOBAL_LONG_QUERY_TIME, |
2821 | OPT_USE_GLOBAL_LOG_SLOW_CONTROL, |
2822 | OPT_SLOW_QUERY_LOG_MICROSECONDS_TIMESTAMP, |
2823 | -@@ -6953,6 +6955,10 @@ |
2824 | +@@ -6955,6 +6957,10 @@ |
2825 | {"use_global_log_slow_control", OPT_USE_GLOBAL_LOG_SLOW_CONTROL, |
2826 | "Choose flags, wich always use the global variables. Multiple flags allowed in a comma-separated string. [none, log_slow_filter, log_slow_rate_limit, log_slow_verbosity, long_query_time, min_examined_row_limit, all]", |
2827 | 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, SLOG_UG_NONE, 0, 0}, |
2828 | @@ -54,8 +54,8 @@ |
2829 | "Control always use global long_query_time or local long_query_time.", |
2830 | (uchar**) &opt_use_global_long_query_time, (uchar**) &opt_use_global_long_query_time, |
2831 | diff -ruN a/sql/mysql_priv.h b/sql/mysql_priv.h |
2832 | ---- a/sql/mysql_priv.h 2010-07-28 16:47:41.144071083 +0400 |
2833 | -+++ b/sql/mysql_priv.h 2010-07-28 16:47:41.714068826 +0400 |
2834 | +--- a/sql/mysql_priv.h |
2835 | ++++ b/sql/mysql_priv.h |
2836 | @@ -2118,6 +2118,7 @@ |
2837 | extern my_bool opt_log_slow_admin_statements, opt_log_slow_slave_statements; |
2838 | extern my_bool opt_log_slow_sp_statements; |
2839 | @@ -64,9 +64,9 @@ |
2840 | extern my_bool opt_use_global_long_query_time; |
2841 | extern my_bool opt_slow_query_log_microseconds_timestamp; |
2842 | extern my_bool sp_automatic_privileges, opt_noacl; |
2843 | -diff -ruN a/sql/query_strip_comments.h b/sql/query_strip_comments.h |
2844 | ---- a/sql/query_strip_comments.h 1970-01-01 03:00:00.000000000 +0300 |
2845 | -+++ b/sql/query_strip_comments.h 2010-07-28 16:47:41.724072335 +0400 |
2846 | +diff -ruN /dev/null b/sql/query_strip_comments.h |
2847 | +--- /dev/null |
2848 | ++++ b/sql/query_strip_comments.h |
2849 | @@ -0,0 +1,37 @@ |
2850 | +#ifndef _SQL_QUERY_STRIPC_COMMENTS_H_ |
2851 | +#define _SQL_QUERY_STRIPC_COMMENTS_H_ |
2852 | @@ -106,8 +106,8 @@ |
2853 | +#endif // HAVE_QUERY_CACHE |
2854 | +#endif // _SQL_QUERY_STRIPC_COMMENTS_H_ |
2855 | diff -ruN a/sql/set_var.cc b/sql/set_var.cc |
2856 | ---- a/sql/set_var.cc 2010-07-28 16:47:41.124069093 +0400 |
2857 | -+++ b/sql/set_var.cc 2010-07-28 16:47:41.734068580 +0400 |
2858 | +--- a/sql/set_var.cc |
2859 | ++++ b/sql/set_var.cc |
2860 | @@ -124,8 +124,10 @@ |
2861 | static void fix_net_write_timeout(THD *thd, enum_var_type type); |
2862 | static void fix_net_retry_count(THD *thd, enum_var_type type); |
2863 | @@ -137,15 +137,12 @@ |
2864 | + &query_cache_size, |
2865 | + fix_query_cache_size); |
2866 | static sys_var_long_ptr sys_query_cache_limit(&vars, "query_cache_limit", |
2867 | -- &query_cache.query_cache_limit); |
2868 | + &query_cache.query_cache_limit); |
2869 | -static sys_var_long_ptr sys_query_cache_min_res_unit(&vars, "query_cache_min_res_unit", |
2870 | -- &query_cache_min_res_unit, |
2871 | -- fix_query_cache_min_res_unit); |
2872 | -+ &query_cache.query_cache_limit); |
2873 | +static sys_var_long_ptr |
2874 | + sys_query_cache_min_res_unit(&vars, "query_cache_min_res_unit", |
2875 | -+ &query_cache_min_res_unit, |
2876 | -+ fix_query_cache_min_res_unit); |
2877 | + &query_cache_min_res_unit, |
2878 | + fix_query_cache_min_res_unit); |
2879 | +static int check_query_cache_type(THD *thd, set_var *var); |
2880 | static sys_var_thd_enum sys_query_cache_type(&vars, "query_cache_type", |
2881 | &SV::query_cache_type, |
2882 | @@ -164,7 +161,7 @@ |
2883 | static sys_var_const_str_ptr sys_repl_report_password(&vars, "report_password", &report_password); |
2884 | |
2885 | static uchar *slave_get_report_port(THD *thd) |
2886 | -@@ -1250,10 +1257,9 @@ |
2887 | +@@ -1255,10 +1262,9 @@ |
2888 | {} |
2889 | #endif /* HAVE_REPLICATION */ |
2890 | |
2891 | @@ -176,7 +173,7 @@ |
2892 | ulong new_cache_size= query_cache.resize(query_cache_size); |
2893 | |
2894 | /* |
2895 | -@@ -1267,11 +1273,35 @@ |
2896 | +@@ -1272,11 +1278,35 @@ |
2897 | query_cache_size, new_cache_size); |
2898 | |
2899 | query_cache_size= new_cache_size; |
2900 | @@ -214,7 +211,7 @@ |
2901 | static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type) |
2902 | { |
2903 | query_cache_min_res_unit= |
2904 | -@@ -3629,6 +3659,16 @@ |
2905 | +@@ -3634,6 +3664,16 @@ |
2906 | Functions to handle SET mysql_internal_variable=const_expr |
2907 | *****************************************************************************/ |
2908 | |
2909 | @@ -232,8 +229,8 @@ |
2910 | { |
2911 | if (var->is_readonly()) |
2912 | diff -ruN a/sql/sql_cache.cc b/sql/sql_cache.cc |
2913 | ---- a/sql/sql_cache.cc 2010-07-28 16:47:41.134069529 +0400 |
2914 | -+++ b/sql/sql_cache.cc 2010-07-28 16:47:41.754069731 +0400 |
2915 | +--- a/sql/sql_cache.cc |
2916 | ++++ b/sql/sql_cache.cc |
2917 | @@ -286,6 +286,7 @@ |
2918 | if (and only if) this query has a registered result set writer |
2919 | (thd->net.query_cache_query). |
2920 | @@ -510,16 +507,10 @@ |
2921 | goto err; |
2922 | |
2923 | if (!thd->lex->safe_to_cache_query) |
2924 | -@@ -1426,21 +1621,103 @@ |
2925 | +@@ -1426,6 +1621,87 @@ |
2926 | |
2927 | { |
2928 | uint i= 0; |
2929 | -- /* |
2930 | -- Skip '(' characters in queries like following: |
2931 | -- (select a from t1) union (select a from t1); |
2932 | -- */ |
2933 | -- while (sql[i]=='(') |
2934 | -- i++; |
2935 | + if(opt_query_cache_strip_comments) |
2936 | + { |
2937 | + /* Skip all comments and non-letter symbols */ |
2938 | @@ -601,32 +592,17 @@ |
2939 | + } |
2940 | + else // if(opt_query_cache_strip_comments) |
2941 | + { |
2942 | -+ /* |
2943 | -+ Skip '(' characters in queries like following: |
2944 | -+ (select a from t1) union (select a from t1); |
2945 | -+ */ |
2946 | -+ while (sql[i]=='(') |
2947 | -+ i++; |
2948 | + /* |
2949 | + Skip '(' characters in queries like following: |
2950 | + (select a from t1) union (select a from t1); |
2951 | +@@ -1433,6 +1709,7 @@ |
2952 | + while (sql[i]=='(') |
2953 | + i++; |
2954 | |
2955 | -- /* |
2956 | -- Test if the query is a SELECT |
2957 | -- (pre-space is removed in dispatch_command). |
2958 | + } // if(opt_query_cache_strip_comments) |
2959 | -+ /* |
2960 | -+ Test if the query is a SELECT |
2961 | -+ (pre-space is removed in dispatch_command). |
2962 | - |
2963 | -- First '/' looks like comment before command it is not |
2964 | -- frequently appeared in real life, consequently we can |
2965 | -- check all such queries, too. |
2966 | -- */ |
2967 | -+ First '/' looks like comment before command it is not |
2968 | -+ frequently appeared in real life, consequently we can |
2969 | -+ check all such queries, too. |
2970 | -+ */ |
2971 | - if ((my_toupper(system_charset_info, sql[i]) != 'S' || |
2972 | - my_toupper(system_charset_info, sql[i + 1]) != 'E' || |
2973 | - my_toupper(system_charset_info, sql[i + 2]) != 'L') && |
2974 | + /* |
2975 | + Test if the query is a SELECT |
2976 | + (pre-space is removed in dispatch_command). |
2977 | @@ -1449,7 +1726,6 @@ |
2978 | DBUG_PRINT("qcache", ("The statement is not a SELECT; Not cached")); |
2979 | goto err; |
2980 | @@ -689,17 +665,15 @@ |
2981 | for (; tables_used; tables_used= tables_used->next_local) |
2982 | { |
2983 | thd_proc_info(thd, "invalidating query cache entries (table)"); |
2984 | -@@ -1804,7 +2096,9 @@ |
2985 | +@@ -1804,6 +2096,8 @@ |
2986 | my_bool using_transactions) |
2987 | { |
2988 | DBUG_ENTER("Query_cache::invalidate (table)"); |
2989 | -- |
2990 | + if (is_disabled()) |
2991 | + DBUG_VOID_RETURN; |
2992 | -+ |
2993 | + |
2994 | using_transactions= using_transactions && |
2995 | (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)); |
2996 | - if (using_transactions && |
2997 | @@ -1821,6 +2115,8 @@ |
2998 | my_bool using_transactions) |
2999 | { |
3000 | @@ -765,8 +739,8 @@ |
3001 | #endif /*HAVE_QUERY_CACHE*/ |
3002 | + |
3003 | diff -ruN a/sql/sql_class.h b/sql/sql_class.h |
3004 | ---- a/sql/sql_class.h 2010-07-28 16:47:41.134069529 +0400 |
3005 | -+++ b/sql/sql_class.h 2010-07-28 16:47:41.764070446 +0400 |
3006 | +--- a/sql/sql_class.h |
3007 | ++++ b/sql/sql_class.h |
3008 | @@ -22,7 +22,9 @@ |
3009 | |
3010 | #include "log.h" |
3011 | @@ -778,7 +752,7 @@ |
3012 | /** |
3013 | An interface that is used to take an action when |
3014 | the locking module notices that a table version has changed |
3015 | -@@ -667,6 +669,9 @@ |
3016 | +@@ -670,6 +672,9 @@ |
3017 | */ |
3018 | LEX_STRING query_string; |
3019 | Server_side_cursor *cursor; |
3020 | @@ -788,9 +762,9 @@ |
3021 | |
3022 | inline char *query() { return query_string.str; } |
3023 | inline uint32 query_length() { return query_string.length; } |
3024 | -diff -ruN a/mysql-test/r/query_cache_disabled.result b/mysql-test/r/query_cache_disabled.result |
3025 | ---- a/mysql-test/r/query_cache_disabled.result 1970-01-01 03:00:00.000000000 +0300 |
3026 | -+++ b/mysql-test/r/query_cache_disabled.result 2010-07-31 20:44:34.764016531 +0400 |
3027 | +diff -ruN /dev/null b/mysql-test/r/query_cache_disabled.result |
3028 | +--- /dev/null |
3029 | ++++ b/mysql-test/r/query_cache_disabled.result |
3030 | @@ -0,0 +1,14 @@ |
3031 | +SHOW GLOBAL VARIABLES LIKE 'query_cache_type'; |
3032 | +Variable_name Value |
3033 | @@ -806,14 +780,14 @@ |
3034 | +Variable_name Value |
3035 | +query_cache_size 1048576 |
3036 | +SET GLOBAL query_cache_size=0; |
3037 | -diff -ruN a/mysql-test/t/query_cache_disabled-master.opt b/mysql-test/t/query_cache_disabled-master.opt |
3038 | ---- a/mysql-test/t/query_cache_disabled-master.opt 1970-01-01 03:00:00.000000000 +0300 |
3039 | -+++ b/mysql-test/t/query_cache_disabled-master.opt 2010-07-31 20:41:47.184017514 +0400 |
3040 | +diff -ruN /dev/null b/mysql-test/t/query_cache_disabled-master.opt |
3041 | +--- /dev/null |
3042 | ++++ b/mysql-test/t/query_cache_disabled-master.opt |
3043 | @@ -0,0 +1 @@ |
3044 | +--query_cache_type=0 |
3045 | -diff -ruN a/mysql-test/t/query_cache_disabled.test b/mysql-test/t/query_cache_disabled.test |
3046 | ---- a/mysql-test/t/query_cache_disabled.test 1970-01-01 03:00:00.000000000 +0300 |
3047 | -+++ b/mysql-test/t/query_cache_disabled.test 2010-07-31 20:41:47.184017514 +0400 |
3048 | +diff -ruN /dev/null b/mysql-test/t/query_cache_disabled.test |
3049 | +--- /dev/null |
3050 | ++++ b/mysql-test/t/query_cache_disabled.test |
3051 | @@ -0,0 +1,15 @@ |
3052 | +-- source include/have_query_cache.inc |
3053 | +# |
3054 | @@ -831,8 +805,8 @@ |
3055 | +SET GLOBAL query_cache_size=0; |
3056 | + |
3057 | diff -ruN a/sql/set_var.h b/sql/set_var.h |
3058 | ---- a/sql/set_var.h 2010-07-31 20:42:00.884030418 +0400 |
3059 | -+++ b/sql/set_var.h 2010-07-31 20:41:47.224016185 +0400 |
3060 | +--- a/sql/set_var.h |
3061 | ++++ b/sql/set_var.h |
3062 | @@ -521,10 +521,16 @@ |
3063 | { chain_sys_var(chain); } |
3064 | bool check(THD *thd, set_var *var) |
3065 | @@ -855,8 +829,8 @@ |
3066 | bool update(THD *thd, set_var *var); |
3067 | void set_default(THD *thd, enum_var_type type); |
3068 | diff -ruN a/sql/share/errmsg.txt b/sql/share/errmsg.txt |
3069 | ---- a/sql/share/errmsg.txt 2010-07-09 16:35:08.000000000 +0400 |
3070 | -+++ b/sql/share/errmsg.txt 2010-07-31 20:41:47.244015659 +0400 |
3071 | +--- a/sql/share/errmsg.txt |
3072 | ++++ b/sql/share/errmsg.txt |
3073 | @@ -6213,3 +6213,8 @@ |
3074 | ER_DEBUG_SYNC_HIT_LIMIT |
3075 | eng "debug sync point hit limit reached" |
3076 | @@ -867,8 +841,8 @@ |
3077 | + eng "Query cache is disabled; restart the server with query_cache_type=1 to enable it" |
3078 | + |
3079 | diff -ruN a/sql/sql_cache.h b/sql/sql_cache.h |
3080 | ---- a/sql/sql_cache.h 2010-07-09 16:35:15.000000000 +0400 |
3081 | -+++ b/sql/sql_cache.h 2010-07-31 20:41:47.264017369 +0400 |
3082 | +--- a/sql/sql_cache.h |
3083 | ++++ b/sql/sql_cache.h |
3084 | @@ -279,8 +279,11 @@ |
3085 | enum Cache_lock_status { UNLOCKED, LOCKED_NO_WAIT, LOCKED }; |
3086 | Cache_lock_status m_cache_lock_status; |
3087 | |
3088 | === renamed file 'response-time-distribution.patch' => 'response_time_distribution.patch' |
3089 | --- response-time-distribution.patch 2011-07-20 03:48:37 +0000 |
3090 | +++ response_time_distribution.patch 2011-07-27 08:44:25 +0000 |
3091 | @@ -5,28 +5,3863 @@ |
3092 | #!!! notice !!! |
3093 | # Any small change to this file in the main branch |
3094 | # should be done or reviewed by the maintainer! |
3095 | +diff -ruN a/configure.in b/configure.in |
3096 | +--- a/configure.in |
3097 | ++++ b/configure.in |
3098 | +@@ -1738,6 +1738,7 @@ |
3099 | + int main() |
3100 | + { |
3101 | + int foo= -10; int bar= 10; |
3102 | ++ long long int foo64= -10; long long int bar64= 10; |
3103 | + if (!__sync_fetch_and_add(&foo, bar) || foo) |
3104 | + return -1; |
3105 | + bar= __sync_lock_test_and_set(&foo, bar); |
3106 | +@@ -1746,6 +1747,14 @@ |
3107 | + bar= __sync_val_compare_and_swap(&bar, foo, 15); |
3108 | + if (bar) |
3109 | + return -1; |
3110 | ++ if (!__sync_fetch_and_add(&foo64, bar64) || foo64) |
3111 | ++ return -1; |
3112 | ++ bar64= __sync_lock_test_and_set(&foo64, bar64); |
3113 | ++ if (bar64 || foo64 != 10) |
3114 | ++ return -1; |
3115 | ++ bar64= __sync_val_compare_and_swap(&bar64, foo, 15); |
3116 | ++ if (bar64) |
3117 | ++ return -1; |
3118 | + return 0; |
3119 | + } |
3120 | + ], [mysql_cv_gcc_atomic_builtins=yes], |
3121 | +@@ -1757,6 +1766,46 @@ |
3122 | + [Define to 1 if compiler provides atomic builtins.]) |
3123 | + fi |
3124 | + |
3125 | ++AC_CACHE_CHECK([whether the OS provides atomic_* functions like Solaris], |
3126 | ++ [mysql_cv_solaris_atomic], |
3127 | ++ [AC_RUN_IFELSE( |
3128 | ++ [AC_LANG_PROGRAM( |
3129 | ++ [[ |
3130 | ++ #include <atomic.h> |
3131 | ++ ]], |
3132 | ++ [[ |
3133 | ++ int foo = -10; int bar = 10; |
3134 | ++ int64_t foo64 = -10; int64_t bar64 = 10; |
3135 | ++ if (atomic_add_int_nv((uint_t *)&foo, bar) || foo) |
3136 | ++ return -1; |
3137 | ++ bar = atomic_swap_uint((uint_t *)&foo, (uint_t)bar); |
3138 | ++ if (bar || foo != 10) |
3139 | ++ return -1; |
3140 | ++ bar = atomic_cas_uint((uint_t *)&bar, (uint_t)foo, 15); |
3141 | ++ if (bar) |
3142 | ++ return -1; |
3143 | ++ if (atomic_add_64_nv((volatile uint64_t *)&foo64, bar64) || foo64) |
3144 | ++ return -1; |
3145 | ++ bar64 = atomic_swap_64((volatile uint64_t *)&foo64, (uint64_t)bar64); |
3146 | ++ if (bar64 || foo64 != 10) |
3147 | ++ return -1; |
3148 | ++ bar64 = atomic_cas_64((volatile uint64_t *)&bar64, (uint_t)foo64, 15); |
3149 | ++ if (bar64) |
3150 | ++ return -1; |
3151 | ++ atomic_or_64((volatile uint64_t *)&bar64, 0); |
3152 | ++ return 0; |
3153 | ++ ]] |
3154 | ++ )], |
3155 | ++ [mysql_cv_solaris_atomic=yes], |
3156 | ++ [mysql_cv_solaris_atomic=no], |
3157 | ++ [mysql_cv_solaris_atomic=no] |
3158 | ++)]) |
3159 | ++ |
3160 | ++if test "x$mysql_cv_solaris_atomic" = xyes; then |
3161 | ++ AC_DEFINE(HAVE_SOLARIS_ATOMIC, 1, |
3162 | ++ [Define to 1 if OS provides atomic_* functions like Solaris.]) |
3163 | ++fi |
3164 | ++ |
3165 | + # Force static compilation to avoid linking problems/get more speed |
3166 | + AC_ARG_WITH(mysqld-ldflags, |
3167 | + [ --with-mysqld-ldflags Extra linking arguments for mysqld], |
3168 | +@@ -2687,7 +2736,16 @@ |
3169 | + AC_SUBST(readline_link) |
3170 | + AC_SUBST(readline_h_ln_cmd) |
3171 | + |
3172 | ++AC_ARG_WITH(response_time_distribution, |
3173 | ++ AC_HELP_STRING([--without-response_time_distribution],[Disable response_time_distribution feature.]), |
3174 | ++ [with_response_time_distribution=$withval], |
3175 | ++ [with_response_time_distribution=yes] |
3176 | ++) |
3177 | + |
3178 | ++if test "$with_response_time_distribution" = "yes" |
3179 | ++then |
3180 | ++ AC_DEFINE([HAVE_RESPONSE_TIME_DISTRIBUTION], [1], [If we want to have response_time_distribution]) |
3181 | ++fi |
3182 | + |
3183 | + # Include man pages, if desired, adapted to the configured parts. |
3184 | + if test X"$with_man" = Xyes |
3185 | +diff -ruN /dev/null b/include/atomic/gcc_builtins.h |
3186 | +--- /dev/null |
3187 | ++++ b/include/atomic/gcc_builtins.h |
3188 | +@@ -0,0 +1,42 @@ |
3189 | ++#ifndef ATOMIC_GCC_BUILTINS_INCLUDED |
3190 | ++#define ATOMIC_GCC_BUILTINS_INCLUDED |
3191 | ++ |
3192 | ++/* Copyright (C) 2008 MySQL AB |
3193 | ++ |
3194 | ++ This program is free software; you can redistribute it and/or modify |
3195 | ++ it under the terms of the GNU General Public License as published by |
3196 | ++ the Free Software Foundation; version 2 of the License. |
3197 | ++ |
3198 | ++ This program is distributed in the hope that it will be useful, |
3199 | ++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
3200 | ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3201 | ++ GNU General Public License for more details. |
3202 | ++ |
3203 | ++ You should have received a copy of the GNU General Public License |
3204 | ++ along with this program; if not, write to the Free Software |
3205 | ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
3206 | ++ |
3207 | ++#define make_atomic_add_body(S) \ |
3208 | ++ v= __sync_fetch_and_add(a, v); |
3209 | ++#define make_atomic_fas_body(S) \ |
3210 | ++ v= __sync_lock_test_and_set(a, v); |
3211 | ++#define make_atomic_cas_body(S) \ |
3212 | ++ int ## S sav; \ |
3213 | ++ int ## S cmp_val= *cmp; \ |
3214 | ++ sav= __sync_val_compare_and_swap(a, cmp_val, set);\ |
3215 | ++ if (!(ret= (sav == cmp_val))) *cmp= sav |
3216 | ++ |
3217 | ++#ifdef MY_ATOMIC_MODE_DUMMY |
3218 | ++#define make_atomic_load_body(S) ret= *a |
3219 | ++#define make_atomic_store_body(S) *a= v |
3220 | ++#define MY_ATOMIC_MODE "gcc-builtins-up" |
3221 | ++ |
3222 | ++#else |
3223 | ++#define MY_ATOMIC_MODE "gcc-builtins-smp" |
3224 | ++#define make_atomic_load_body(S) \ |
3225 | ++ ret= __sync_fetch_and_or(a, 0); |
3226 | ++#define make_atomic_store_body(S) \ |
3227 | ++ (void) __sync_lock_test_and_set(a, v); |
3228 | ++#endif |
3229 | ++ |
3230 | ++#endif /* ATOMIC_GCC_BUILTINS_INCLUDED */ |
3231 | +diff -ruN /dev/null b/include/atomic/generic-msvc.h |
3232 | +--- /dev/null |
3233 | ++++ b/include/atomic/generic-msvc.h |
3234 | +@@ -0,0 +1,134 @@ |
3235 | ++/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. |
3236 | ++ |
3237 | ++ This program is free software; you can redistribute it and/or modify |
3238 | ++ it under the terms of the GNU General Public License as published by |
3239 | ++ the Free Software Foundation; version 2 of the License. |
3240 | ++ |
3241 | ++ This program is distributed in the hope that it will be useful, |
3242 | ++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
3243 | ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3244 | ++ GNU General Public License for more details. |
3245 | ++ |
3246 | ++ You should have received a copy of the GNU General Public License |
3247 | ++ along with this program; if not, write to the Free Software |
3248 | ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
3249 | ++ |
3250 | ++#ifndef _atomic_h_cleanup_ |
3251 | ++#define _atomic_h_cleanup_ "atomic/generic-msvc.h" |
3252 | ++ |
3253 | ++/* |
3254 | ++ We don't implement anything specific for MY_ATOMIC_MODE_DUMMY, always use |
3255 | ++ intrinsics. |
3256 | ++ 8 and 16-bit atomics are not implemented, but it can be done if necessary. |
3257 | ++*/ |
3258 | ++#undef MY_ATOMIC_HAS_8_16 |
3259 | ++ |
3260 | ++#include <windows.h> |
3261 | ++/* |
3262 | ++ x86 compilers (both VS2003 or VS2005) never use instrinsics, but generate |
3263 | ++ function calls to kernel32 instead, even in the optimized build. |
3264 | ++ We force intrinsics as described in MSDN documentation for |
3265 | ++ _InterlockedCompareExchange. |
3266 | ++*/ |
3267 | ++#ifdef _M_IX86 |
3268 | ++ |
3269 | ++#if (_MSC_VER >= 1500) |
3270 | ++#include <intrin.h> |
3271 | ++#else |
3272 | ++C_MODE_START |
3273 | ++/*Visual Studio 2003 and earlier do not have prototypes for atomic intrinsics*/ |
3274 | ++LONG _InterlockedCompareExchange (LONG volatile *Target, LONG Value, LONG Comp); |
3275 | ++LONGLONG _InterlockedCompareExchange64 (LONGLONG volatile *Target, |
3276 | ++ LONGLONG Value, LONGLONG Comp); |
3277 | ++C_MODE_END |
3278 | ++ |
3279 | ++#pragma intrinsic(_InterlockedCompareExchange) |
3280 | ++#pragma intrinsic(_InterlockedCompareExchange64) |
3281 | ++#endif |
3282 | ++ |
3283 | ++#define InterlockedCompareExchange _InterlockedCompareExchange |
3284 | ++#define InterlockedCompareExchange64 _InterlockedCompareExchange64 |
3285 | ++/* |
3286 | ++ No need to do something special for InterlockedCompareExchangePointer |
3287 | ++ as it is a #define to InterlockedCompareExchange. The same applies to |
3288 | ++ InterlockedExchangePointer. |
3289 | ++*/ |
3290 | ++#endif /*_M_IX86*/ |
3291 | ++ |
3292 | ++#define MY_ATOMIC_MODE "msvc-intrinsics" |
3293 | ++/* Implement using CAS on WIN32 */ |
3294 | ++#define IL_COMP_EXCHG32(X,Y,Z) \ |
3295 | ++ InterlockedCompareExchange((volatile LONG *)(X),(Y),(Z)) |
3296 | ++#define IL_COMP_EXCHG64(X,Y,Z) \ |
3297 | ++ InterlockedCompareExchange64((volatile LONGLONG *)(X), \ |
3298 | ++ (LONGLONG)(Y),(LONGLONG)(Z)) |
3299 | ++#define IL_COMP_EXCHGptr InterlockedCompareExchangePointer |
3300 | ++ |
3301 | ++#define make_atomic_cas_body(S) \ |
3302 | ++ int ## S initial_cmp= *cmp; \ |
3303 | ++ int ## S initial_a= IL_COMP_EXCHG ## S (a, set, initial_cmp); \ |
3304 | ++ if (!(ret= (initial_a == initial_cmp))) *cmp= initial_a; |
3305 | ++ |
3306 | ++#ifndef _M_IX86 |
3307 | ++/* Use full set of optimised functions on WIN64 */ |
3308 | ++#define IL_EXCHG_ADD32(X,Y) \ |
3309 | ++ InterlockedExchangeAdd((volatile LONG *)(X),(Y)) |
3310 | ++#define IL_EXCHG_ADD64(X,Y) \ |
3311 | ++ InterlockedExchangeAdd64((volatile LONGLONG *)(X),(LONGLONG)(Y)) |
3312 | ++#define IL_EXCHG32(X,Y) \ |
3313 | ++ InterlockedExchange((volatile LONG *)(X),(Y)) |
3314 | ++#define IL_EXCHG64(X,Y) \ |
3315 | ++ InterlockedExchange64((volatile LONGLONG *)(X),(LONGLONG)(Y)) |
3316 | ++#define IL_EXCHGptr InterlockedExchangePointer |
3317 | ++ |
3318 | ++#define make_atomic_add_body(S) \ |
3319 | ++ v= IL_EXCHG_ADD ## S (a, v) |
3320 | ++#define make_atomic_swap_body(S) \ |
3321 | ++ v= IL_EXCHG ## S (a, v) |
3322 | ++#define make_atomic_load_body(S) \ |
3323 | ++ ret= 0; /* avoid compiler warning */ \ |
3324 | ++ ret= IL_COMP_EXCHG ## S (a, ret, ret); |
3325 | ++#endif |
3326 | ++/* |
3327 | ++ my_yield_processor (equivalent of x86 PAUSE instruction) should be used |
3328 | ++ to improve performance on hyperthreaded CPUs. Intel recommends to use it in |
3329 | ++ spin loops also on non-HT machines to reduce power consumption (see e.g |
3330 | ++ http://softwarecommunity.intel.com/articles/eng/2004.htm) |
3331 | ++ |
3332 | ++ Running benchmarks for spinlocks implemented with InterlockedCompareExchange |
3333 | ++ and YieldProcessor shows that much better performance is achieved by calling |
3334 | ++ YieldProcessor in a loop - that is, yielding longer. On Intel boxes setting |
3335 | ++ loop count in the range 200-300 brought best results. |
3336 | ++ */ |
3337 | ++#ifndef YIELD_LOOPS |
3338 | ++#define YIELD_LOOPS 200 |
3339 | ++#endif |
3340 | ++ |
3341 | ++static __inline int my_yield_processor() |
3342 | ++{ |
3343 | ++ int i; |
3344 | ++ for(i=0; i<YIELD_LOOPS; i++) |
3345 | ++ { |
3346 | ++#if (_MSC_VER <= 1310) |
3347 | ++ /* On older compilers YieldProcessor is not available, use inline assembly*/ |
3348 | ++ __asm { rep nop } |
3349 | ++#else |
3350 | ++ YieldProcessor(); |
3351 | ++#endif |
3352 | ++ } |
3353 | ++ return 1; |
3354 | ++} |
3355 | ++ |
3356 | ++#define LF_BACKOFF my_yield_processor() |
3357 | ++#else /* cleanup */ |
3358 | ++ |
3359 | ++#undef IL_EXCHG_ADD32 |
3360 | ++#undef IL_EXCHG_ADD64 |
3361 | ++#undef IL_COMP_EXCHG32 |
3362 | ++#undef IL_COMP_EXCHG64 |
3363 | ++#undef IL_COMP_EXCHGptr |
3364 | ++#undef IL_EXCHG32 |
3365 | ++#undef IL_EXCHG64 |
3366 | ++#undef IL_EXCHGptr |
3367 | ++ |
3368 | ++#endif |
3369 | +diff -ruN /dev/null b/include/atomic/nolock.h |
3370 | +--- /dev/null |
3371 | ++++ b/include/atomic/nolock.h |
3372 | +@@ -0,0 +1,69 @@ |
3373 | ++#ifndef ATOMIC_NOLOCK_INCLUDED |
3374 | ++#define ATOMIC_NOLOCK_INCLUDED |
3375 | ++ |
3376 | ++/* Copyright (C) 2006 MySQL AB |
3377 | ++ |
3378 | ++ This program is free software; you can redistribute it and/or modify |
3379 | ++ it under the terms of the GNU General Public License as published by |
3380 | ++ the Free Software Foundation; version 2 of the License. |
3381 | ++ |
3382 | ++ This program is distributed in the hope that it will be useful, |
3383 | ++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
3384 | ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3385 | ++ GNU General Public License for more details. |
3386 | ++ |
3387 | ++ You should have received a copy of the GNU General Public License |
3388 | ++ along with this program; if not, write to the Free Software |
3389 | ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
3390 | ++ |
3391 | ++#if defined(__i386__) || defined(_MSC_VER) || defined(__x86_64__) \ |
3392 | ++ || defined(HAVE_GCC_ATOMIC_BUILTINS) \ |
3393 | ++ || defined(HAVE_SOLARIS_ATOMIC) |
3394 | ++ |
3395 | ++# ifdef MY_ATOMIC_MODE_DUMMY |
3396 | ++# define LOCK_prefix "" |
3397 | ++# else |
3398 | ++# define LOCK_prefix "lock" |
3399 | ++# endif |
3400 | ++/* |
3401 | ++ We choose implementation as follows: |
3402 | ++ ------------------------------------ |
3403 | ++ On Windows using Visual C++ the native implementation should be |
3404 | ++ preferrable. When using gcc we prefer the Solaris implementation |
3405 | ++ before the gcc because of stability preference, we choose gcc |
3406 | ++ builtins if available, otherwise we choose the somewhat broken |
3407 | ++ native x86 implementation. If neither Visual C++ or gcc we still |
3408 | ++ choose the Solaris implementation on Solaris (mainly for SunStudio |
3409 | ++ compilers). |
3410 | ++*/ |
3411 | ++# if defined(_MSV_VER) |
3412 | ++# include "generic-msvc.h" |
3413 | ++# elif __GNUC__ |
3414 | ++# if defined(HAVE_SOLARIS_ATOMIC) |
3415 | ++# include "solaris.h" |
3416 | ++# elif defined(HAVE_GCC_ATOMIC_BUILTINS) |
3417 | ++# include "gcc_builtins.h" |
3418 | ++# elif defined(__i386__) || defined(__x86_64__) |
3419 | ++# include "x86-gcc.h" |
3420 | ++# endif |
3421 | ++# elif defined(HAVE_SOLARIS_ATOMIC) |
3422 | ++# include "solaris.h" |
3423 | ++# endif |
3424 | ++#endif |
3425 | ++ |
3426 | ++#if defined(make_atomic_cas_body) |
3427 | ++/* |
3428 | ++ Type not used so minimal size (emptry struct has different size between C |
3429 | ++ and C++, zero-length array is gcc-specific). |
3430 | ++*/ |
3431 | ++typedef char my_atomic_rwlock_t __attribute__ ((unused)); |
3432 | ++#define my_atomic_rwlock_destroy(name) |
3433 | ++#define my_atomic_rwlock_init(name) |
3434 | ++#define my_atomic_rwlock_rdlock(name) |
3435 | ++#define my_atomic_rwlock_wrlock(name) |
3436 | ++#define my_atomic_rwlock_rdunlock(name) |
3437 | ++#define my_atomic_rwlock_wrunlock(name) |
3438 | ++ |
3439 | ++#endif |
3440 | ++ |
3441 | ++#endif /* ATOMIC_NOLOCK_INCLUDED */ |
3442 | +diff -ruN /dev/null b/include/atomic/rwlock.h |
3443 | +--- /dev/null |
3444 | ++++ b/include/atomic/rwlock.h |
3445 | +@@ -0,0 +1,100 @@ |
3446 | ++#ifndef ATOMIC_RWLOCK_INCLUDED |
3447 | ++#define ATOMIC_RWLOCK_INCLUDED |
3448 | ++ |
3449 | ++/* Copyright (C) 2006 MySQL AB, 2009 Sun Microsystems, Inc. |
3450 | ++ |
3451 | ++ This program is free software; you can redistribute it and/or modify |
3452 | ++ it under the terms of the GNU General Public License as published by |
3453 | ++ the Free Software Foundation; version 2 of the License. |
3454 | ++ |
3455 | ++ This program is distributed in the hope that it will be useful, |
3456 | ++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
3457 | ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3458 | ++ GNU General Public License for more details. |
3459 | ++ |
3460 | ++ You should have received a copy of the GNU General Public License |
3461 | ++ along with this program; if not, write to the Free Software |
3462 | ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
3463 | ++ |
3464 | ++#define MY_ATOMIC_MODE_RWLOCKS 1 |
3465 | ++ |
3466 | ++#ifdef MY_ATOMIC_MODE_DUMMY |
3467 | ++/* |
3468 | ++ the following can never be enabled by ./configure, one need to put #define in |
3469 | ++ a source to trigger the following warning. The resulting code will be broken, |
3470 | ++ it only makes sense to do it to see now test_atomic detects broken |
3471 | ++ implementations (another way is to run a UP build on an SMP box). |
3472 | ++*/ |
3473 | ++#warning MY_ATOMIC_MODE_DUMMY and MY_ATOMIC_MODE_RWLOCKS are incompatible |
3474 | ++ |
3475 | ++typedef char my_atomic_rwlock_t; |
3476 | ++ |
3477 | ++#define my_atomic_rwlock_destroy(name) |
3478 | ++#define my_atomic_rwlock_init(name) |
3479 | ++#define my_atomic_rwlock_rdlock(name) |
3480 | ++#define my_atomic_rwlock_wrlock(name) |
3481 | ++#define my_atomic_rwlock_rdunlock(name) |
3482 | ++#define my_atomic_rwlock_wrunlock(name) |
3483 | ++#define MY_ATOMIC_MODE "dummy (non-atomic)" |
3484 | ++#else /* not MY_ATOMIC_MODE_DUMMY */ |
3485 | ++ |
3486 | ++typedef struct {pthread_mutex_t rw;} my_atomic_rwlock_t; |
3487 | ++ |
3488 | ++#ifndef SAFE_MUTEX |
3489 | ++ |
3490 | ++/* |
3491 | ++ we're using read-write lock macros but map them to mutex locks, and they're |
3492 | ++ faster. Still, having semantically rich API we can change the |
3493 | ++ underlying implementation, if necessary. |
3494 | ++*/ |
3495 | ++#define my_atomic_rwlock_destroy(name) pthread_mutex_destroy(& (name)->rw) |
3496 | ++#define my_atomic_rwlock_init(name) pthread_mutex_init(& (name)->rw, 0) |
3497 | ++#define my_atomic_rwlock_rdlock(name) pthread_mutex_lock(& (name)->rw) |
3498 | ++#define my_atomic_rwlock_wrlock(name) pthread_mutex_lock(& (name)->rw) |
3499 | ++#define my_atomic_rwlock_rdunlock(name) pthread_mutex_unlock(& (name)->rw) |
3500 | ++#define my_atomic_rwlock_wrunlock(name) pthread_mutex_unlock(& (name)->rw) |
3501 | ++ |
3502 | ++#else /* SAFE_MUTEX */ |
3503 | ++ |
3504 | ++/* |
3505 | ++ SAFE_MUTEX pollutes the compiling name space with macros |
3506 | ++ that alter pthread_mutex_t, pthread_mutex_init, etc. |
3507 | ++ Atomic operations should never use the safe mutex wrappers. |
3508 | ++ Unfortunately, there is no way to have both: |
3509 | ++ - safe mutex macros expanding pthread_mutex_lock to safe_mutex_lock |
3510 | ++ - my_atomic macros expanding to unmodified pthread_mutex_lock |
3511 | ++ inlined in the same compilation unit. |
3512 | ++ So, in case of SAFE_MUTEX, a function call is required. |
3513 | ++ Given that SAFE_MUTEX is a debugging facility, |
3514 | ++ this extra function call is not a performance concern for |
3515 | ++ production builds. |
3516 | ++*/ |
3517 | ++C_MODE_START |
3518 | ++extern void plain_pthread_mutex_init(safe_mutex_t *); |
3519 | ++extern void plain_pthread_mutex_destroy(safe_mutex_t *); |
3520 | ++extern void plain_pthread_mutex_lock(safe_mutex_t *); |
3521 | ++extern void plain_pthread_mutex_unlock(safe_mutex_t *); |
3522 | ++C_MODE_END |
3523 | ++ |
3524 | ++#define my_atomic_rwlock_destroy(name) plain_pthread_mutex_destroy(&(name)->rw) |
3525 | ++#define my_atomic_rwlock_init(name) plain_pthread_mutex_init(&(name)->rw) |
3526 | ++#define my_atomic_rwlock_rdlock(name) plain_pthread_mutex_lock(&(name)->rw) |
3527 | ++#define my_atomic_rwlock_wrlock(name) plain_pthread_mutex_lock(&(name)->rw) |
3528 | ++#define my_atomic_rwlock_rdunlock(name) plain_pthread_mutex_unlock(&(name)->rw) |
3529 | ++#define my_atomic_rwlock_wrunlock(name) plain_pthread_mutex_unlock(&(name)->rw) |
3530 | ++ |
3531 | ++#endif /* SAFE_MUTEX */ |
3532 | ++ |
3533 | ++#define MY_ATOMIC_MODE "mutex" |
3534 | ++#ifndef MY_ATOMIC_MODE_RWLOCKS |
3535 | ++#define MY_ATOMIC_MODE_RWLOCKS 1 |
3536 | ++#endif |
3537 | ++#endif |
3538 | ++ |
3539 | ++#define make_atomic_add_body(S) int ## S sav; sav= *a; *a+= v; v=sav; |
3540 | ++#define make_atomic_fas_body(S) int ## S sav; sav= *a; *a= v; v=sav; |
3541 | ++#define make_atomic_cas_body(S) if ((ret= (*a == *cmp))) *a= set; else *cmp=*a; |
3542 | ++#define make_atomic_load_body(S) ret= *a; |
3543 | ++#define make_atomic_store_body(S) *a= v; |
3544 | ++ |
3545 | ++#endif /* ATOMIC_RWLOCK_INCLUDED */ |
3546 | +diff -ruN /dev/null b/include/atomic/solaris.h |
3547 | +--- /dev/null |
3548 | ++++ b/include/atomic/solaris.h |
3549 | +@@ -0,0 +1,72 @@ |
3550 | ++/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc |
3551 | ++ |
3552 | ++ This program is free software; you can redistribute it and/or modify |
3553 | ++ it under the terms of the GNU General Public License as published by |
3554 | ++ the Free Software Foundation; version 2 of the License. |
3555 | ++ |
3556 | ++ This program is distributed in the hope that it will be useful, |
3557 | ++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
3558 | ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3559 | ++ GNU General Public License for more details. |
3560 | ++ |
3561 | ++ You should have received a copy of the GNU General Public License |
3562 | ++ along with this program; if not, write to the Free Software |
3563 | ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
3564 | ++ |
3565 | ++#ifndef _atomic_h_cleanup_ |
3566 | ++#define _atomic_h_cleanup_ "atomic/solaris.h" |
3567 | ++ |
3568 | ++#include <atomic.h> |
3569 | ++ |
3570 | ++#define MY_ATOMIC_MODE "solaris-atomic" |
3571 | ++ |
3572 | ++#if defined(__GNUC__) |
3573 | ++#define atomic_typeof(T,V) __typeof__(V) |
3574 | ++#else |
3575 | ++#define atomic_typeof(T,V) T |
3576 | ++#endif |
3577 | ++ |
3578 | ++#define uintptr_t void * |
3579 | ++#define atomic_or_ptr_nv(X,Y) (void *)atomic_or_ulong_nv((volatile ulong_t *)X, Y) |
3580 | ++ |
3581 | ++#define make_atomic_cas_body(S) \ |
3582 | ++ atomic_typeof(uint ## S ## _t, *cmp) sav; \ |
3583 | ++ sav = atomic_cas_ ## S( \ |
3584 | ++ (volatile uint ## S ## _t *)a, \ |
3585 | ++ (uint ## S ## _t)*cmp, \ |
3586 | ++ (uint ## S ## _t)set); \ |
3587 | ++ if (! (ret= (sav == *cmp))) \ |
3588 | ++ *cmp= sav; |
3589 | ++ |
3590 | ++#define make_atomic_add_body(S) \ |
3591 | ++ int ## S nv; /* new value */ \ |
3592 | ++ nv= atomic_add_ ## S ## _nv((volatile uint ## S ## _t *)a, v); \ |
3593 | ++ v= nv - v |
3594 | ++ |
3595 | ++/* ------------------------------------------------------------------------ */ |
3596 | ++ |
3597 | ++#ifdef MY_ATOMIC_MODE_DUMMY |
3598 | ++ |
3599 | ++#define make_atomic_load_body(S) ret= *a |
3600 | ++#define make_atomic_store_body(S) *a= v |
3601 | ++ |
3602 | ++#else /* MY_ATOMIC_MODE_DUMMY */ |
3603 | ++ |
3604 | ++#define make_atomic_load_body(S) \ |
3605 | ++ ret= atomic_or_ ## S ## _nv((volatile uint ## S ## _t *)a, 0) |
3606 | ++ |
3607 | ++#define make_atomic_store_body(S) \ |
3608 | ++ (void) atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v) |
3609 | ++ |
3610 | ++#endif |
3611 | ++ |
3612 | ++#define make_atomic_fas_body(S) \ |
3613 | ++ v= atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v) |
3614 | ++ |
3615 | ++#else /* cleanup */ |
3616 | ++ |
3617 | ++#undef uintptr_t |
3618 | ++#undef atomic_or_ptr_nv |
3619 | ++ |
3620 | ++#endif |
3621 | ++ |
3622 | +diff -ruN /dev/null b/include/atomic/x86-gcc.h |
3623 | +--- /dev/null |
3624 | ++++ b/include/atomic/x86-gcc.h |
3625 | +@@ -0,0 +1,145 @@ |
3626 | ++#ifndef ATOMIC_X86_GCC_INCLUDED |
3627 | ++#define ATOMIC_X86_GCC_INCLUDED |
3628 | ++ |
3629 | ++/* Copyright (C) 2006 MySQL AB |
3630 | ++ |
3631 | ++ This program is free software; you can redistribute it and/or modify |
3632 | ++ it under the terms of the GNU General Public License as published by |
3633 | ++ the Free Software Foundation; version 2 of the License. |
3634 | ++ |
3635 | ++ This program is distributed in the hope that it will be useful, |
3636 | ++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
3637 | ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3638 | ++ GNU General Public License for more details. |
3639 | ++ |
3640 | ++ You should have received a copy of the GNU General Public License |
3641 | ++ along with this program; if not, write to the Free Software |
3642 | ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
3643 | ++ |
3644 | ++/* |
3645 | ++ XXX 64-bit atomic operations can be implemented using |
3646 | ++ cmpxchg8b, if necessary. Though I've heard that not all 64-bit |
3647 | ++ architectures support double-word (128-bit) cas. |
3648 | ++*/ |
3649 | ++ |
3650 | ++/* |
3651 | ++ No special support of 8 and 16 bit operations are implemented here |
3652 | ++ currently. |
3653 | ++*/ |
3654 | ++#undef MY_ATOMIC_HAS_8_AND_16 |
3655 | ++ |
3656 | ++#ifdef __x86_64__ |
3657 | ++# ifdef MY_ATOMIC_NO_XADD |
3658 | ++# define MY_ATOMIC_MODE "gcc-amd64" LOCK_prefix "-no-xadd" |
3659 | ++# else |
3660 | ++# define MY_ATOMIC_MODE "gcc-amd64" LOCK_prefix |
3661 | ++# endif |
3662 | ++#else |
3663 | ++# ifdef MY_ATOMIC_NO_XADD |
3664 | ++# define MY_ATOMIC_MODE "gcc-x86" LOCK_prefix "-no-xadd" |
3665 | ++# else |
3666 | ++# define MY_ATOMIC_MODE "gcc-x86" LOCK_prefix |
3667 | ++# endif |
3668 | ++#endif |
3669 | ++ |
3670 | ++/* fix -ansi errors while maintaining readability */ |
3671 | ++#ifndef asm |
3672 | ++#define asm __asm__ |
3673 | ++#endif |
3674 | ++ |
3675 | ++#ifndef MY_ATOMIC_NO_XADD |
3676 | ++#define make_atomic_add_body(S) make_atomic_add_body ## S |
3677 | ++#define make_atomic_cas_body(S) make_atomic_cas_body ## S |
3678 | ++#endif |
3679 | ++ |
3680 | ++#define make_atomic_add_body32 \ |
3681 | ++ asm volatile (LOCK_prefix "; xadd %0, %1;" \ |
3682 | ++ : "+r" (v), "=m" (*a) \ |
3683 | ++ : "m" (*a) \ |
3684 | ++ : "memory") |
3685 | ++ |
3686 | ++#define make_atomic_cas_body32 \ |
3687 | ++ __typeof__(*cmp) sav; \ |
3688 | ++ asm volatile (LOCK_prefix "; cmpxchg %3, %0; setz %2;" \ |
3689 | ++ : "=m" (*a), "=a" (sav), "=q" (ret) \ |
3690 | ++ : "r" (set), "m" (*a), "a" (*cmp) \ |
3691 | ++ : "memory"); \ |
3692 | ++ if (!ret) \ |
3693 | ++ *cmp= sav |
3694 | ++ |
3695 | ++#ifdef __x86_64__ |
3696 | ++#define make_atomic_add_body64 make_atomic_add_body32 |
3697 | ++#define make_atomic_cas_body64 make_atomic_cas_body32 |
3698 | ++ |
3699 | ++#define make_atomic_fas_body(S) \ |
3700 | ++ asm volatile ("xchg %0, %1;" \ |
3701 | ++ : "+r" (v), "=m" (*a) \ |
3702 | ++ : "m" (*a) \ |
3703 | ++ : "memory") |
3704 | ++ |
3705 | ++/* |
3706 | ++ Actually 32/64-bit reads/writes are always atomic on x86_64, |
3707 | ++ nonetheless issue memory barriers as appropriate. |
3708 | ++*/ |
3709 | ++#define make_atomic_load_body(S) \ |
3710 | ++ /* Serialize prior load and store operations. */ \ |
3711 | ++ asm volatile ("mfence" ::: "memory"); \ |
3712 | ++ ret= *a; \ |
3713 | ++ /* Prevent compiler from reordering instructions. */ \ |
3714 | ++ asm volatile ("" ::: "memory") |
3715 | ++#define make_atomic_store_body(S) \ |
3716 | ++ asm volatile ("; xchg %0, %1;" \ |
3717 | ++ : "=m" (*a), "+r" (v) \ |
3718 | ++ : "m" (*a) \ |
3719 | ++ : "memory") |
3720 | ++ |
3721 | ++#else |
3722 | ++/* |
3723 | ++ Use default implementations of 64-bit operations since we solved |
3724 | ++ the 64-bit problem on 32-bit platforms for CAS, no need to solve it |
3725 | ++ once more for ADD, LOAD, STORE and FAS as well. |
3726 | ++ Since we already added add32 support, we need to define add64 |
3727 | ++ here, but we haven't defined fas, load and store at all, so |
3728 | ++ we can fallback on default implementations. |
3729 | ++*/ |
3730 | ++#define make_atomic_add_body64 \ |
3731 | ++ int64 tmp=*a; \ |
3732 | ++ while (!my_atomic_cas64(a, &tmp, tmp+v)) ; \ |
3733 | ++ v=tmp; |
3734 | ++ |
3735 | ++/* |
3736 | ++ On some platforms (e.g. Mac OS X and Solaris) the ebx register |
3737 | ++ is held as a pointer to the global offset table. Thus we're not |
3738 | ++ allowed to use the b-register on those platforms when compiling |
3739 | ++ PIC code, to avoid this we push ebx and pop ebx. The new value |
3740 | ++ is copied directly from memory to avoid problems with a implicit |
3741 | ++ manipulation of the stack pointer by the push. |
3742 | ++ |
3743 | ++ cmpxchg8b works on both 32-bit platforms and 64-bit platforms but |
3744 | ++ the code here is only used on 32-bit platforms, on 64-bit |
3745 | ++ platforms the much simpler make_atomic_cas_body32 will work |
3746 | ++ fine. |
3747 | ++*/ |
3748 | ++#define make_atomic_cas_body64 \ |
3749 | ++ asm volatile ("push %%ebx;" \ |
3750 | ++ "movl (%%ecx), %%ebx;" \ |
3751 | ++ "movl 4(%%ecx), %%ecx;" \ |
3752 | ++ LOCK_prefix "; cmpxchg8b %0;" \ |
3753 | ++ "setz %2; pop %%ebx" \ |
3754 | ++ : "=m" (*a), "+A" (*cmp), "=c" (ret) \ |
3755 | ++ : "c" (&set), "m" (*a) \ |
3756 | ++ : "memory", "esp") |
3757 | ++#endif |
3758 | ++ |
3759 | ++/* |
3760 | ++ The implementation of make_atomic_cas_body32 is adaptable to |
3761 | ++ the OS word size, so on 64-bit platforms it will automatically |
3762 | ++ adapt to 64-bits and so it will work also on 64-bit platforms |
3763 | ++*/ |
3764 | ++#define make_atomic_cas_bodyptr make_atomic_cas_body32 |
3765 | ++ |
3766 | ++#ifdef MY_ATOMIC_MODE_DUMMY |
3767 | ++#define make_atomic_load_body(S) ret=*a |
3768 | ++#define make_atomic_store_body(S) *a=v |
3769 | ++#endif |
3770 | ++#endif /* ATOMIC_X86_GCC_INCLUDED */ |
3771 | +diff -ruN a/include/Makefile.am b/include/Makefile.am |
3772 | +--- a/include/Makefile.am |
3773 | ++++ b/include/Makefile.am |
3774 | +@@ -38,7 +38,10 @@ |
3775 | + my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \ |
3776 | + thr_lock.h t_ctype.h violite.h my_md5.h base64.h \ |
3777 | + my_compare.h my_time.h my_vle.h my_user.h \ |
3778 | +- my_libwrap.h my_stacktrace.h |
3779 | ++ my_libwrap.h my_stacktrace.h my_atomic.h \ |
3780 | ++ atomic/gcc_builtins.h atomic/generic-msvc.h \ |
3781 | ++ atomic/nolock.h atomic/rwlock.h atomic/solaris.h \ |
3782 | ++ atomic/x86-gcc.h |
3783 | + |
3784 | + EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp |
3785 | + |
3786 | +diff -ruN /dev/null b/include/my_atomic.h |
3787 | +--- /dev/null |
3788 | ++++ b/include/my_atomic.h |
3789 | +@@ -0,0 +1,287 @@ |
3790 | ++#ifndef MY_ATOMIC_INCLUDED |
3791 | ++#define MY_ATOMIC_INCLUDED |
3792 | ++ |
3793 | ++/* Copyright (C) 2006 MySQL AB |
3794 | ++ |
3795 | ++ This program is free software; you can redistribute it and/or modify |
3796 | ++ it under the terms of the GNU General Public License as published by |
3797 | ++ the Free Software Foundation; version 2 of the License. |
3798 | ++ |
3799 | ++ This program is distributed in the hope that it will be useful, |
3800 | ++ but WITHOUT ANY WARRANTY; without even the implied warranty of |
3801 | ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3802 | ++ GNU General Public License for more details. |
3803 | ++ |
3804 | ++ You should have received a copy of the GNU General Public License |
3805 | ++ along with this program; if not, write to the Free Software |
3806 | ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
3807 | ++ |
3808 | ++/* |
3809 | ++ This header defines five atomic operations: |
3810 | ++ |
3811 | ++ my_atomic_add#(&var, what) |
3812 | ++ 'Fetch and Add' |
3813 | ++ add 'what' to *var, and return the old value of *var |
3814 | ++ |
3815 | ++ my_atomic_fas#(&var, what) |
3816 | ++ 'Fetch And Store' |
3817 | ++ store 'what' in *var, and return the old value of *var |
3818 | ++ |
3819 | ++ my_atomic_cas#(&var, &old, new) |
3820 | ++ An odd variation of 'Compare And Set/Swap' |
3821 | ++ if *var is equal to *old, then store 'new' in *var, and return TRUE |
3822 | ++ otherwise store *var in *old, and return FALSE |
3823 | ++ Usually, &old should not be accessed if the operation is successful. |
3824 | ++ |
3825 | ++ my_atomic_load#(&var) |
3826 | ++ return *var |
3827 | ++ |
3828 | ++ my_atomic_store#(&var, what) |
3829 | ++ store 'what' in *var |
3830 | ++ |
3831 | ++ '#' is substituted by a size suffix - 8, 16, 32, 64, or ptr |
3832 | ++ (e.g. my_atomic_add8, my_atomic_fas32, my_atomic_casptr). |
3833 | ++ |
3834 | ++ NOTE This operations are not always atomic, so they always must be |
3835 | ++ enclosed in my_atomic_rwlock_rdlock(lock)/my_atomic_rwlock_rdunlock(lock) |
3836 | ++ or my_atomic_rwlock_wrlock(lock)/my_atomic_rwlock_wrunlock(lock). |
3837 | ++ Hint: if a code block makes intensive use of atomic ops, it make sense |
3838 | ++ to take/release rwlock once for the whole block, not for every statement. |
3839 | ++ |
3840 | ++ On architectures where these operations are really atomic, rwlocks will |
3841 | ++ be optimized away. |
3842 | ++ 8- and 16-bit atomics aren't implemented for windows (see generic-msvc.h), |
3843 | ++ but can be added, if necessary. |
3844 | ++*/ |
3845 | ++ |
3846 | ++#ifndef my_atomic_rwlock_init |
3847 | ++ |
3848 | ++#define intptr void * |
3849 | ++/** |
3850 | ++ Currently we don't support 8-bit and 16-bit operations. |
3851 | ++ It can be added later if needed. |
3852 | ++*/ |
3853 | ++#undef MY_ATOMIC_HAS_8_16 |
3854 | ++ |
3855 | ++#ifndef MY_ATOMIC_MODE_RWLOCKS |
3856 | ++/* |
3857 | ++ * Attempt to do atomic ops without locks |
3858 | ++ */ |
3859 | ++#include "atomic/nolock.h" |
3860 | ++#endif |
3861 | ++ |
3862 | ++#ifndef make_atomic_cas_body |
3863 | ++/* nolock.h was not able to generate even a CAS function, fall back */ |
3864 | ++#include "atomic/rwlock.h" |
3865 | ++#endif |
3866 | ++ |
3867 | ++/* define missing functions by using the already generated ones */ |
3868 | ++#ifndef make_atomic_add_body |
3869 | ++#define make_atomic_add_body(S) \ |
3870 | ++ int ## S tmp=*a; \ |
3871 | ++ while (!my_atomic_cas ## S(a, &tmp, tmp+v)) ; \ |
3872 | ++ v=tmp; |
3873 | ++#endif |
3874 | ++#ifndef make_atomic_fas_body |
3875 | ++#define make_atomic_fas_body(S) \ |
3876 | ++ int ## S tmp=*a; \ |
3877 | ++ while (!my_atomic_cas ## S(a, &tmp, v)) ; \ |
3878 | ++ v=tmp; |
3879 | ++#endif |
3880 | ++#ifndef make_atomic_load_body |
3881 | ++#define make_atomic_load_body(S) \ |
3882 | ++ ret= 0; /* avoid compiler warning */ \ |
3883 | ++ (void)(my_atomic_cas ## S(a, &ret, ret)); |
3884 | ++#endif |
3885 | ++#ifndef make_atomic_store_body |
3886 | ++#define make_atomic_store_body(S) \ |
3887 | ++ (void)(my_atomic_fas ## S (a, v)); |
3888 | ++#endif |
3889 | ++ |
3890 | ++/* |
3891 | ++ transparent_union doesn't work in g++ |
3892 | ++ Bug ? |
3893 | ++ |
3894 | ++ Darwin's gcc doesn't want to put pointers in a transparent_union |
3895 | ++ when built with -arch ppc64. Complains: |
3896 | ++ warning: 'transparent_union' attribute ignored |
3897 | ++*/ |
3898 | ++#if defined(__GNUC__) && !defined(__cplusplus) && \ |
3899 | ++ ! (defined(__APPLE__) && (defined(_ARCH_PPC64) ||defined (_ARCH_PPC))) |
3900 | ++/* |
3901 | ++ we want to be able to use my_atomic_xxx functions with |
3902 | ++ both signed and unsigned integers. But gcc will issue a warning |
3903 | ++ "passing arg N of `my_atomic_XXX' as [un]signed due to prototype" |
3904 | ++ if the signedness of the argument doesn't match the prototype, or |
3905 | ++ "pointer targets in passing argument N of my_atomic_XXX differ in signedness" |
3906 | ++ if int* is used where uint* is expected (or vice versa). |
3907 | ++ Let's shut these warnings up |
3908 | ++*/ |
3909 | ++#define make_transparent_unions(S) \ |
3910 | ++ typedef union { \ |
3911 | ++ int ## S i; \ |
3912 | ++ uint ## S u; \ |
3913 | ++ } U_ ## S __attribute__ ((transparent_union)); \ |
3914 | ++ typedef union { \ |
3915 | ++ int ## S volatile *i; \ |
3916 | ++ uint ## S volatile *u; \ |
3917 | ++ } Uv_ ## S __attribute__ ((transparent_union)); |
3918 | ++#define uintptr intptr |
3919 | ++make_transparent_unions(8) |
3920 | ++make_transparent_unions(16) |
3921 | ++make_transparent_unions(32) |
3922 | ++make_transparent_unions(64) |
3923 | ++make_transparent_unions(ptr) |
3924 | ++#undef uintptr |
3925 | ++#undef make_transparent_unions |
3926 | ++#define a U_a.i |
3927 | ++#define cmp U_cmp.i |
3928 | ++#define v U_v.i |
3929 | ++#define set U_set.i |
3930 | ++#else |
3931 | ++#define U_8 int8 |
3932 | ++#define U_16 int16 |
3933 | ++#define U_32 int32 |
3934 | ++#define U_64 int64 |
3935 | ++#define U_ptr intptr |
3936 | ++#define Uv_8 int8 |
3937 | ++#define Uv_16 int16 |
3938 | ++#define Uv_32 int32 |
3939 | ++#define Uv_64 int64 |
3940 | ++#define Uv_ptr intptr |
3941 | ++#define U_a volatile *a |
3942 | ++#define U_cmp *cmp |
3943 | ++#define U_v v |
3944 | ++#define U_set set |
3945 | ++#endif /* __GCC__ transparent_union magic */ |
3946 | ++ |
3947 | ++#define make_atomic_cas(S) \ |
3948 | ++static inline int my_atomic_cas ## S(Uv_ ## S U_a, \ |
3949 | ++ Uv_ ## S U_cmp, U_ ## S U_set) \ |
3950 | ++{ \ |
3951 | ++ int8 ret; \ |
3952 | ++ make_atomic_cas_body(S); \ |
3953 | ++ return ret; \ |
3954 | ++} |
3955 | ++ |
3956 | ++#define make_atomic_add(S) \ |
3957 | ++static inline int ## S my_atomic_add ## S( \ |
3958 | ++ Uv_ ## S U_a, U_ ## S U_v) \ |
3959 | ++{ \ |
3960 | ++ make_atomic_add_body(S); \ |
3961 | ++ return v; \ |
3962 | ++} |
3963 | ++ |
3964 | ++#define make_atomic_fas(S) \ |
3965 | ++static inline int ## S my_atomic_fas ## S( \ |
3966 | ++ Uv_ ## S U_a, U_ ## S U_v) \ |
3967 | ++{ \ |
3968 | ++ make_atomic_fas_body(S); \ |
3969 | ++ return v; \ |
3970 | ++} |
3971 | ++ |
3972 | ++#define make_atomic_load(S) \ |
3973 | ++static inline int ## S my_atomic_load ## S(Uv_ ## S U_a) \ |
3974 | ++{ \ |
3975 | ++ int ## S ret; \ |
3976 | ++ make_atomic_load_body(S); \ |
3977 | ++ return ret; \ |
3978 | ++} |
3979 | ++ |
3980 | ++#define make_atomic_store(S) \ |
3981 | ++static inline void my_atomic_store ## S( \ |
3982 | ++ Uv_ ## S U_a, U_ ## S U_v) \ |
3983 | ++{ \ |
3984 | ++ make_atomic_store_body(S); \ |
3985 | ++} |
3986 | ++ |
3987 | ++#ifdef MY_ATOMIC_HAS_8_16 |
3988 | ++make_atomic_cas(8) |
3989 | ++make_atomic_cas(16) |
3990 | ++#endif |
3991 | ++make_atomic_cas(32) |
3992 | ++make_atomic_cas(64) |
3993 | ++make_atomic_cas(ptr) |
3994 | ++ |
3995 | ++#ifdef MY_ATOMIC_HAS_8_16 |
3996 | ++make_atomic_add(8) |
3997 | ++make_atomic_add(16) |
3998 | ++#endif |
3999 | ++make_atomic_add(32) |
4000 | ++make_atomic_add(64) |
4001 | ++ |
4002 | ++#ifdef MY_ATOMIC_HAS_8_16 |
4003 | ++make_atomic_load(8) |
4004 | ++make_atomic_load(16) |
4005 | ++#endif |
4006 | ++make_atomic_load(32) |
4007 | ++make_atomic_load(64) |
4008 | ++make_atomic_load(ptr) |
4009 | ++ |
4010 | ++#ifdef MY_ATOMIC_HAS_8_16 |
4011 | ++make_atomic_fas(8) |
4012 | ++make_atomic_fas(16) |
4013 | ++#endif |
4014 | ++make_atomic_fas(32) |
4015 | ++make_atomic_fas(64) |
4016 | ++make_atomic_fas(ptr) |
4017 | ++ |
4018 | ++#ifdef MY_ATOMIC_HAS_8_16 |
4019 | ++make_atomic_store(8) |
4020 | ++make_atomic_store(16) |
4021 | ++#endif |
4022 | ++make_atomic_store(32) |
4023 | ++make_atomic_store(64) |
4024 | ++make_atomic_store(ptr) |
4025 | ++ |
4026 | ++#ifdef _atomic_h_cleanup_ |
4027 | ++#include _atomic_h_cleanup_ |
4028 | ++#undef _atomic_h_cleanup_ |
4029 | ++#endif |
4030 | ++ |
4031 | ++#undef U_8 |
4032 | ++#undef U_16 |
4033 | ++#undef U_32 |
4034 | ++#undef U_64 |
4035 | ++#undef U_ptr |
4036 | ++#undef Uv_8 |
4037 | ++#undef Uv_16 |
4038 | ++#undef Uv_32 |
4039 | ++#undef Uv_64 |
4040 | ++#undef Uv_ptr |
4041 | ++#undef a |
4042 | ++#undef cmp |
4043 | ++#undef v |
4044 | ++#undef set |
4045 | ++#undef U_a |
4046 | ++#undef U_cmp |
4047 | ++#undef U_v |
4048 | ++#undef U_set |
4049 | ++#undef make_atomic_add |
4050 | ++#undef make_atomic_cas |
4051 | ++#undef make_atomic_load |
4052 | ++#undef make_atomic_store |
4053 | ++#undef make_atomic_fas |
4054 | ++#undef make_atomic_add_body |
4055 | ++#undef make_atomic_cas_body |
4056 | ++#undef make_atomic_load_body |
4057 | ++#undef make_atomic_store_body |
4058 | ++#undef make_atomic_fas_body |
4059 | ++#undef intptr |
4060 | ++ |
4061 | ++/* |
4062 | ++ the macro below defines (as an expression) the code that |
4063 | ++ will be run in spin-loops. Intel manuals recummend to have PAUSE there. |
4064 | ++ It is expected to be defined in include/atomic/ *.h files |
4065 | ++*/ |
4066 | ++#ifndef LF_BACKOFF |
4067 | ++#define LF_BACKOFF (1) |
4068 | ++#endif |
4069 | ++ |
4070 | ++#define MY_ATOMIC_OK 0 |
4071 | ++#define MY_ATOMIC_NOT_1CPU 1 |
4072 | ++extern int my_atomic_initialize(); |
4073 | ++ |
4074 | ++#endif |
4075 | ++ |
4076 | ++#endif /* MY_ATOMIC_INCLUDED */ |
4077 | diff -ruN a/include/mysql_com.h b/include/mysql_com.h |
4078 | ---- a/include/mysql_com.h 2010-11-01 08:43:53.000000000 +0000 |
4079 | -+++ b/include/mysql_com.h 2010-11-01 08:52:40.000000000 +0000 |
4080 | -@@ -128,10 +128,11 @@ |
4081 | - #define REFRESH_FAST 32768 /* Intern flag */ |
4082 | - |
4083 | - /* RESET (remove all queries) from query cache */ |
4084 | --#define REFRESH_QUERY_CACHE 65536 |
4085 | --#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */ |
4086 | --#define REFRESH_DES_KEY_FILE 0x40000L |
4087 | --#define REFRESH_USER_RESOURCES 0x80000L |
4088 | -+#define REFRESH_QUERY_CACHE 65536 |
4089 | -+#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */ |
4090 | -+#define REFRESH_DES_KEY_FILE 0x40000L |
4091 | -+#define REFRESH_USER_RESOURCES 0x80000L |
4092 | +--- a/include/mysql_com.h |
4093 | ++++ b/include/mysql_com.h |
4094 | +@@ -132,6 +132,7 @@ |
4095 | + #define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */ |
4096 | + #define REFRESH_DES_KEY_FILE 0x40000L |
4097 | + #define REFRESH_USER_RESOURCES 0x80000L |
4098 | +#define REFRESH_QUERY_RESPONSE_TIME 0x100000L /* response time distibution */ |
4099 | |
4100 | #define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ |
4101 | #define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */ |
4102 | -diff -ruN a/patch_info/response-time-distribution.info b/patch_info/response-time-distribution.info |
4103 | ---- a/patch_info/response-time-distribution.info 1970-01-01 00:00:00.000000000 +0000 |
4104 | -+++ b/patch_info/response-time-distribution.info 2010-11-01 08:52:40.000000000 +0000 |
4105 | +diff -ruN /dev/null b/mysql-test/include/have_response_time_distribution.inc |
4106 | +--- /dev/null |
4107 | ++++ b/mysql-test/include/have_response_time_distribution.inc |
4108 | +@@ -0,0 +1,4 @@ |
4109 | ++-- require r/have_response_time_distribution.require |
4110 | ++disable_query_log; |
4111 | ++show variables like 'have_response_time_distribution'; |
4112 | ++enable_query_log; |
4113 | +diff -ruN /dev/null b/mysql-test/r/have_response_time_distribution.require |
4114 | +--- /dev/null |
4115 | ++++ b/mysql-test/r/have_response_time_distribution.require |
4116 | +@@ -0,0 +1,2 @@ |
4117 | ++Variable_name Value |
4118 | ++have_response_time_distribution YES |
4119 | +diff -ruN /dev/null b/mysql-test/include/query_response_time.inc |
4120 | +--- /dev/null |
4121 | ++++ b/mysql-test/include/query_response_time.inc |
4122 | +@@ -0,0 +1,39 @@ |
4123 | ++SET SESSION query_exec_time=0.1; |
4124 | ++ |
4125 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4126 | ++EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base; |
4127 | ++FLUSH QUERY_RESPONSE_TIME; |
4128 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4129 | ++ |
4130 | ++SET SESSION query_exec_time=0.31; SELECT 1; |
4131 | ++SET SESSION query_exec_time=0.32; SELECT 1; |
4132 | ++SET SESSION query_exec_time=0.33; SELECT 1; |
4133 | ++SET SESSION query_exec_time=0.34; SELECT 1; |
4134 | ++SET SESSION query_exec_time=0.35; SELECT 1; |
4135 | ++SET SESSION query_exec_time=0.36; SELECT 1; |
4136 | ++SET SESSION query_exec_time=0.37; SELECT 1; |
4137 | ++SET SESSION query_exec_time=0.38; SELECT 1; |
4138 | ++SET SESSION query_exec_time=0.39; SELECT 1; |
4139 | ++SET SESSION query_exec_time=0.4; SELECT 1; |
4140 | ++SET SESSION query_exec_time=1.1; SELECT 1; |
4141 | ++SET SESSION query_exec_time=1.2; SELECT 1; |
4142 | ++SET SESSION query_exec_time=1.3; SELECT 1; |
4143 | ++SET SESSION query_exec_time=1.5; SELECT 1; |
4144 | ++SET SESSION query_exec_time=1.4; SELECT 1; |
4145 | ++SET SESSION query_exec_time=0.5; SELECT 1; |
4146 | ++SET SESSION query_exec_time=2.1; SELECT 1; |
4147 | ++SET SESSION query_exec_time=2.3; SELECT 1; |
4148 | ++SET SESSION query_exec_time=2.5; SELECT 1; |
4149 | ++SET SESSION query_exec_time=3.1; SELECT 1; |
4150 | ++SET SESSION query_exec_time=4.1; SELECT 1; |
4151 | ++SET SESSION query_exec_time=5.1; SELECT 1; |
4152 | ++ |
4153 | ++SET SESSION query_exec_time=0.1; |
4154 | ++ |
4155 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4156 | ++ |
4157 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4158 | ++SHOW QUERY_RESPONSE_TIME; |
4159 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4160 | ++ |
4161 | ++SET SESSION query_exec_time=default; |
4162 | +diff -ruN /dev/null b/mysql-test/include/query_response_time-replication.inc |
4163 | +--- /dev/null |
4164 | ++++ b/mysql-test/include/query_response_time-replication.inc |
4165 | +@@ -0,0 +1,58 @@ |
4166 | ++connection master; |
4167 | ++ |
4168 | ++CREATE TABLE t(id INT); |
4169 | ++sync_slave_with_master; |
4170 | ++ |
4171 | ++connection slave; |
4172 | ++SET GLOBAL query_exec_time=0.1; |
4173 | ++--source include/restart_slave_sql.inc |
4174 | ++ |
4175 | ++connection slave; |
4176 | ++ |
4177 | ++SET SESSION query_exec_time=0.1; |
4178 | ++ |
4179 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4180 | ++--eval SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base |
4181 | ++FLUSH QUERY_RESPONSE_TIME; |
4182 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4183 | ++ |
4184 | ++connection master; |
4185 | ++ |
4186 | ++SET SESSION query_exec_time = 0.31; INSERT INTO t VALUES(1); |
4187 | ++SET SESSION query_exec_time = 0.32; INSERT INTO t VALUES(1); |
4188 | ++SET SESSION query_exec_time = 0.33; INSERT INTO t VALUES(1); |
4189 | ++SET SESSION query_exec_time = 0.34; INSERT INTO t VALUES(1); |
4190 | ++SET SESSION query_exec_time = 0.35; INSERT INTO t VALUES(1); |
4191 | ++SET SESSION query_exec_time = 0.36; INSERT INTO t VALUES(1); |
4192 | ++SET SESSION query_exec_time = 0.37; INSERT INTO t VALUES(1); |
4193 | ++SET SESSION query_exec_time = 0.38; INSERT INTO t VALUES(1); |
4194 | ++SET SESSION query_exec_time = 0.39; INSERT INTO t VALUES(1); |
4195 | ++SET SESSION query_exec_time = 0.4; INSERT INTO t VALUES(1); |
4196 | ++SET SESSION query_exec_time = 1.1; INSERT INTO t VALUES(1); |
4197 | ++SET SESSION query_exec_time = 1.2; INSERT INTO t VALUES(1); |
4198 | ++SET SESSION query_exec_time = 1.3; INSERT INTO t VALUES(1); |
4199 | ++SET SESSION query_exec_time = 1.5; INSERT INTO t VALUES(1); |
4200 | ++SET SESSION query_exec_time = 1.4; INSERT INTO t VALUES(1); |
4201 | ++SET SESSION query_exec_time = 0.5; INSERT INTO t VALUES(1); |
4202 | ++SET SESSION query_exec_time = 2.1; INSERT INTO t VALUES(1); |
4203 | ++SET SESSION query_exec_time = 2.3; INSERT INTO t VALUES(1); |
4204 | ++SET SESSION query_exec_time = 2.5; INSERT INTO t VALUES(1); |
4205 | ++SET SESSION query_exec_time = 3.1; INSERT INTO t VALUES(1); |
4206 | ++SET SESSION query_exec_time = 4.1; INSERT INTO t VALUES(1); |
4207 | ++SET SESSION query_exec_time = 5.1; INSERT INTO t VALUES(1); |
4208 | ++ |
4209 | ++sync_slave_with_master; |
4210 | ++ |
4211 | ++connection slave; |
4212 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4213 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4214 | ++SHOW QUERY_RESPONSE_TIME; |
4215 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4216 | ++ |
4217 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; |
4218 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=default; |
4219 | ++ |
4220 | ++connection master; |
4221 | ++DROP TABLE t; |
4222 | ++ |
4223 | ++sync_slave_with_master; |
4224 | +diff -ruN /dev/null b/mysql-test/include/query_response_time-stored.inc |
4225 | +--- /dev/null |
4226 | ++++ b/mysql-test/include/query_response_time-stored.inc |
4227 | +@@ -0,0 +1,37 @@ |
4228 | ++SET SESSION query_exec_time=0.1; |
4229 | ++ |
4230 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4231 | ++EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base; |
4232 | ++FLUSH QUERY_RESPONSE_TIME; |
4233 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4234 | ++ |
4235 | ++CALL test_f(0.31); |
4236 | ++CALL test_f(0.32); |
4237 | ++CALL test_f(0.33); |
4238 | ++CALL test_f(0.34); |
4239 | ++CALL test_f(0.35); |
4240 | ++CALL test_f(0.36); |
4241 | ++CALL test_f(0.37); |
4242 | ++CALL test_f(0.38); |
4243 | ++CALL test_f(0.39); |
4244 | ++CALL test_f(0.4); |
4245 | ++CALL test_f(1.1); |
4246 | ++CALL test_f(1.2); |
4247 | ++CALL test_f(1.3); |
4248 | ++CALL test_f(1.5); |
4249 | ++CALL test_f(1.4); |
4250 | ++CALL test_f(0.5); |
4251 | ++CALL test_f(2.1); |
4252 | ++CALL test_f(2.3); |
4253 | ++CALL test_f(2.5); |
4254 | ++CALL test_f(3.1); |
4255 | ++CALL test_f(4.1); |
4256 | ++CALL test_f(5.1); |
4257 | ++ |
4258 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4259 | ++ |
4260 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4261 | ++SHOW QUERY_RESPONSE_TIME; |
4262 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4263 | ++ |
4264 | ++SET SESSION query_exec_time=default; |
4265 | +diff -ruN /dev/null b/mysql-test/r/percona_query_response_time-replication.result |
4266 | +--- /dev/null |
4267 | ++++ b/mysql-test/r/percona_query_response_time-replication.result |
4268 | +@@ -0,0 +1,727 @@ |
4269 | ++SET GLOBAL query_exec_time=0.1; |
4270 | ++include/master-slave.inc |
4271 | ++[connection master] |
4272 | ++CREATE TABLE t(id INT); |
4273 | ++SET GLOBAL query_exec_time=0.1; |
4274 | ++include/restart_slave.inc |
4275 | ++SET SESSION query_exec_time=0.1; |
4276 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4277 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1; |
4278 | ++Warnings: |
4279 | ++Warning 1292 Truncated incorrect query_response_time_range_base value: '1' |
4280 | ++FLUSH QUERY_RESPONSE_TIME; |
4281 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4282 | ++SET SESSION query_exec_time = 0.31; |
4283 | ++INSERT INTO t VALUES(1); |
4284 | ++SET SESSION query_exec_time = 0.32; |
4285 | ++INSERT INTO t VALUES(1); |
4286 | ++SET SESSION query_exec_time = 0.33; |
4287 | ++INSERT INTO t VALUES(1); |
4288 | ++SET SESSION query_exec_time = 0.34; |
4289 | ++INSERT INTO t VALUES(1); |
4290 | ++SET SESSION query_exec_time = 0.35; |
4291 | ++INSERT INTO t VALUES(1); |
4292 | ++SET SESSION query_exec_time = 0.36; |
4293 | ++INSERT INTO t VALUES(1); |
4294 | ++SET SESSION query_exec_time = 0.37; |
4295 | ++INSERT INTO t VALUES(1); |
4296 | ++SET SESSION query_exec_time = 0.38; |
4297 | ++INSERT INTO t VALUES(1); |
4298 | ++SET SESSION query_exec_time = 0.39; |
4299 | ++INSERT INTO t VALUES(1); |
4300 | ++SET SESSION query_exec_time = 0.4; |
4301 | ++INSERT INTO t VALUES(1); |
4302 | ++SET SESSION query_exec_time = 1.1; |
4303 | ++INSERT INTO t VALUES(1); |
4304 | ++SET SESSION query_exec_time = 1.2; |
4305 | ++INSERT INTO t VALUES(1); |
4306 | ++SET SESSION query_exec_time = 1.3; |
4307 | ++INSERT INTO t VALUES(1); |
4308 | ++SET SESSION query_exec_time = 1.5; |
4309 | ++INSERT INTO t VALUES(1); |
4310 | ++SET SESSION query_exec_time = 1.4; |
4311 | ++INSERT INTO t VALUES(1); |
4312 | ++SET SESSION query_exec_time = 0.5; |
4313 | ++INSERT INTO t VALUES(1); |
4314 | ++SET SESSION query_exec_time = 2.1; |
4315 | ++INSERT INTO t VALUES(1); |
4316 | ++SET SESSION query_exec_time = 2.3; |
4317 | ++INSERT INTO t VALUES(1); |
4318 | ++SET SESSION query_exec_time = 2.5; |
4319 | ++INSERT INTO t VALUES(1); |
4320 | ++SET SESSION query_exec_time = 3.1; |
4321 | ++INSERT INTO t VALUES(1); |
4322 | ++SET SESSION query_exec_time = 4.1; |
4323 | ++INSERT INTO t VALUES(1); |
4324 | ++SET SESSION query_exec_time = 5.1; |
4325 | ++INSERT INTO t VALUES(1); |
4326 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4327 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4328 | ++Variable_name Value |
4329 | ++query_response_time_range_base 2 |
4330 | ++SHOW QUERY_RESPONSE_TIME; |
4331 | ++ |
4332 | ++ 0.000001 2 0.000000 |
4333 | ++ 0.000003 0 0.000000 |
4334 | ++ 0.000007 0 0.000000 |
4335 | ++ 0.000015 0 0.000000 |
4336 | ++ 0.000030 0 0.000000 |
4337 | ++ 0.000061 0 0.000000 |
4338 | ++ 0.000122 0 0.000000 |
4339 | ++ 0.000244 0 0.000000 |
4340 | ++ 0.000488 0 0.000000 |
4341 | ++ 0.000976 0 0.000000 |
4342 | ++ 0.001953 0 0.000000 |
4343 | ++ 0.003906 0 0.000000 |
4344 | ++ 0.007812 0 0.000000 |
4345 | ++ 0.015625 0 0.000000 |
4346 | ++ 0.031250 0 0.000000 |
4347 | ++ 0.062500 0 0.000000 |
4348 | ++ 0.125000 3 0.300000 |
4349 | ++ 0.250000 0 0.000000 |
4350 | ++ 0.500000 10 3.550000 |
4351 | ++ 1.000000 1 0.500000 |
4352 | ++ 2.000000 5 6.500000 |
4353 | ++ 4.000000 4 10.000000 |
4354 | ++ 8.000000 2 9.200000 |
4355 | ++ 16.000000 0 0.000000 |
4356 | ++ 32.000000 0 0.000000 |
4357 | ++ 64.000000 0 0.000000 |
4358 | ++ 128.000000 0 0.000000 |
4359 | ++ 256.000000 0 0.000000 |
4360 | ++ 512.000000 0 0.000000 |
4361 | ++ 1024.000000 0 0.000000 |
4362 | ++ 2048.000000 0 0.000000 |
4363 | ++ 4096.000000 0 0.000000 |
4364 | ++ 8192.000000 0 0.000000 |
4365 | ++ 16384.000000 0 0.000000 |
4366 | ++ 32768.000000 0 0.000000 |
4367 | ++ 65536.000000 0 0.000000 |
4368 | ++ 131072.000000 0 0.000000 |
4369 | ++ 262144.000000 0 0.000000 |
4370 | ++ 524288.000000 0 0.000000 |
4371 | ++ 1048576.00000 0 0.000000 |
4372 | ++ 2097152.00000 0 0.000000 |
4373 | ++ 4194304.00000 0 0.000000 |
4374 | ++ 8388608.00000 0 0.000000 |
4375 | ++TOO LONG 0 TOO LONG |
4376 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4377 | ++time count total |
4378 | ++ 0.000001 2 0.000000 |
4379 | ++ 0.000003 0 0.000000 |
4380 | ++ 0.000007 0 0.000000 |
4381 | ++ 0.000015 0 0.000000 |
4382 | ++ 0.000030 0 0.000000 |
4383 | ++ 0.000061 0 0.000000 |
4384 | ++ 0.000122 0 0.000000 |
4385 | ++ 0.000244 0 0.000000 |
4386 | ++ 0.000488 0 0.000000 |
4387 | ++ 0.000976 0 0.000000 |
4388 | ++ 0.001953 0 0.000000 |
4389 | ++ 0.003906 0 0.000000 |
4390 | ++ 0.007812 0 0.000000 |
4391 | ++ 0.015625 0 0.000000 |
4392 | ++ 0.031250 0 0.000000 |
4393 | ++ 0.062500 0 0.000000 |
4394 | ++ 0.125000 4 0.400000 |
4395 | ++ 0.250000 0 0.000000 |
4396 | ++ 0.500000 10 3.550000 |
4397 | ++ 1.000000 1 0.500000 |
4398 | ++ 2.000000 5 6.500000 |
4399 | ++ 4.000000 4 10.000000 |
4400 | ++ 8.000000 2 9.200000 |
4401 | ++ 16.000000 0 0.000000 |
4402 | ++ 32.000000 0 0.000000 |
4403 | ++ 64.000000 0 0.000000 |
4404 | ++ 128.000000 0 0.000000 |
4405 | ++ 256.000000 0 0.000000 |
4406 | ++ 512.000000 0 0.000000 |
4407 | ++ 1024.000000 0 0.000000 |
4408 | ++ 2048.000000 0 0.000000 |
4409 | ++ 4096.000000 0 0.000000 |
4410 | ++ 8192.000000 0 0.000000 |
4411 | ++ 16384.000000 0 0.000000 |
4412 | ++ 32768.000000 0 0.000000 |
4413 | ++ 65536.000000 0 0.000000 |
4414 | ++ 131072.000000 0 0.000000 |
4415 | ++ 262144.000000 0 0.000000 |
4416 | ++ 524288.000000 0 0.000000 |
4417 | ++ 1048576.00000 0 0.000000 |
4418 | ++ 2097152.00000 0 0.000000 |
4419 | ++ 4194304.00000 0 0.000000 |
4420 | ++ 8388608.00000 0 0.000000 |
4421 | ++TOO LONG 0 TOO LONG |
4422 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; |
4423 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=default; |
4424 | ++DROP TABLE t; |
4425 | ++CREATE TABLE t(id INT); |
4426 | ++SET GLOBAL query_exec_time=0.1; |
4427 | ++include/restart_slave.inc |
4428 | ++SET SESSION query_exec_time=0.1; |
4429 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4430 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2; |
4431 | ++FLUSH QUERY_RESPONSE_TIME; |
4432 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4433 | ++SET SESSION query_exec_time = 0.31; |
4434 | ++INSERT INTO t VALUES(1); |
4435 | ++SET SESSION query_exec_time = 0.32; |
4436 | ++INSERT INTO t VALUES(1); |
4437 | ++SET SESSION query_exec_time = 0.33; |
4438 | ++INSERT INTO t VALUES(1); |
4439 | ++SET SESSION query_exec_time = 0.34; |
4440 | ++INSERT INTO t VALUES(1); |
4441 | ++SET SESSION query_exec_time = 0.35; |
4442 | ++INSERT INTO t VALUES(1); |
4443 | ++SET SESSION query_exec_time = 0.36; |
4444 | ++INSERT INTO t VALUES(1); |
4445 | ++SET SESSION query_exec_time = 0.37; |
4446 | ++INSERT INTO t VALUES(1); |
4447 | ++SET SESSION query_exec_time = 0.38; |
4448 | ++INSERT INTO t VALUES(1); |
4449 | ++SET SESSION query_exec_time = 0.39; |
4450 | ++INSERT INTO t VALUES(1); |
4451 | ++SET SESSION query_exec_time = 0.4; |
4452 | ++INSERT INTO t VALUES(1); |
4453 | ++SET SESSION query_exec_time = 1.1; |
4454 | ++INSERT INTO t VALUES(1); |
4455 | ++SET SESSION query_exec_time = 1.2; |
4456 | ++INSERT INTO t VALUES(1); |
4457 | ++SET SESSION query_exec_time = 1.3; |
4458 | ++INSERT INTO t VALUES(1); |
4459 | ++SET SESSION query_exec_time = 1.5; |
4460 | ++INSERT INTO t VALUES(1); |
4461 | ++SET SESSION query_exec_time = 1.4; |
4462 | ++INSERT INTO t VALUES(1); |
4463 | ++SET SESSION query_exec_time = 0.5; |
4464 | ++INSERT INTO t VALUES(1); |
4465 | ++SET SESSION query_exec_time = 2.1; |
4466 | ++INSERT INTO t VALUES(1); |
4467 | ++SET SESSION query_exec_time = 2.3; |
4468 | ++INSERT INTO t VALUES(1); |
4469 | ++SET SESSION query_exec_time = 2.5; |
4470 | ++INSERT INTO t VALUES(1); |
4471 | ++SET SESSION query_exec_time = 3.1; |
4472 | ++INSERT INTO t VALUES(1); |
4473 | ++SET SESSION query_exec_time = 4.1; |
4474 | ++INSERT INTO t VALUES(1); |
4475 | ++SET SESSION query_exec_time = 5.1; |
4476 | ++INSERT INTO t VALUES(1); |
4477 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4478 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4479 | ++Variable_name Value |
4480 | ++query_response_time_range_base 2 |
4481 | ++SHOW QUERY_RESPONSE_TIME; |
4482 | ++ |
4483 | ++ 0.000001 2 0.000000 |
4484 | ++ 0.000003 0 0.000000 |
4485 | ++ 0.000007 0 0.000000 |
4486 | ++ 0.000015 0 0.000000 |
4487 | ++ 0.000030 0 0.000000 |
4488 | ++ 0.000061 0 0.000000 |
4489 | ++ 0.000122 0 0.000000 |
4490 | ++ 0.000244 0 0.000000 |
4491 | ++ 0.000488 0 0.000000 |
4492 | ++ 0.000976 0 0.000000 |
4493 | ++ 0.001953 0 0.000000 |
4494 | ++ 0.003906 0 0.000000 |
4495 | ++ 0.007812 0 0.000000 |
4496 | ++ 0.015625 0 0.000000 |
4497 | ++ 0.031250 0 0.000000 |
4498 | ++ 0.062500 0 0.000000 |
4499 | ++ 0.125000 3 0.300000 |
4500 | ++ 0.250000 0 0.000000 |
4501 | ++ 0.500000 10 3.550000 |
4502 | ++ 1.000000 1 0.500000 |
4503 | ++ 2.000000 5 6.500000 |
4504 | ++ 4.000000 4 10.000000 |
4505 | ++ 8.000000 2 9.200000 |
4506 | ++ 16.000000 0 0.000000 |
4507 | ++ 32.000000 0 0.000000 |
4508 | ++ 64.000000 0 0.000000 |
4509 | ++ 128.000000 0 0.000000 |
4510 | ++ 256.000000 0 0.000000 |
4511 | ++ 512.000000 0 0.000000 |
4512 | ++ 1024.000000 0 0.000000 |
4513 | ++ 2048.000000 0 0.000000 |
4514 | ++ 4096.000000 0 0.000000 |
4515 | ++ 8192.000000 0 0.000000 |
4516 | ++ 16384.000000 0 0.000000 |
4517 | ++ 32768.000000 0 0.000000 |
4518 | ++ 65536.000000 0 0.000000 |
4519 | ++ 131072.000000 0 0.000000 |
4520 | ++ 262144.000000 0 0.000000 |
4521 | ++ 524288.000000 0 0.000000 |
4522 | ++ 1048576.00000 0 0.000000 |
4523 | ++ 2097152.00000 0 0.000000 |
4524 | ++ 4194304.00000 0 0.000000 |
4525 | ++ 8388608.00000 0 0.000000 |
4526 | ++TOO LONG 0 TOO LONG |
4527 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4528 | ++time count total |
4529 | ++ 0.000001 2 0.000000 |
4530 | ++ 0.000003 0 0.000000 |
4531 | ++ 0.000007 0 0.000000 |
4532 | ++ 0.000015 0 0.000000 |
4533 | ++ 0.000030 0 0.000000 |
4534 | ++ 0.000061 0 0.000000 |
4535 | ++ 0.000122 0 0.000000 |
4536 | ++ 0.000244 0 0.000000 |
4537 | ++ 0.000488 0 0.000000 |
4538 | ++ 0.000976 0 0.000000 |
4539 | ++ 0.001953 0 0.000000 |
4540 | ++ 0.003906 0 0.000000 |
4541 | ++ 0.007812 0 0.000000 |
4542 | ++ 0.015625 0 0.000000 |
4543 | ++ 0.031250 0 0.000000 |
4544 | ++ 0.062500 0 0.000000 |
4545 | ++ 0.125000 4 0.400000 |
4546 | ++ 0.250000 0 0.000000 |
4547 | ++ 0.500000 10 3.550000 |
4548 | ++ 1.000000 1 0.500000 |
4549 | ++ 2.000000 5 6.500000 |
4550 | ++ 4.000000 4 10.000000 |
4551 | ++ 8.000000 2 9.200000 |
4552 | ++ 16.000000 0 0.000000 |
4553 | ++ 32.000000 0 0.000000 |
4554 | ++ 64.000000 0 0.000000 |
4555 | ++ 128.000000 0 0.000000 |
4556 | ++ 256.000000 0 0.000000 |
4557 | ++ 512.000000 0 0.000000 |
4558 | ++ 1024.000000 0 0.000000 |
4559 | ++ 2048.000000 0 0.000000 |
4560 | ++ 4096.000000 0 0.000000 |
4561 | ++ 8192.000000 0 0.000000 |
4562 | ++ 16384.000000 0 0.000000 |
4563 | ++ 32768.000000 0 0.000000 |
4564 | ++ 65536.000000 0 0.000000 |
4565 | ++ 131072.000000 0 0.000000 |
4566 | ++ 262144.000000 0 0.000000 |
4567 | ++ 524288.000000 0 0.000000 |
4568 | ++ 1048576.00000 0 0.000000 |
4569 | ++ 2097152.00000 0 0.000000 |
4570 | ++ 4194304.00000 0 0.000000 |
4571 | ++ 8388608.00000 0 0.000000 |
4572 | ++TOO LONG 0 TOO LONG |
4573 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; |
4574 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=default; |
4575 | ++DROP TABLE t; |
4576 | ++CREATE TABLE t(id INT); |
4577 | ++SET GLOBAL query_exec_time=0.1; |
4578 | ++include/restart_slave.inc |
4579 | ++SET SESSION query_exec_time=0.1; |
4580 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4581 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10; |
4582 | ++FLUSH QUERY_RESPONSE_TIME; |
4583 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4584 | ++SET SESSION query_exec_time = 0.31; |
4585 | ++INSERT INTO t VALUES(1); |
4586 | ++SET SESSION query_exec_time = 0.32; |
4587 | ++INSERT INTO t VALUES(1); |
4588 | ++SET SESSION query_exec_time = 0.33; |
4589 | ++INSERT INTO t VALUES(1); |
4590 | ++SET SESSION query_exec_time = 0.34; |
4591 | ++INSERT INTO t VALUES(1); |
4592 | ++SET SESSION query_exec_time = 0.35; |
4593 | ++INSERT INTO t VALUES(1); |
4594 | ++SET SESSION query_exec_time = 0.36; |
4595 | ++INSERT INTO t VALUES(1); |
4596 | ++SET SESSION query_exec_time = 0.37; |
4597 | ++INSERT INTO t VALUES(1); |
4598 | ++SET SESSION query_exec_time = 0.38; |
4599 | ++INSERT INTO t VALUES(1); |
4600 | ++SET SESSION query_exec_time = 0.39; |
4601 | ++INSERT INTO t VALUES(1); |
4602 | ++SET SESSION query_exec_time = 0.4; |
4603 | ++INSERT INTO t VALUES(1); |
4604 | ++SET SESSION query_exec_time = 1.1; |
4605 | ++INSERT INTO t VALUES(1); |
4606 | ++SET SESSION query_exec_time = 1.2; |
4607 | ++INSERT INTO t VALUES(1); |
4608 | ++SET SESSION query_exec_time = 1.3; |
4609 | ++INSERT INTO t VALUES(1); |
4610 | ++SET SESSION query_exec_time = 1.5; |
4611 | ++INSERT INTO t VALUES(1); |
4612 | ++SET SESSION query_exec_time = 1.4; |
4613 | ++INSERT INTO t VALUES(1); |
4614 | ++SET SESSION query_exec_time = 0.5; |
4615 | ++INSERT INTO t VALUES(1); |
4616 | ++SET SESSION query_exec_time = 2.1; |
4617 | ++INSERT INTO t VALUES(1); |
4618 | ++SET SESSION query_exec_time = 2.3; |
4619 | ++INSERT INTO t VALUES(1); |
4620 | ++SET SESSION query_exec_time = 2.5; |
4621 | ++INSERT INTO t VALUES(1); |
4622 | ++SET SESSION query_exec_time = 3.1; |
4623 | ++INSERT INTO t VALUES(1); |
4624 | ++SET SESSION query_exec_time = 4.1; |
4625 | ++INSERT INTO t VALUES(1); |
4626 | ++SET SESSION query_exec_time = 5.1; |
4627 | ++INSERT INTO t VALUES(1); |
4628 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4629 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4630 | ++Variable_name Value |
4631 | ++query_response_time_range_base 10 |
4632 | ++SHOW QUERY_RESPONSE_TIME; |
4633 | ++ |
4634 | ++ 0.000001 2 0.000000 |
4635 | ++ 0.000010 0 0.000000 |
4636 | ++ 0.000100 0 0.000000 |
4637 | ++ 0.001000 0 0.000000 |
4638 | ++ 0.010000 0 0.000000 |
4639 | ++ 0.100000 0 0.000000 |
4640 | ++ 1.000000 14 4.350000 |
4641 | ++ 10.000000 11 25.700000 |
4642 | ++ 100.000000 0 0.000000 |
4643 | ++ 1000.000000 0 0.000000 |
4644 | ++ 10000.000000 0 0.000000 |
4645 | ++ 100000.000000 0 0.000000 |
4646 | ++ 1000000.00000 0 0.000000 |
4647 | ++TOO LONG 0 TOO LONG |
4648 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4649 | ++time count total |
4650 | ++ 0.000001 2 0.000000 |
4651 | ++ 0.000010 0 0.000000 |
4652 | ++ 0.000100 0 0.000000 |
4653 | ++ 0.001000 0 0.000000 |
4654 | ++ 0.010000 0 0.000000 |
4655 | ++ 0.100000 0 0.000000 |
4656 | ++ 1.000000 15 4.450000 |
4657 | ++ 10.000000 11 25.700000 |
4658 | ++ 100.000000 0 0.000000 |
4659 | ++ 1000.000000 0 0.000000 |
4660 | ++ 10000.000000 0 0.000000 |
4661 | ++ 100000.000000 0 0.000000 |
4662 | ++ 1000000.00000 0 0.000000 |
4663 | ++TOO LONG 0 TOO LONG |
4664 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; |
4665 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=default; |
4666 | ++DROP TABLE t; |
4667 | ++CREATE TABLE t(id INT); |
4668 | ++SET GLOBAL query_exec_time=0.1; |
4669 | ++include/restart_slave.inc |
4670 | ++SET SESSION query_exec_time=0.1; |
4671 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4672 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7; |
4673 | ++FLUSH QUERY_RESPONSE_TIME; |
4674 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4675 | ++SET SESSION query_exec_time = 0.31; |
4676 | ++INSERT INTO t VALUES(1); |
4677 | ++SET SESSION query_exec_time = 0.32; |
4678 | ++INSERT INTO t VALUES(1); |
4679 | ++SET SESSION query_exec_time = 0.33; |
4680 | ++INSERT INTO t VALUES(1); |
4681 | ++SET SESSION query_exec_time = 0.34; |
4682 | ++INSERT INTO t VALUES(1); |
4683 | ++SET SESSION query_exec_time = 0.35; |
4684 | ++INSERT INTO t VALUES(1); |
4685 | ++SET SESSION query_exec_time = 0.36; |
4686 | ++INSERT INTO t VALUES(1); |
4687 | ++SET SESSION query_exec_time = 0.37; |
4688 | ++INSERT INTO t VALUES(1); |
4689 | ++SET SESSION query_exec_time = 0.38; |
4690 | ++INSERT INTO t VALUES(1); |
4691 | ++SET SESSION query_exec_time = 0.39; |
4692 | ++INSERT INTO t VALUES(1); |
4693 | ++SET SESSION query_exec_time = 0.4; |
4694 | ++INSERT INTO t VALUES(1); |
4695 | ++SET SESSION query_exec_time = 1.1; |
4696 | ++INSERT INTO t VALUES(1); |
4697 | ++SET SESSION query_exec_time = 1.2; |
4698 | ++INSERT INTO t VALUES(1); |
4699 | ++SET SESSION query_exec_time = 1.3; |
4700 | ++INSERT INTO t VALUES(1); |
4701 | ++SET SESSION query_exec_time = 1.5; |
4702 | ++INSERT INTO t VALUES(1); |
4703 | ++SET SESSION query_exec_time = 1.4; |
4704 | ++INSERT INTO t VALUES(1); |
4705 | ++SET SESSION query_exec_time = 0.5; |
4706 | ++INSERT INTO t VALUES(1); |
4707 | ++SET SESSION query_exec_time = 2.1; |
4708 | ++INSERT INTO t VALUES(1); |
4709 | ++SET SESSION query_exec_time = 2.3; |
4710 | ++INSERT INTO t VALUES(1); |
4711 | ++SET SESSION query_exec_time = 2.5; |
4712 | ++INSERT INTO t VALUES(1); |
4713 | ++SET SESSION query_exec_time = 3.1; |
4714 | ++INSERT INTO t VALUES(1); |
4715 | ++SET SESSION query_exec_time = 4.1; |
4716 | ++INSERT INTO t VALUES(1); |
4717 | ++SET SESSION query_exec_time = 5.1; |
4718 | ++INSERT INTO t VALUES(1); |
4719 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4720 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4721 | ++Variable_name Value |
4722 | ++query_response_time_range_base 7 |
4723 | ++SHOW QUERY_RESPONSE_TIME; |
4724 | ++ |
4725 | ++ 0.000001 2 0.000000 |
4726 | ++ 0.000008 0 0.000000 |
4727 | ++ 0.000059 0 0.000000 |
4728 | ++ 0.000416 0 0.000000 |
4729 | ++ 0.002915 0 0.000000 |
4730 | ++ 0.020408 0 0.000000 |
4731 | ++ 0.142857 3 0.300000 |
4732 | ++ 1.000000 11 4.050000 |
4733 | ++ 7.000000 11 25.700000 |
4734 | ++ 49.000000 0 0.000000 |
4735 | ++ 343.000000 0 0.000000 |
4736 | ++ 2401.000000 0 0.000000 |
4737 | ++ 16807.000000 0 0.000000 |
4738 | ++ 117649.000000 0 0.000000 |
4739 | ++ 823543.000000 0 0.000000 |
4740 | ++ 5764801.00000 0 0.000000 |
4741 | ++TOO LONG 0 TOO LONG |
4742 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4743 | ++time count total |
4744 | ++ 0.000001 2 0.000000 |
4745 | ++ 0.000008 0 0.000000 |
4746 | ++ 0.000059 0 0.000000 |
4747 | ++ 0.000416 0 0.000000 |
4748 | ++ 0.002915 0 0.000000 |
4749 | ++ 0.020408 0 0.000000 |
4750 | ++ 0.142857 4 0.400000 |
4751 | ++ 1.000000 11 4.050000 |
4752 | ++ 7.000000 11 25.700000 |
4753 | ++ 49.000000 0 0.000000 |
4754 | ++ 343.000000 0 0.000000 |
4755 | ++ 2401.000000 0 0.000000 |
4756 | ++ 16807.000000 0 0.000000 |
4757 | ++ 117649.000000 0 0.000000 |
4758 | ++ 823543.000000 0 0.000000 |
4759 | ++ 5764801.00000 0 0.000000 |
4760 | ++TOO LONG 0 TOO LONG |
4761 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; |
4762 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=default; |
4763 | ++DROP TABLE t; |
4764 | ++CREATE TABLE t(id INT); |
4765 | ++SET GLOBAL query_exec_time=0.1; |
4766 | ++include/restart_slave.inc |
4767 | ++SET SESSION query_exec_time=0.1; |
4768 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4769 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156; |
4770 | ++FLUSH QUERY_RESPONSE_TIME; |
4771 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4772 | ++SET SESSION query_exec_time = 0.31; |
4773 | ++INSERT INTO t VALUES(1); |
4774 | ++SET SESSION query_exec_time = 0.32; |
4775 | ++INSERT INTO t VALUES(1); |
4776 | ++SET SESSION query_exec_time = 0.33; |
4777 | ++INSERT INTO t VALUES(1); |
4778 | ++SET SESSION query_exec_time = 0.34; |
4779 | ++INSERT INTO t VALUES(1); |
4780 | ++SET SESSION query_exec_time = 0.35; |
4781 | ++INSERT INTO t VALUES(1); |
4782 | ++SET SESSION query_exec_time = 0.36; |
4783 | ++INSERT INTO t VALUES(1); |
4784 | ++SET SESSION query_exec_time = 0.37; |
4785 | ++INSERT INTO t VALUES(1); |
4786 | ++SET SESSION query_exec_time = 0.38; |
4787 | ++INSERT INTO t VALUES(1); |
4788 | ++SET SESSION query_exec_time = 0.39; |
4789 | ++INSERT INTO t VALUES(1); |
4790 | ++SET SESSION query_exec_time = 0.4; |
4791 | ++INSERT INTO t VALUES(1); |
4792 | ++SET SESSION query_exec_time = 1.1; |
4793 | ++INSERT INTO t VALUES(1); |
4794 | ++SET SESSION query_exec_time = 1.2; |
4795 | ++INSERT INTO t VALUES(1); |
4796 | ++SET SESSION query_exec_time = 1.3; |
4797 | ++INSERT INTO t VALUES(1); |
4798 | ++SET SESSION query_exec_time = 1.5; |
4799 | ++INSERT INTO t VALUES(1); |
4800 | ++SET SESSION query_exec_time = 1.4; |
4801 | ++INSERT INTO t VALUES(1); |
4802 | ++SET SESSION query_exec_time = 0.5; |
4803 | ++INSERT INTO t VALUES(1); |
4804 | ++SET SESSION query_exec_time = 2.1; |
4805 | ++INSERT INTO t VALUES(1); |
4806 | ++SET SESSION query_exec_time = 2.3; |
4807 | ++INSERT INTO t VALUES(1); |
4808 | ++SET SESSION query_exec_time = 2.5; |
4809 | ++INSERT INTO t VALUES(1); |
4810 | ++SET SESSION query_exec_time = 3.1; |
4811 | ++INSERT INTO t VALUES(1); |
4812 | ++SET SESSION query_exec_time = 4.1; |
4813 | ++INSERT INTO t VALUES(1); |
4814 | ++SET SESSION query_exec_time = 5.1; |
4815 | ++INSERT INTO t VALUES(1); |
4816 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4817 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4818 | ++Variable_name Value |
4819 | ++query_response_time_range_base 156 |
4820 | ++SHOW QUERY_RESPONSE_TIME; |
4821 | ++ |
4822 | ++ 0.000041 2 0.000000 |
4823 | ++ 0.006410 0 0.000000 |
4824 | ++ 1.000000 14 4.350000 |
4825 | ++ 156.000000 11 25.700000 |
4826 | ++ 24336.000000 0 0.000000 |
4827 | ++ 3796416.00000 0 0.000000 |
4828 | ++TOO LONG 0 TOO LONG |
4829 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4830 | ++time count total |
4831 | ++ 0.000041 2 0.000000 |
4832 | ++ 0.006410 0 0.000000 |
4833 | ++ 1.000000 15 4.450000 |
4834 | ++ 156.000000 11 25.700000 |
4835 | ++ 24336.000000 0 0.000000 |
4836 | ++ 3796416.00000 0 0.000000 |
4837 | ++TOO LONG 0 TOO LONG |
4838 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; |
4839 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=default; |
4840 | ++DROP TABLE t; |
4841 | ++CREATE TABLE t(id INT); |
4842 | ++SET GLOBAL query_exec_time=0.1; |
4843 | ++include/restart_slave.inc |
4844 | ++SET SESSION query_exec_time=0.1; |
4845 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4846 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000; |
4847 | ++FLUSH QUERY_RESPONSE_TIME; |
4848 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4849 | ++SET SESSION query_exec_time = 0.31; |
4850 | ++INSERT INTO t VALUES(1); |
4851 | ++SET SESSION query_exec_time = 0.32; |
4852 | ++INSERT INTO t VALUES(1); |
4853 | ++SET SESSION query_exec_time = 0.33; |
4854 | ++INSERT INTO t VALUES(1); |
4855 | ++SET SESSION query_exec_time = 0.34; |
4856 | ++INSERT INTO t VALUES(1); |
4857 | ++SET SESSION query_exec_time = 0.35; |
4858 | ++INSERT INTO t VALUES(1); |
4859 | ++SET SESSION query_exec_time = 0.36; |
4860 | ++INSERT INTO t VALUES(1); |
4861 | ++SET SESSION query_exec_time = 0.37; |
4862 | ++INSERT INTO t VALUES(1); |
4863 | ++SET SESSION query_exec_time = 0.38; |
4864 | ++INSERT INTO t VALUES(1); |
4865 | ++SET SESSION query_exec_time = 0.39; |
4866 | ++INSERT INTO t VALUES(1); |
4867 | ++SET SESSION query_exec_time = 0.4; |
4868 | ++INSERT INTO t VALUES(1); |
4869 | ++SET SESSION query_exec_time = 1.1; |
4870 | ++INSERT INTO t VALUES(1); |
4871 | ++SET SESSION query_exec_time = 1.2; |
4872 | ++INSERT INTO t VALUES(1); |
4873 | ++SET SESSION query_exec_time = 1.3; |
4874 | ++INSERT INTO t VALUES(1); |
4875 | ++SET SESSION query_exec_time = 1.5; |
4876 | ++INSERT INTO t VALUES(1); |
4877 | ++SET SESSION query_exec_time = 1.4; |
4878 | ++INSERT INTO t VALUES(1); |
4879 | ++SET SESSION query_exec_time = 0.5; |
4880 | ++INSERT INTO t VALUES(1); |
4881 | ++SET SESSION query_exec_time = 2.1; |
4882 | ++INSERT INTO t VALUES(1); |
4883 | ++SET SESSION query_exec_time = 2.3; |
4884 | ++INSERT INTO t VALUES(1); |
4885 | ++SET SESSION query_exec_time = 2.5; |
4886 | ++INSERT INTO t VALUES(1); |
4887 | ++SET SESSION query_exec_time = 3.1; |
4888 | ++INSERT INTO t VALUES(1); |
4889 | ++SET SESSION query_exec_time = 4.1; |
4890 | ++INSERT INTO t VALUES(1); |
4891 | ++SET SESSION query_exec_time = 5.1; |
4892 | ++INSERT INTO t VALUES(1); |
4893 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4894 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4895 | ++Variable_name Value |
4896 | ++query_response_time_range_base 1000 |
4897 | ++SHOW QUERY_RESPONSE_TIME; |
4898 | ++ |
4899 | ++ 0.000001 2 0.000000 |
4900 | ++ 0.001000 0 0.000000 |
4901 | ++ 1.000000 14 4.350000 |
4902 | ++ 1000.000000 11 25.700000 |
4903 | ++ 1000000.00000 0 0.000000 |
4904 | ++TOO LONG 0 TOO LONG |
4905 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4906 | ++time count total |
4907 | ++ 0.000001 2 0.000000 |
4908 | ++ 0.001000 0 0.000000 |
4909 | ++ 1.000000 15 4.450000 |
4910 | ++ 1000.000000 11 25.700000 |
4911 | ++ 1000000.00000 0 0.000000 |
4912 | ++TOO LONG 0 TOO LONG |
4913 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; |
4914 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=default; |
4915 | ++DROP TABLE t; |
4916 | ++CREATE TABLE t(id INT); |
4917 | ++SET GLOBAL query_exec_time=0.1; |
4918 | ++include/restart_slave.inc |
4919 | ++SET SESSION query_exec_time=0.1; |
4920 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4921 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001; |
4922 | ++Warnings: |
4923 | ++Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' |
4924 | ++FLUSH QUERY_RESPONSE_TIME; |
4925 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; |
4926 | ++SET SESSION query_exec_time = 0.31; |
4927 | ++INSERT INTO t VALUES(1); |
4928 | ++SET SESSION query_exec_time = 0.32; |
4929 | ++INSERT INTO t VALUES(1); |
4930 | ++SET SESSION query_exec_time = 0.33; |
4931 | ++INSERT INTO t VALUES(1); |
4932 | ++SET SESSION query_exec_time = 0.34; |
4933 | ++INSERT INTO t VALUES(1); |
4934 | ++SET SESSION query_exec_time = 0.35; |
4935 | ++INSERT INTO t VALUES(1); |
4936 | ++SET SESSION query_exec_time = 0.36; |
4937 | ++INSERT INTO t VALUES(1); |
4938 | ++SET SESSION query_exec_time = 0.37; |
4939 | ++INSERT INTO t VALUES(1); |
4940 | ++SET SESSION query_exec_time = 0.38; |
4941 | ++INSERT INTO t VALUES(1); |
4942 | ++SET SESSION query_exec_time = 0.39; |
4943 | ++INSERT INTO t VALUES(1); |
4944 | ++SET SESSION query_exec_time = 0.4; |
4945 | ++INSERT INTO t VALUES(1); |
4946 | ++SET SESSION query_exec_time = 1.1; |
4947 | ++INSERT INTO t VALUES(1); |
4948 | ++SET SESSION query_exec_time = 1.2; |
4949 | ++INSERT INTO t VALUES(1); |
4950 | ++SET SESSION query_exec_time = 1.3; |
4951 | ++INSERT INTO t VALUES(1); |
4952 | ++SET SESSION query_exec_time = 1.5; |
4953 | ++INSERT INTO t VALUES(1); |
4954 | ++SET SESSION query_exec_time = 1.4; |
4955 | ++INSERT INTO t VALUES(1); |
4956 | ++SET SESSION query_exec_time = 0.5; |
4957 | ++INSERT INTO t VALUES(1); |
4958 | ++SET SESSION query_exec_time = 2.1; |
4959 | ++INSERT INTO t VALUES(1); |
4960 | ++SET SESSION query_exec_time = 2.3; |
4961 | ++INSERT INTO t VALUES(1); |
4962 | ++SET SESSION query_exec_time = 2.5; |
4963 | ++INSERT INTO t VALUES(1); |
4964 | ++SET SESSION query_exec_time = 3.1; |
4965 | ++INSERT INTO t VALUES(1); |
4966 | ++SET SESSION query_exec_time = 4.1; |
4967 | ++INSERT INTO t VALUES(1); |
4968 | ++SET SESSION query_exec_time = 5.1; |
4969 | ++INSERT INTO t VALUES(1); |
4970 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; |
4971 | ++SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; |
4972 | ++Variable_name Value |
4973 | ++query_response_time_range_base 1000 |
4974 | ++SHOW QUERY_RESPONSE_TIME; |
4975 | ++ |
4976 | ++ 0.000001 2 0.000000 |
4977 | ++ 0.001000 0 0.000000 |
4978 | ++ 1.000000 14 4.350000 |
4979 | ++ 1000.000000 11 25.700000 |
4980 | ++ 1000000.00000 0 0.000000 |
4981 | ++TOO LONG 0 TOO LONG |
4982 | ++SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; |
4983 | ++time count total |
4984 | ++ 0.000001 2 0.000000 |
4985 | ++ 0.001000 0 0.000000 |
4986 | ++ 1.000000 15 4.450000 |
4987 | ++ 1000.000000 11 25.700000 |
4988 | ++ 1000000.00000 0 0.000000 |
4989 | ++TOO LONG 0 TOO LONG |
4990 | ++SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; |
4991 | ++SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=default; |
4992 | ++DROP TABLE t; |
4993 | ++include/rpl_end.inc |
4994 | ++SET GLOBAL query_exec_time=default; |
4995 | ++SET GLOBAL query_exec_time=default; |
4996 | +diff -ruN /dev/null b/mysql-test/r/percona_query_response_time.result |
4997 | +--- /dev/null |
4998 | ++++ b/mysql-test/r/percona_query_response_time.result |
4999 | +@@ -0,0 +1,1003 @@ |
5000 | ++SET SESSION query_exec_time=0.1; |
The diff has been truncated for viewing.
http:// jenkins. percona. com/view/ Percona% 20Server% 205.1/job/ percona- server- 5.1-param/ 95/