Merge lp:~percona-dev/percona-xtradb/fix-bug391189 into lp:~percona-dev/percona-xtradb/extensions-1.0

Proposed by Yasufumi Kinoshita
Status: Merged
Merged at revision: not available
Proposed branch: lp:~percona-dev/percona-xtradb/fix-bug391189
Merge into: lp:~percona-dev/percona-xtradb/extensions-1.0
Diff against target: None lines
To merge this branch: bzr merge lp:~percona-dev/percona-xtradb/fix-bug391189
Reviewer Review Type Date Requested Status
Vadim Tkachenko Approve
Review via email: mp+7827@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vadim Tkachenko (vadim-tk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'innodb_stats.patch'
2--- innodb_stats.patch 2009-06-19 02:14:08 +0000
3+++ innodb_stats.patch 2009-06-24 02:09:53 +0000
4@@ -1,6 +1,6 @@
5-diff -r 7672d7bc731d btr/btr0cur.c
6---- a/btr/btr0cur.c Thu Jun 18 19:11:59 2009 -0700
7-+++ b/btr/btr0cur.c Thu Jun 18 19:12:19 2009 -0700
8+diff -ru innodb_plugin-1.0.3_orig/btr/btr0cur.c innodb_plugin-1.0.3_tmp/btr/btr0cur.c
9+--- innodb_plugin-1.0.3_orig/btr/btr0cur.c 2009-06-24 10:47:36.000000000 +0900
10++++ innodb_plugin-1.0.3_tmp/btr/btr0cur.c 2009-06-24 10:53:16.000000000 +0900
11 @@ -3202,7 +3202,9 @@
12 ulint n_cols;
13 ulint matched_fields;
14@@ -51,6 +51,15 @@
15 rec_t* next_rec = page_rec_get_next(rec);
16 if (next_rec == supremum) {
17 break;
18+@@ -3274,7 +3295,7 @@
19+ cmp_rec_rec_with_match(rec, next_rec,
20+ offsets_rec, offsets_next_rec,
21+ index, &matched_fields,
22+- &matched_bytes);
23++ &matched_bytes, srv_stats_method);
24+
25+ for (j = matched_fields + 1; j <= n_cols; j++) {
26+ /* We add one if this index record has
27 @@ -3359,9 +3380,21 @@
28 }
29
30@@ -73,9 +82,9 @@
31 if (UNIV_LIKELY_NULL(heap)) {
32 mem_heap_free(heap);
33 }
34-diff -r 7672d7bc731d dict/dict0dict.c
35---- a/dict/dict0dict.c Thu Jun 18 19:11:59 2009 -0700
36-+++ b/dict/dict0dict.c Thu Jun 18 19:12:19 2009 -0700
37+diff -ru innodb_plugin-1.0.3_orig/dict/dict0dict.c innodb_plugin-1.0.3_tmp/dict/dict0dict.c
38+--- innodb_plugin-1.0.3_orig/dict/dict0dict.c 2009-06-24 10:47:36.000000000 +0900
39++++ innodb_plugin-1.0.3_tmp/dict/dict0dict.c 2009-06-24 10:48:05.000000000 +0900
40 @@ -4338,7 +4338,8 @@
41
42 ut_ad(mutex_own(&(dict_sys->mutex)));
43@@ -86,9 +95,9 @@
44
45 fprintf(stderr,
46 "--------------------------------------\n"
47-diff -r 7672d7bc731d dict/dict0load.c
48---- a/dict/dict0load.c Thu Jun 18 19:11:59 2009 -0700
49-+++ b/dict/dict0load.c Thu Jun 18 19:12:19 2009 -0700
50+diff -ru innodb_plugin-1.0.3_orig/dict/dict0load.c innodb_plugin-1.0.3_tmp/dict/dict0load.c
51+--- innodb_plugin-1.0.3_orig/dict/dict0load.c 2009-02-17 17:15:06.000000000 +0900
52++++ innodb_plugin-1.0.3_tmp/dict/dict0load.c 2009-06-24 10:48:05.000000000 +0900
53 @@ -223,7 +223,7 @@
54 /* The table definition was corrupt if there
55 is no index */
56@@ -98,9 +107,9 @@
57 dict_update_statistics_low(table, TRUE);
58 }
59
60-diff -r 7672d7bc731d handler/ha_innodb.cc
61---- a/handler/ha_innodb.cc Thu Jun 18 19:11:59 2009 -0700
62-+++ b/handler/ha_innodb.cc Thu Jun 18 19:12:19 2009 -0700
63+diff -ru innodb_plugin-1.0.3_orig/handler/ha_innodb.cc innodb_plugin-1.0.3_tmp/handler/ha_innodb.cc
64+--- innodb_plugin-1.0.3_orig/handler/ha_innodb.cc 2009-06-24 10:47:36.000000000 +0900
65++++ innodb_plugin-1.0.3_tmp/handler/ha_innodb.cc 2009-06-24 10:48:05.000000000 +0900
66 @@ -7086,7 +7086,9 @@
67 ib_table = prebuilt->table;
68
69@@ -162,9 +171,9 @@
70 i_s_innodb_patches
71 mysql_declare_plugin_end;
72
73-diff -r 7672d7bc731d handler/i_s.cc
74---- a/handler/i_s.cc Thu Jun 18 19:11:59 2009 -0700
75-+++ b/handler/i_s.cc Thu Jun 18 19:12:19 2009 -0700
76+diff -ru innodb_plugin-1.0.3_orig/handler/i_s.cc innodb_plugin-1.0.3_tmp/handler/i_s.cc
77+--- innodb_plugin-1.0.3_orig/handler/i_s.cc 2009-06-24 10:47:36.000000000 +0900
78++++ innodb_plugin-1.0.3_tmp/handler/i_s.cc 2009-06-24 10:48:05.000000000 +0900
79 @@ -45,6 +45,7 @@
80 #include "dict0dict.h" /* for dict_index_get_if_in_cache */
81 #include "trx0rseg.h" /* for trx_rseg_struct */
82@@ -473,9 +482,9 @@
83 + STRUCT_FLD(system_vars, NULL),
84 + STRUCT_FLD(__reserved1, NULL)
85 +};
86-diff -r 7672d7bc731d handler/i_s.h
87---- a/handler/i_s.h Thu Jun 18 19:11:59 2009 -0700
88-+++ b/handler/i_s.h Thu Jun 18 19:12:19 2009 -0700
89+diff -ru innodb_plugin-1.0.3_orig/handler/i_s.h innodb_plugin-1.0.3_tmp/handler/i_s.h
90+--- innodb_plugin-1.0.3_orig/handler/i_s.h 2009-06-24 10:47:36.000000000 +0900
91++++ innodb_plugin-1.0.3_tmp/handler/i_s.h 2009-06-24 10:48:05.000000000 +0900
92 @@ -37,5 +37,7 @@
93 extern struct st_mysql_plugin i_s_innodb_cmpmem_reset;
94 extern struct st_mysql_plugin i_s_innodb_patches;
95@@ -484,9 +493,9 @@
96 +extern struct st_mysql_plugin i_s_innodb_index_stats;
97
98 #endif /* i_s_h */
99-diff -r 7672d7bc731d handler/innodb_patch_info.h
100---- a/handler/innodb_patch_info.h Thu Jun 18 19:11:59 2009 -0700
101-+++ b/handler/innodb_patch_info.h Thu Jun 18 19:12:19 2009 -0700
102+diff -ru innodb_plugin-1.0.3_orig/handler/innodb_patch_info.h innodb_plugin-1.0.3_tmp/handler/innodb_patch_info.h
103+--- innodb_plugin-1.0.3_orig/handler/innodb_patch_info.h 2009-06-24 10:47:36.000000000 +0900
104++++ innodb_plugin-1.0.3_tmp/handler/innodb_patch_info.h 2009-06-24 10:48:05.000000000 +0900
105 @@ -36,5 +36,6 @@
106 {"innodb_expand_import","convert .ibd file automatically when import tablespace","the files are generated by xtrabackup export mode.","http://www.percona.com/docs/wiki/percona-xtradb"},
107 {"innodb_dict_size_limit","Limit dictionary cache size","Variable innodb_dict_size_limit in bytes","http://www.percona.com/docs/wiki/percona-xtradb"},
108@@ -494,9 +503,35 @@
109 +{"innodb_stats","Additional features about InnoDB statistics/optimizer","","http://www.percona.com/docs/wiki/percona-xtradb"},
110 {NULL, NULL, NULL, NULL}
111 };
112-diff -r 7672d7bc731d include/srv0srv.h
113---- a/include/srv0srv.h Thu Jun 18 19:11:59 2009 -0700
114-+++ b/include/srv0srv.h Thu Jun 18 19:12:19 2009 -0700
115+diff -ru innodb_plugin-1.0.3_orig/include/rem0cmp.h innodb_plugin-1.0.3_tmp/include/rem0cmp.h
116+--- innodb_plugin-1.0.3_orig/include/rem0cmp.h 2009-02-17 18:29:55.000000000 +0900
117++++ innodb_plugin-1.0.3_tmp/include/rem0cmp.h 2009-06-24 10:51:08.000000000 +0900
118+@@ -177,10 +177,11 @@
119+ matched fields; when the function returns,
120+ contains the value the for current
121+ comparison */
122+- ulint* matched_bytes);/* in/out: number of already matched
123++ ulint* matched_bytes, /* in/out: number of already matched
124+ bytes within the first field not completely
125+ matched; when the function returns, contains
126+ the value for the current comparison */
127++ ulint stats_method);
128+ /*****************************************************************
129+ This function is used to compare two physical records. Only the common
130+ first fields are compared. */
131+diff -ru innodb_plugin-1.0.3_orig/include/rem0cmp.ic innodb_plugin-1.0.3_tmp/include/rem0cmp.ic
132+--- innodb_plugin-1.0.3_orig/include/rem0cmp.ic 2009-02-17 18:29:55.000000000 +0900
133++++ innodb_plugin-1.0.3_tmp/include/rem0cmp.ic 2009-06-24 10:57:50.000000000 +0900
134+@@ -88,5 +88,5 @@
135+ ulint match_b = 0;
136+
137+ return(cmp_rec_rec_with_match(rec1, rec2, offsets1, offsets2, index,
138+- &match_f, &match_b));
139++ &match_f, &match_b, 0));
140+ }
141+diff -ru innodb_plugin-1.0.3_orig/include/srv0srv.h innodb_plugin-1.0.3_tmp/include/srv0srv.h
142+--- innodb_plugin-1.0.3_orig/include/srv0srv.h 2009-06-24 10:47:36.000000000 +0900
143++++ innodb_plugin-1.0.3_tmp/include/srv0srv.h 2009-06-24 10:48:05.000000000 +0900
144 @@ -165,6 +165,11 @@
145 extern ibool srv_innodb_status;
146
147@@ -509,27 +544,28 @@
148
149 extern ibool srv_use_doublewrite_buf;
150 extern ibool srv_use_checksums;
151-diff -r 7672d7bc731d page/page0page.c
152---- a/page/page0page.c Thu Jun 18 19:11:59 2009 -0700
153-+++ b/page/page0page.c Thu Jun 18 19:12:19 2009 -0700
154-@@ -2349,7 +2349,7 @@
155- if (UNIV_LIKELY(count >= PAGE_HEAP_NO_USER_LOW)
156- && !page_rec_is_supremum(rec)) {
157- if (UNIV_UNLIKELY
158-- (1 != cmp_rec_rec(rec, old_rec,
159-+ (-1 != cmp_rec_rec(old_rec, rec,
160- offsets, old_offsets, index))) {
161- fprintf(stderr,
162- "InnoDB: Records in wrong order"
163-diff -r 7672d7bc731d rem/rem0cmp.c
164---- a/rem/rem0cmp.c Thu Jun 18 19:11:59 2009 -0700
165-+++ b/rem/rem0cmp.c Thu Jun 18 19:12:19 2009 -0700
166-@@ -989,7 +989,11 @@
167+diff -ru innodb_plugin-1.0.3_orig/rem/rem0cmp.c innodb_plugin-1.0.3_tmp/rem/rem0cmp.c
168+--- innodb_plugin-1.0.3_orig/rem/rem0cmp.c 2009-02-17 19:05:45.000000000 +0900
169++++ innodb_plugin-1.0.3_tmp/rem/rem0cmp.c 2009-06-24 10:52:00.000000000 +0900
170+@@ -892,10 +892,11 @@
171+ matched fields; when the function returns,
172+ contains the value the for current
173+ comparison */
174+- ulint* matched_bytes) /* in/out: number of already matched
175++ ulint* matched_bytes, /* in/out: number of already matched
176+ bytes within the first field not completely
177+ matched; when the function returns, contains
178+ the value for the current comparison */
179++ ulint stats_method)
180+ {
181+ #ifndef UNIV_HOTBACKUP
182+ ulint rec1_n_fields; /* the number of fields in rec */
183+@@ -989,7 +990,11 @@
184
185 if (rec1_f_len == rec2_f_len) {
186
187 - goto next_field;
188-+ if (srv_stats_method == SRV_STATS_METHOD_NULLS_EQUAL) {
189++ if (stats_method == SRV_STATS_METHOD_NULLS_EQUAL) {
190 + goto next_field;
191 + } else {
192 + ret = -1;
193@@ -537,9 +573,9 @@
194
195 } else if (rec2_f_len == UNIV_SQL_NULL) {
196
197-diff -r 7672d7bc731d row/row0mysql.c
198---- a/row/row0mysql.c Thu Jun 18 19:11:59 2009 -0700
199-+++ b/row/row0mysql.c Thu Jun 18 19:12:19 2009 -0700
200+diff -ru innodb_plugin-1.0.3_orig/row/row0mysql.c innodb_plugin-1.0.3_tmp/row/row0mysql.c
201+--- innodb_plugin-1.0.3_orig/row/row0mysql.c 2009-02-17 19:05:45.000000000 +0900
202++++ innodb_plugin-1.0.3_tmp/row/row0mysql.c 2009-06-24 10:48:05.000000000 +0900
203 @@ -854,6 +854,9 @@
204
205 table->stat_modified_counter = counter + 1;
206@@ -550,18 +586,18 @@
207 /* Calculate new statistics if 1 / 16 of table has been modified
208 since the last time a statistics batch was run, or if
209 stat_modified_counter > 2 000 000 000 (to avoid wrap-around).
210-diff -r 7672d7bc731d scripts/install_innodb_plugins.sql
211---- a/scripts/install_innodb_plugins.sql Thu Jun 18 19:11:59 2009 -0700
212-+++ b/scripts/install_innodb_plugins.sql Thu Jun 18 19:12:19 2009 -0700
213+diff -ru innodb_plugin-1.0.3_orig/scripts/install_innodb_plugins.sql innodb_plugin-1.0.3_tmp/scripts/install_innodb_plugins.sql
214+--- innodb_plugin-1.0.3_orig/scripts/install_innodb_plugins.sql 2009-06-24 10:47:36.000000000 +0900
215++++ innodb_plugin-1.0.3_tmp/scripts/install_innodb_plugins.sql 2009-06-24 10:48:05.000000000 +0900
216 @@ -12,3 +12,5 @@
217 INSTALL PLUGIN INNODB_BUFFER_POOL_PAGES_BLOB SONAME 'ha_innodb.so';
218 INSTALL PLUGIN INNODB_BUFFER_POOL_PAGES_INDEX SONAME 'ha_innodb.so';
219 INSTALL PLUGIN innodb_rseg SONAME 'ha_innodb.so';
220 +INSTALL PLUGIN innodb_table_stats SONAME 'ha_innodb.so';
221 +INSTALL PLUGIN innodb_index_stats SONAME 'ha_innodb.so';
222-diff -r 7672d7bc731d srv/srv0srv.c
223---- a/srv/srv0srv.c Thu Jun 18 19:11:59 2009 -0700
224-+++ b/srv/srv0srv.c Thu Jun 18 19:12:19 2009 -0700
225+diff -ru innodb_plugin-1.0.3_orig/srv/srv0srv.c innodb_plugin-1.0.3_tmp/srv/srv0srv.c
226+--- innodb_plugin-1.0.3_orig/srv/srv0srv.c 2009-06-24 10:47:36.000000000 +0900
227++++ innodb_plugin-1.0.3_tmp/srv/srv0srv.c 2009-06-24 10:48:05.000000000 +0900
228 @@ -337,6 +337,8 @@
229 /* When estimating number of different key values in an index, sample
230 this many index pages */

Subscribers

People subscribed via source and target branches

to all changes: