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