Merge lp:~percona-dev/percona-server/release-5.1.53-response_time_distribution into lp:~percona-dev/percona-server/release-5.1.53

Proposed by Oleg Tsarev
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 171
Proposed branch: lp:~percona-dev/percona-server/release-5.1.53-response_time_distribution
Merge into: lp:~percona-dev/percona-server/release-5.1.53
Diff against target: 616 lines (+144/-51)
14 files modified
fix-bug671764.patch (+2/-2)
install_tests.sh (+1/-0)
mysql-syslog.patch (+3/-3)
mysql-test/have_response_time_distribution.inc (+4/-0)
mysql-test/have_response_time_distribution.require (+2/-0)
mysql-test/percona_server_variables.result (+1/-0)
mysql-test/percona_server_variables.test (+1/-0)
mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test (+1/-0)
mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test (+2/-2)
mysql-test/response-time-distribution.patch/percona_query_response_time.test (+2/-2)
mysql_remove_eol_carret.patch (+17/-11)
response-time-distribution.patch (+99/-22)
show_slave_status_nolock.patch (+3/-3)
sql_no_fcache.patch (+6/-6)
To merge this branch: bzr merge lp:~percona-dev/percona-server/release-5.1.53-response_time_distribution
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+43696@code.launchpad.net

This proposal supersedes a proposal from 2010-12-14.

Description of the change

Add option "--without-response_time_distribution"
Documentation is actual

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

Looks good to me.

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

This looks even better to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'fix-bug671764.patch'
2--- fix-bug671764.patch 2010-12-02 17:11:35 +0000
3+++ fix-bug671764.patch 2010-12-14 20:08:09 +0000
4@@ -1,7 +1,7 @@
5-diff -Nur a/configure.in b/configure.in
6+diff -ruN a/configure.in b/configure.in
7 --- a/configure.in 2010-11-29 18:45:47.000000000 +0000
8 +++ b/configure.in 2010-11-29 18:45:51.000000000 +0000
9-@@ -2816,7 +2816,7 @@
10+@@ -2837,7 +2837,7 @@
11 fi
12
13 # "innochecksum" is not in the "innobase/" subdirectory, but should be switched
14
15=== modified file 'install_tests.sh'
16--- install_tests.sh 2010-12-06 00:27:05 +0000
17+++ install_tests.sh 2010-12-14 20:08:09 +0000
18@@ -9,6 +9,7 @@
19 find $1 -iname '*.test' -exec install -m 644 {} ${PERCONA_SERVER}/mysql-test/t/ ';'
20 find $1 -iname '*.opt' -exec install -m 644 {} ${PERCONA_SERVER}/mysql-test/t/ ';'
21 find $1 -iname '*.result' -exec install -m 644 {} ${PERCONA_SERVER}/mysql-test/r/ ';'
22+ find $1 -iname '*.require' -exec install -m 644 {} ${PERCONA_SERVER}/mysql-test/r/ ';'
23 find $1 -iname '*.inc' -exec install -m 644 {} ${PERCONA_SERVER}/mysql-test/include/ ';'
24 }
25
26
27=== modified file 'mysql-syslog.patch'
28--- mysql-syslog.patch 2010-11-18 10:17:25 +0000
29+++ mysql-syslog.patch 2010-12-14 20:08:09 +0000
30@@ -77,12 +77,12 @@
31 +void write_syslog(char *line){
32 +#ifndef __WIN__
33 + char buff[901];
34-+ int i, buff_pos=0;
35++ uint i, buff_pos=0;
36 + for (i=0;i < strlen(line); i++){
37 + buff[buff_pos] = line[i];
38 + buff_pos++;
39 + if (buff_pos >= 900){
40-+ buff[900] = NULL;
41++ buff[900] = 0;
42 + buff_pos = 0;
43 + syslog(LOG_INFO, "SYSTEM_USER:%s, MYSQL_USER:%s, CONNECTION_ID:%lu, DB_SERVER:%s, DB:%s, QUERY:%s",
44 + getenv("SUDO_USER") ? getenv("SUDO_USER") :
45@@ -95,7 +95,7 @@
46 + }
47 + }
48 + if (buff_pos > 0){
49-+ buff[buff_pos] = NULL;
50++ buff[buff_pos] = 0;
51 + syslog(LOG_INFO, "SYSTEM_USER:%s, MYSQL_USER:%s, CONNECTION_ID:%lu, DB_SERVER:%s, DB:%s, QUERY:%s",
52 + getenv("SUDO_USER") ? getenv("SUDO_USER") :
53 + getenv("USER") ? getenv("USER") : "--",
54
55=== added file 'mysql-test/have_response_time_distribution.inc'
56--- mysql-test/have_response_time_distribution.inc 1970-01-01 00:00:00 +0000
57+++ mysql-test/have_response_time_distribution.inc 2010-12-14 20:08:09 +0000
58@@ -0,0 +1,4 @@
59+-- require r/have_response_time_distribution.require
60+disable_query_log;
61+show variables like 'have_response_time_distribution';
62+enable_query_log;
63
64=== added file 'mysql-test/have_response_time_distribution.require'
65--- mysql-test/have_response_time_distribution.require 1970-01-01 00:00:00 +0000
66+++ mysql-test/have_response_time_distribution.require 2010-12-14 20:08:09 +0000
67@@ -0,0 +1,2 @@
68+Variable_name Value
69+have_response_time_distribution YES
70
71=== modified file 'mysql-test/percona_server_variables.result'
72--- mysql-test/percona_server_variables.result 2010-10-04 11:11:06 +0000
73+++ mysql-test/percona_server_variables.result 2010-12-14 20:08:09 +0000
74@@ -64,6 +64,7 @@
75 have_openssl Value
76 have_partitioning Value
77 have_query_cache Value
78+have_response_time_distribution Value
79 have_rtree_keys Value
80 have_ssl Value
81 have_symlink Value
82
83=== modified file 'mysql-test/percona_server_variables.test'
84--- mysql-test/percona_server_variables.test 2010-08-11 15:03:01 +0000
85+++ mysql-test/percona_server_variables.test 2010-12-14 20:08:09 +0000
86@@ -1,3 +1,4 @@
87+--source include/have_response_time_distribution.inc
88 --source include/have_innodb.inc
89 --source include/have_debug.inc
90
91
92=== modified file 'mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test'
93--- mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test 2010-12-06 03:08:42 +0000
94+++ mysql-test/response-time-distribution.patch/percona_query_response_time-replication.test 2010-12-14 20:08:09 +0000
95@@ -1,3 +1,4 @@
96+--source include/have_response_time_distribution.inc
97 --source include/master-slave.inc
98 --source include/have_binlog_format_statement.inc
99 --source include/have_debug.inc
100
101=== modified file 'mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test'
102--- mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test 2010-12-06 03:08:42 +0000
103+++ mysql-test/response-time-distribution.patch/percona_query_response_time-stored.test 2010-12-14 20:08:09 +0000
104@@ -1,5 +1,5 @@
105-source include/have_innodb.inc;
106-source include/have_debug.inc;
107+--source include/have_response_time_distribution.inc
108+--source include/have_debug.inc
109 SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds";
110
111 delimiter /;
112
113=== modified file 'mysql-test/response-time-distribution.patch/percona_query_response_time.test'
114--- mysql-test/response-time-distribution.patch/percona_query_response_time.test 2010-12-06 03:08:42 +0000
115+++ mysql-test/response-time-distribution.patch/percona_query_response_time.test 2010-12-14 20:08:09 +0000
116@@ -1,5 +1,5 @@
117-source include/have_innodb.inc;
118-source include/have_debug.inc;
119+--source include/have_response_time_distribution.inc
120+--source include/have_debug.inc
121 SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds";
122 SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
123 SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
124
125=== modified file 'mysql_remove_eol_carret.patch'
126--- mysql_remove_eol_carret.patch 2010-12-09 18:03:54 +0000
127+++ mysql_remove_eol_carret.patch 2010-12-14 20:08:09 +0000
128@@ -1,17 +1,24 @@
129-diff -Nur a/client/client_priv.h b/client/client_priv.h
130+# name : mysql_remove_eol_carret.patch
131+# introduced : 11 or before
132+# maintainer : Oleg
133+#
134+#!!! notice !!!
135+# Any small change to this file in the main branch
136+# should be done or reviewed by the maintainer!
137+diff -ruN a/client/client_priv.h b/client/client_priv.h
138 --- a/client/client_priv.h 2010-07-06 15:06:50.000000000 -0700
139 +++ b/client/client_priv.h 2010-07-06 15:07:18.000000000 -0700
140-@@ -92,5 +92,6 @@
141- OPT_WRITE_BINLOG, OPT_DUMP_DATE,
142+@@ -93,5 +93,6 @@
143+ OPT_SYSLOG,
144 OPT_FIRST_SLAVE,
145 OPT_ALL,
146 + OPT_NO_REMOVE_EOL_CARRET,
147 OPT_MAX_CLIENT_OPTION
148 };
149-diff -Nur a/client/mysql.cc b/client/mysql.cc
150+diff -ruN a/client/mysql.cc b/client/mysql.cc
151 --- a/client/mysql.cc 2010-06-03 08:50:02.000000000 -0700
152 +++ b/client/mysql.cc 2010-07-06 15:07:18.000000000 -0700
153-@@ -141,6 +141,8 @@
154+@@ -143,6 +143,8 @@
155 enum enum_info_type { INFO_INFO,INFO_ERROR,INFO_RESULT};
156 typedef enum enum_info_type INFO_TYPE;
157
158@@ -20,7 +27,7 @@
159 static MYSQL mysql; /* The connection */
160 static my_bool ignore_errors=0,wait_flag=0,quick=0,
161 connected=0,opt_raw_data=0,unbuffered=0,output_tables=0,
162-@@ -1426,6 +1428,10 @@
163+@@ -1437,6 +1439,10 @@
164 NO_ARG, 1, 0, 0, 0, 0, 0},
165 {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
166 NO_ARG, 0, 0, 0, 0, 0, 0},
167@@ -29,9 +36,9 @@
168 + GET_BOOL,
169 + NO_ARG, 0, 0, 0, 0, 0, 0},
170 {"unbuffered", 'n', "Flush buffer after each query.", &unbuffered,
171- (uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
172+ &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
173 {"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
174-diff -Nur a/client/readline.cc b/client/readline.cc
175+diff -ruN a/client/readline.cc b/client/readline.cc
176 --- a/client/readline.cc 2010-06-03 08:50:23.000000000 -0700
177 +++ b/client/readline.cc 2010-07-06 15:07:18.000000000 -0700
178 @@ -20,6 +20,8 @@
179@@ -52,10 +59,10 @@
180 out_length--; /* Remove '\r' */
181 line_buff->read_length=out_length;
182 pos[out_length]=0;
183-diff -Nur a/patch_info/mysql_remove_eol_carret.patch b/patch_info/mysql_remove_eol_carret.patch
184+diff -ruN a/patch_info/mysql_remove_eol_carret.patch b/patch_info/mysql_remove_eol_carret.patch
185 --- a/patch_info/mysql_remove_eol_carret.patch 1969-12-31 16:00:00.000000000 -0800
186 +++ b/patch_info/mysql_remove_eol_carret.patch 2010-07-06 15:10:10.000000000 -0700
187-@@ -0,0 +1,8 @@
188+@@ -0,0 +1,7 @@
189 +File=mysql_remove_eol_carret.patch
190 +Name=
191 +Version=1.1
192@@ -63,4 +70,3 @@
193 +License=GPL
194 +Comment=Do not remove carret before eol if --no-remove-eol-carret is enabled in MySQL client.
195 +Changelog
196-+
197
198=== modified file 'response-time-distribution.patch'
199--- response-time-distribution.patch 2010-12-06 03:08:42 +0000
200+++ response-time-distribution.patch 2010-12-14 20:08:09 +0000
201@@ -110,65 +110,84 @@
202 diff -ruN a/sql/mysql_priv.h b/sql/mysql_priv.h
203 --- a/sql/mysql_priv.h 2010-11-01 08:43:57.000000000 +0000
204 +++ b/sql/mysql_priv.h 2010-11-01 08:52:40.000000000 +0000
205-@@ -2091,6 +2091,8 @@
206+@@ -2091,6 +2091,11 @@
207 extern my_bool opt_query_cache_strip_comments;
208 extern my_bool opt_use_global_long_query_time;
209 extern my_bool opt_slow_query_log_microseconds_timestamp;
210++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
211 +extern ulong opt_query_response_time_range_base;
212 +extern my_bool opt_enable_query_response_time_stats;
213++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
214++extern SHOW_COMP_OPTION have_response_time_distribution;
215 extern my_bool sp_automatic_privileges, opt_noacl;
216 extern my_bool opt_old_style_user_limits, trust_function_creators;
217 extern uint opt_crash_binlog_innodb;
218 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
219 --- a/sql/mysqld.cc 2010-11-01 08:43:57.000000000 +0000
220 +++ b/sql/mysqld.cc 2010-11-01 08:52:40.000000000 +0000
221-@@ -32,6 +32,8 @@
222+@@ -32,6 +32,7 @@
223
224 #include "rpl_injector.h"
225
226 +#include "query_response_time.h"
227-+
228 #ifdef HAVE_SYS_PRCTL_H
229 #include <sys/prctl.h>
230 #endif
231-@@ -530,6 +532,8 @@
232+@@ -530,6 +531,10 @@
233 my_bool opt_query_cache_strip_comments = 0;
234 my_bool opt_use_global_long_query_time= 0;
235 my_bool opt_slow_query_log_microseconds_timestamp= 0;
236++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
237 +ulong opt_query_response_time_range_base = QRT_DEFAULT_BASE;
238 +my_bool opt_enable_query_response_time_stats= 0;
239++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
240 my_bool lower_case_file_system= 0;
241 my_bool opt_large_pages= 0;
242 my_bool opt_myisam_use_mmap= 0;
243-@@ -1385,6 +1389,7 @@
244+@@ -675,6 +680,7 @@
245+ MY_LOCALE *my_default_lc_time_names;
246+
247+ SHOW_COMP_OPTION have_ssl, have_symlink, have_dlopen, have_query_cache;
248++SHOW_COMP_OPTION have_response_time_distribution;
249+ SHOW_COMP_OPTION have_geometry, have_rtree_keys;
250+ SHOW_COMP_OPTION have_crypt, have_compress;
251+ SHOW_COMP_OPTION have_community_features;
252+@@ -1385,6 +1391,9 @@
253 free_global_thread_stats();
254 free_global_table_stats();
255 free_global_index_stats();
256++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
257 + query_response_time_free();
258++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
259 #ifdef HAVE_REPLICATION
260 end_slave_list();
261 #endif
262-@@ -4087,6 +4092,7 @@
263+@@ -4087,6 +4096,9 @@
264
265 init_global_table_stats();
266 init_global_index_stats();
267++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
268 + query_response_time_init();
269++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
270
271 /* We have to initialize the storage engines before CSV logging */
272 if (ha_init())
273-@@ -5900,6 +5906,8 @@
274+@@ -5900,6 +5912,10 @@
275 OPT_USE_GLOBAL_LONG_QUERY_TIME,
276 OPT_USE_GLOBAL_LOG_SLOW_CONTROL,
277 OPT_SLOW_QUERY_LOG_MICROSECONDS_TIMESTAMP,
278++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
279 + OPT_QRT_RANGE_BASE,
280 + OPT_ENABLE_QRT_STATS,
281++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
282 OPT_IGNORE_BUILTIN_INNODB,
283 OPT_BINLOG_DIRECT_NON_TRANS_UPDATE,
284 OPT_DEFAULT_CHARACTER_SET_OLD
285-@@ -6969,6 +6977,21 @@
286+@@ -6969,6 +6985,23 @@
287 "Use microsecond time's precision in slow query log",
288 (uchar**) &opt_slow_query_log_microseconds_timestamp, (uchar**) &opt_slow_query_log_microseconds_timestamp,
289 0, GET_BOOL, REQUIRED_ARG, 0, 0, 1, 0, 1, 0},
290++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
291 + {"query_response_time_range_base", OPT_QRT_RANGE_BASE,
292 + "Select base of log for query_response_time ranges. WARNING: variable change affect only after flush",
293 + (uchar**) &opt_query_response_time_range_base, (uchar**) &opt_query_response_time_range_base,
294@@ -184,18 +203,32 @@
295 + "Enable or disable query response time statisics collecting",
296 + (uchar**) &opt_enable_query_response_time_stats, (uchar**) &opt_enable_query_response_time_stats,
297 + 0, GET_BOOL, REQUIRED_ARG, 0, 0, 1, 0, 1, 0},
298++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
299 {"lower_case_table_names", OPT_LOWER_CASE_TABLE_NAMES,
300 "If set to 1, table names are stored in lowercase on disk and table names "
301 "will be case-insensitive. Should be set to 2 if you are using a case-"
302+@@ -8183,6 +8216,11 @@
303+ #else
304+ have_query_cache=SHOW_OPTION_NO;
305+ #endif
306++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
307++ have_response_time_distribution= SHOW_OPTION_YES;
308++#else /* HAVE_RESPONSE_TIME_DISTRIBUTION */
309++ have_response_time_distribution= SHOW_OPTION_NO;
310++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
311+ #ifdef HAVE_SPATIAL
312+ have_geometry=SHOW_OPTION_YES;
313+ #else
314 diff -ruN a/sql/query_response_time.cc b/sql/query_response_time.cc
315 --- a/sql/query_response_time.cc 1970-01-01 00:00:00.000000000 +0000
316 +++ b/sql/query_response_time.cc 2010-11-02 15:34:52.000000000 +0000
317-@@ -0,0 +1,367 @@
318+@@ -0,0 +1,365 @@
319 +#ifdef __FreeBSD__
320 +#include <sys/types.h>
321 +#include <machine/atomic.h>
322 +#endif // __FreeBSD__
323 +#include "my_global.h"
324++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
325 +#include "mysql_priv.h"
326 +#include "mysql_com.h"
327 +#include "rpl_tblmap.h"
328@@ -558,10 +591,11 @@
329 +{
330 + return query_response_time::g_collector.fill(thd,tables,cond);
331 +}
332++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
333 diff -ruN a/sql/query_response_time.h b/sql/query_response_time.h
334 --- a/sql/query_response_time.h 1970-01-01 00:00:00.000000000 +0000
335 +++ b/sql/query_response_time.h 2010-11-01 08:52:40.000000000 +0000
336-@@ -0,0 +1,69 @@
337+@@ -0,0 +1,71 @@
338 +#ifndef QUERY_RESPONSE_TIME_H
339 +#define QUERY_RESPONSE_TIME_H
340 +
341@@ -624,24 +658,30 @@
342 +
343 +extern ST_SCHEMA_TABLE query_response_time_table;
344 +
345++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
346 +extern void query_response_time_init ();
347 +extern void query_response_time_free ();
348 +extern void query_response_time_flush ();
349 +extern void query_response_time_collect(ulonglong query_time);
350 +extern int query_response_time_fill (THD* thd, TABLE_LIST *tables, COND *cond);
351++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
352 +
353 +#endif // QUERY_RESPONSE_TIME_H
354 diff -ruN a/sql/set_var.cc b/sql/set_var.cc
355 --- a/sql/set_var.cc 2010-11-01 08:43:57.000000000 +0000
356 +++ b/sql/set_var.cc 2010-11-01 08:52:40.000000000 +0000
357-@@ -1006,6 +1006,10 @@
358+@@ -1006,6 +1006,14 @@
359 static sys_var_use_global_long_query_time sys_use_global_long_query_time;
360 static sys_var_bool_ptr sys_slow_query_log_microseconds_timestamp(&vars, "slow_query_log_microseconds_timestamp",
361 &opt_slow_query_log_microseconds_timestamp);
362++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
363 +static sys_var_bool_ptr sys_enable_query_response_time_stats(&vars, "enable_query_response_time_stats",
364 + &opt_enable_query_response_time_stats);
365 +static sys_var_long_ptr sys_query_response_time_range_base(&vars, "query_response_time_range_base",
366 + &opt_query_response_time_range_base);
367++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
368++static sys_var_have_variable sys_have_response_time_distribution(&vars, "have_response_time_distribution",
369++ &have_response_time_distribution);
370 /* Synonym of "slow_query_log" for consistency with SHOW VARIABLES output */
371 static sys_var_log_state sys_var_log_slow(&vars, "log_slow_queries",
372 &opt_slow_log, QUERY_LOG_SLOW);
373@@ -656,12 +696,15 @@
374
375 /**
376 @defgroup Runtime_Environment Runtime Environment
377-@@ -1750,23 +1751,31 @@
378+@@ -1750,23 +1751,37 @@
379 Do not log administrative statements unless the appropriate option is
380 set.
381 */
382-- if (thd->enable_slow_log)
383++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
384 + if (opt_enable_query_response_time_stats || thd->enable_slow_log)
385++#else /* HAVE_RESPONSE_TIME_DISTRIBUTION */
386+ if (thd->enable_slow_log)
387++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
388 {
389 - ulonglong end_utime_of_query= thd->current_utime();
390 - thd_proc_info(thd, "logging slow query");
391@@ -675,10 +718,12 @@
392 - thd->examined_row_count >= thd->variables.min_examined_row_limit)
393 + ulonglong end_utime_of_query = thd->current_utime();
394 + ulonglong query_execution_time = end_utime_of_query - thd->utime_after_lock;
395++ #ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
396 + if(opt_enable_query_response_time_stats)
397 + {
398 + query_response_time_collect(query_execution_time);
399 + }
400++ #endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
401 + if (thd->enable_slow_log)
402 {
403 thd_proc_info(thd, "logging slow query");
404@@ -702,7 +747,7 @@
405 }
406 }
407 DBUG_VOID_RETURN;
408-@@ -1891,6 +1900,7 @@
409+@@ -1891,6 +1906,7 @@
410 case SCH_CHARSETS:
411 case SCH_ENGINES:
412 case SCH_COLLATIONS:
413@@ -710,14 +755,16 @@
414 case SCH_COLLATION_CHARACTER_SET_APPLICABILITY:
415 case SCH_USER_PRIVILEGES:
416 case SCH_SCHEMA_PRIVILEGES:
417-@@ -7234,6 +7244,10 @@
418+@@ -7234,6 +7250,12 @@
419 init_global_index_stats();
420 pthread_mutex_unlock(&LOCK_global_index_stats);
421 }
422++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
423 + if (options & REFRESH_QUERY_RESPONSE_TIME)
424 + {
425 + query_response_time_flush();
426 + }
427++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
428 if (options & (REFRESH_USER_STATS | REFRESH_CLIENT_STATS | REFRESH_THREAD_STATS))
429 {
430 pthread_mutex_lock(&LOCK_global_user_client_stats);
431@@ -732,7 +779,7 @@
432 #include "debug_sync.h"
433
434 #define STR_OR_NIL(S) ((S) ? (S) : "<nil>")
435-@@ -7467,6 +7468,14 @@
436+@@ -7467,6 +7468,13 @@
437
438 */
439
440@@ -743,16 +790,20 @@
441 + {"total", QRT_TIME_STRING_LENGTH, MYSQL_TYPE_STRING, 0, 0, "", SKIP_OPEN_TABLE },
442 + {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE }
443 + };
444-+
445 ST_SCHEMA_TABLE schema_tables[]=
446 {
447 {"CHARACTER_SETS", charsets_fields_info, create_schema_table,
448-@@ -7521,6 +7530,8 @@
449+@@ -7521,6 +7529,13 @@
450 1, 9, 0, OPEN_TABLE_ONLY},
451 {"ROUTINES", proc_fields_info, create_schema_table,
452 fill_schema_proc, make_proc_old_format, 0, -1, -1, 0, 0},
453++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
454 + {"QUERY_RESPONSE_TIME", query_response_time_fields_info, create_schema_table,
455 + query_response_time_fill, make_old_format, 0, -1, -1, 0, 0},
456++#else /* HAVE_RESPONSE_TIME_DISTRIBUTION */
457++ {"QUERY_RESPONSE_TIME", query_response_time_fields_info, create_schema_table,
458++ 0, make_old_format, 0, -1, -1, 0, 0},
459++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
460 {"SCHEMATA", schema_fields_info, create_schema_table,
461 fill_schema_schemata, make_schemata_old_format, 0, 1, -1, 0, 0},
462 {"SCHEMA_PRIVILEGES", schema_privileges_fields_info, create_schema_table,
463@@ -767,30 +818,36 @@
464 %token QUICK
465 %token RANGE_SYM /* SQL-2003-R */
466 %token READS_SYM /* SQL-2003-R */
467-@@ -10396,6 +10397,13 @@
468+@@ -10396,6 +10397,15 @@
469 if (prepare_schema_table(YYTHD, lex, 0, SCH_INDEX_STATS))
470 MYSQL_YYABORT;
471 }
472 + | QUERY_RESPONSE_TIME_SYM wild_and_where
473 + {
474++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
475 + LEX *lex= Lex;
476 + lex->sql_command= SQLCOM_SELECT;
477 + if (prepare_schema_table(YYTHD, lex, 0, SCH_QUERY_RESPONSE_TIME))
478 + MYSQL_YYABORT;
479++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
480 + }
481 | CREATE PROCEDURE sp_name
482 {
483 LEX *lex= Lex;
484-@@ -10616,6 +10624,8 @@
485+@@ -10616,6 +10626,12 @@
486 { Lex->type|= REFRESH_TABLE_STATS; }
487 | INDEX_STATS_SYM
488 { Lex->type|= REFRESH_INDEX_STATS; }
489 + | QUERY_RESPONSE_TIME_SYM
490-+ { Lex->type|= REFRESH_QUERY_RESPONSE_TIME; }
491++ {
492++#ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
493++ Lex->type|= REFRESH_QUERY_RESPONSE_TIME;
494++#endif /* HAVE_RESPONSE_TIME_DISTRIBUTION */
495++ }
496 | MASTER_SYM
497 { Lex->type|= REFRESH_MASTER; }
498 | DES_KEY_FILE
499-@@ -11895,6 +11905,7 @@
500+@@ -11895,6 +11911,7 @@
501 | PROFILES_SYM {}
502 | QUARTER_SYM {}
503 | QUERY_SYM {}
504@@ -809,3 +866,23 @@
505 SCH_SCHEMATA,
506 SCH_SCHEMA_PRIVILEGES,
507 SCH_SESSION_STATUS,
508+diff -ruN a/configure.in b/configure.in
509+--- a/configure.in 2010-12-07 19:19:42.000000000 +0300
510++++ b/configure.in 2010-12-07 19:21:39.000000000 +0300
511+@@ -2718,7 +2718,16 @@
512+ AC_SUBST(readline_link)
513+ AC_SUBST(readline_h_ln_cmd)
514+
515++AC_ARG_WITH(response_time_distribution,
516++ AC_HELP_STRING([--without-response_time_distribution],[Disable response_time_distribution feature.]),
517++ [with_response_time_distribution=$withval],
518++ [with_response_time_distribution=yes]
519++)
520+
521++if test "$with_response_time_distribution" = "yes"
522++then
523++ AC_DEFINE([HAVE_RESPONSE_TIME_DISTRIBUTION], [1], [If we want to have response_time_distribution])
524++fi
525+
526+ # Include man pages, if desired, adapted to the configured parts.
527+ if test X"$with_man" = Xyes
528
529=== modified file 'show_slave_status_nolock.patch'
530--- show_slave_status_nolock.patch 2010-11-28 09:59:36 +0000
531+++ show_slave_status_nolock.patch 2010-12-14 20:08:09 +0000
532@@ -29,7 +29,7 @@
533 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
534 --- a/sql/mysqld.cc 2010-11-17 18:45:47.000000000 +0300
535 +++ b/sql/mysqld.cc 2010-11-17 18:46:55.000000000 +0300
536-@@ -3248,6 +3248,7 @@
537+@@ -3252,6 +3252,7 @@
538 {"show_profiles", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_PROFILES]), SHOW_LONG_STATUS},
539 {"show_slave_hosts", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_HOSTS]), SHOW_LONG_STATUS},
540 {"show_slave_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_STAT]), SHOW_LONG_STATUS},
541@@ -61,7 +61,7 @@
542 sql_command_flags[SQLCOM_SHOW_CREATE_PROC]= CF_STATUS_COMMAND;
543 sql_command_flags[SQLCOM_SHOW_CREATE_FUNC]= CF_STATUS_COMMAND;
544 sql_command_flags[SQLCOM_SHOW_CREATE_TRIGGER]= CF_STATUS_COMMAND;
545-@@ -2539,12 +2540,16 @@
546+@@ -2545,12 +2546,16 @@
547 pthread_mutex_unlock(&LOCK_active_mi);
548 break;
549 }
550@@ -79,7 +79,7 @@
551 if (active_mi != NULL)
552 {
553 res = show_master_info(thd, active_mi);
554-@@ -2555,7 +2560,10 @@
555+@@ -2561,7 +2566,10 @@
556 WARN_NO_MASTER_INFO, ER(WARN_NO_MASTER_INFO));
557 my_ok(thd);
558 }
559
560=== modified file 'sql_no_fcache.patch'
561--- sql_no_fcache.patch 2010-10-05 03:10:41 +0000
562+++ sql_no_fcache.patch 2010-12-14 20:08:09 +0000
563@@ -156,7 +156,7 @@
564 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
565 --- a/sql/mysqld.cc 2010-07-28 16:47:58.565318871 +0400
566 +++ b/sql/mysqld.cc 2010-07-28 16:48:03.004544367 +0400
567-@@ -46,6 +46,11 @@
568+@@ -45,6 +45,11 @@
569 #define OPT_NDB_SHM_DEFAULT 0
570 #endif
571 #endif
572@@ -168,7 +168,7 @@
573
574 #ifndef DEFAULT_SKIP_THREAD_PRIORITY
575 #define DEFAULT_SKIP_THREAD_PRIORITY 0
576-@@ -594,6 +599,11 @@
577+@@ -595,6 +600,11 @@
578 ulong max_connections, max_connect_errors;
579 uint max_user_connections= 0;
580 ulonglong denied_connections = 0;
581@@ -180,7 +180,7 @@
582 /**
583 Limit of the total number of prepared statements in the server.
584 Is necessary to protect the server against out-of-memory attacks.
585-@@ -4375,6 +4385,97 @@
586+@@ -4381,6 +4391,97 @@
587 }
588 #endif//DBUG_OFF
589
590@@ -278,7 +278,7 @@
591
592 #ifdef __WIN__
593 int win_main(int argc, char **argv)
594-@@ -4479,6 +4580,10 @@
595+@@ -4485,6 +4586,10 @@
596 test_lc_time_sz();
597 #endif
598
599@@ -289,7 +289,7 @@
600 /*
601 We have enough space for fiddling with the argv, continue
602 */
603-@@ -4680,6 +4785,10 @@
604+@@ -4686,6 +4791,10 @@
605 clean_up_mutexes();
606 my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
607
608@@ -300,7 +300,7 @@
609 exit(0);
610 return(0); /* purecov: deadcode */
611 }
612-@@ -7832,6 +7941,7 @@
613+@@ -7842,6 +7951,7 @@
614 {"Delayed_errors", (char*) &delayed_insert_errors, SHOW_LONG},
615 {"Delayed_insert_threads", (char*) &delayed_insert_threads, SHOW_LONG_NOFLUSH},
616 {"Delayed_writes", (char*) &delayed_insert_writes, SHOW_LONG},

Subscribers

People subscribed via source and target branches

to all changes: