Merge lp:~tsarev/percona-server/5.5.17-porting into lp:percona-server/5.5
- 5.5.17-porting
- Merge into 5.5
Status: | Superseded |
---|---|
Proposed branch: | lp:~tsarev/percona-server/5.5.17-porting |
Merge into: | lp:percona-server/5.5 |
Diff against target: |
5083 lines (+686/-687) 41 files modified
Makefile (+1/-1) patches/innodb_adaptive_hash_index_partitions.patch (+69/-116) patches/innodb_admin_command_base.patch (+1/-1) patches/innodb_buffer_pool_pages_i_s.patch (+3/-3) patches/innodb_buffer_pool_shm.patch (+3/-3) patches/innodb_deadlock_count.patch (+1/-1) patches/innodb_dict_size_limit.patch (+10/-10) patches/innodb_expand_fast_index_creation.patch (+3/-3) patches/innodb_expand_import.patch (+18/-18) patches/innodb_extend_slow.patch (+3/-3) patches/innodb_extra_rseg.patch (+1/-1) patches/innodb_fake_changes.patch (+44/-43) patches/innodb_fast_checksum.patch (+5/-5) patches/innodb_files_extend.patch (+10/-10) patches/innodb_fix_misc.patch (+22/-22) patches/innodb_io_patches.patch (+10/-10) patches/innodb_kill_idle_transaction.patch (+49/-23) patches/innodb_lru_dump_restore.patch (+8/-8) patches/innodb_opt_lru_count.patch (+3/-3) patches/innodb_overwrite_relay_log_info.patch (+5/-5) patches/innodb_pass_corrupt_table.patch (+129/-129) patches/innodb_recovery_patches.patch (+3/-3) patches/innodb_separate_doublewrite.patch (+8/-8) patches/innodb_show_lock_name.patch (+8/-8) patches/innodb_show_status.patch (+11/-11) patches/innodb_show_status_extend.patch (+6/-6) patches/innodb_show_sys_tables.patch (+4/-4) patches/innodb_split_buf_pool_mutex.patch (+110/-73) patches/innodb_stats.patch (+39/-39) patches/innodb_thread_concurrency_timer_based.patch (+4/-4) patches/memory_dynamic_rows.patch (+52/-49) patches/mysql-test.diff (+6/-30) patches/percona_support.patch (+1/-1) patches/response_time_distribution.patch (+3/-3) patches/show_slave_status_nolock.patch (+1/-1) patches/show_temp.patch (+2/-2) patches/slow_extended.patch (+7/-7) patches/sql_no_fcache.patch (+1/-1) patches/subunit.patch (+1/-1) patches/userstat.patch (+17/-17) patches/valgrind_zlib_suppression.patch (+4/-1) |
To merge this branch: | bzr merge lp:~tsarev/percona-server/5.5.17-porting |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stewart Smith | Pending | ||
Review via email: mp+82120@code.launchpad.net |
This proposal supersedes a proposal from 2011-11-02.
This proposal has been superseded by a proposal from 2011-11-16.
Commit message
Description of the change
Porting to 5.5.17
Jenkins results: http://
About failures:
1) main.percona_
2) main.percona_
3) main.percona_
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal | # |
Oleg Tsarev (tsarev) wrote : Posted in a previous version of this proposal | # |
So, looks like this is Yasufumi changes.
Need reassign to him.
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal | # |
On Thu, 03 Nov 2011 11:15:27 -0000, Oleg Tsarev <email address hidden> wrote:
> So, looks like this is Yasufumi changes.
> Need reassign to him.
yes.
--
Stewart Smith
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal | # |
(setting to Work In Progress) as we need clean port.
Preview Diff
1 | === modified file 'Makefile' |
2 | --- Makefile 2011-10-11 06:44:44 +0000 |
3 | +++ Makefile 2011-11-16 09:37:24 +0000 |
4 | @@ -1,6 +1,6 @@ |
5 | FETCH_CMD=wget |
6 | MASTER_SITE=http://s3.amazonaws.com/percona.com/downloads/community |
7 | -MYSQL_VERSION=5.5.16 |
8 | +MYSQL_VERSION=5.5.17 |
9 | PERCONA_SERVER_VERSION=rel21.0 |
10 | PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION) |
11 | PERCONA_SERVER_SHORT_1 ?=Percona-Server-$(MYSQL_VERSION) |
12 | |
13 | === modified file 'patches/innodb_adaptive_hash_index_partitions.patch' |
14 | --- patches/innodb_adaptive_hash_index_partitions.patch 2011-10-10 14:35:27 +0000 |
15 | +++ patches/innodb_adaptive_hash_index_partitions.patch 2011-11-16 09:37:24 +0000 |
16 | @@ -7,7 +7,7 @@ |
17 | # should be done or reviewed by the maintainer! |
18 | --- a/storage/innobase/btr/btr0btr.c |
19 | +++ b/storage/innobase/btr/btr0btr.c |
20 | -@@ -1518,7 +1518,7 @@ |
21 | +@@ -1523,7 +1523,7 @@ |
22 | } |
23 | ut_a(block); |
24 | |
25 | @@ -16,7 +16,7 @@ |
26 | |
27 | header = buf_block_get_frame(block) + PAGE_HEADER + PAGE_BTR_SEG_TOP; |
28 | #ifdef UNIV_BTR_DEBUG |
29 | -@@ -1587,7 +1587,7 @@ |
30 | +@@ -1592,7 +1592,7 @@ |
31 | |
32 | #ifndef UNIV_HOTBACKUP |
33 | if (UNIV_LIKELY(!recovery)) { |
34 | @@ -25,7 +25,7 @@ |
35 | } |
36 | |
37 | block->check_index_page_at_flush = TRUE; |
38 | -@@ -1755,7 +1755,7 @@ |
39 | +@@ -1760,7 +1760,7 @@ |
40 | ut_a(!page_zip || page_zip_validate(page_zip, page)); |
41 | #endif /* UNIV_ZIP_DEBUG */ |
42 | |
43 | @@ -34,7 +34,7 @@ |
44 | btr_blob_dbg_remove(page, index, "btr_page_empty"); |
45 | |
46 | /* Recreate the page: note that global data on page (possible |
47 | -@@ -3066,7 +3066,7 @@ |
48 | +@@ -3093,7 +3093,7 @@ |
49 | mem_heap_free(heap); |
50 | } |
51 | |
52 | @@ -43,7 +43,7 @@ |
53 | |
54 | /* Make the father empty */ |
55 | btr_page_empty(father_block, father_page_zip, index, page_level, mtr); |
56 | -@@ -3300,7 +3300,7 @@ |
57 | +@@ -3317,7 +3317,7 @@ |
58 | goto err_exit; |
59 | } |
60 | |
61 | @@ -51,8 +51,8 @@ |
62 | + btr_search_drop_page_hash_index(block, index); |
63 | |
64 | /* Remove the page from the level list */ |
65 | - btr_level_list_remove(space, zip_size, page, mtr); |
66 | -@@ -3345,7 +3345,7 @@ |
67 | + btr_level_list_remove(space, zip_size, page, index, mtr); |
68 | +@@ -3358,7 +3358,7 @@ |
69 | goto err_exit; |
70 | } |
71 | |
72 | @@ -61,7 +61,7 @@ |
73 | |
74 | #ifdef UNIV_BTR_DEBUG |
75 | if (UNIV_LIKELY_NULL(merge_page_zip)) { |
76 | -@@ -3469,7 +3469,7 @@ |
77 | +@@ -3473,7 +3473,7 @@ |
78 | ut_a(btr_page_get_next(page, mtr) == FIL_NULL); |
79 | |
80 | ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); |
81 | @@ -70,7 +70,7 @@ |
82 | |
83 | btr_page_get_father(index, block, mtr, &cursor); |
84 | father = btr_cur_get_block(&cursor); |
85 | -@@ -3574,7 +3574,7 @@ |
86 | +@@ -3578,7 +3578,7 @@ |
87 | |
88 | page = buf_block_get_frame(block); |
89 | ut_a(page_is_comp(merge_page) == page_is_comp(page)); |
90 | @@ -81,7 +81,7 @@ |
91 | |
92 | --- a/storage/innobase/btr/btr0cur.c |
93 | +++ b/storage/innobase/btr/btr0cur.c |
94 | -@@ -498,7 +498,7 @@ |
95 | +@@ -502,7 +502,7 @@ |
96 | #ifdef UNIV_SEARCH_PERF_STAT |
97 | info->n_searches++; |
98 | #endif |
99 | @@ -90,7 +90,7 @@ |
100 | && latch_mode <= BTR_MODIFY_LEAF |
101 | && info->last_hash_succ |
102 | && !estimate |
103 | -@@ -534,7 +534,7 @@ |
104 | +@@ -538,7 +538,7 @@ |
105 | |
106 | if (has_search_latch) { |
107 | /* Release possible search latch to obey latching order */ |
108 | @@ -99,7 +99,7 @@ |
109 | } |
110 | |
111 | /* Store the position of the tree latch we push to mtr so that we |
112 | -@@ -856,7 +856,7 @@ |
113 | +@@ -862,7 +862,7 @@ |
114 | |
115 | if (has_search_latch) { |
116 | |
117 | @@ -108,7 +108,7 @@ |
118 | } |
119 | } |
120 | |
121 | -@@ -1971,7 +1971,7 @@ |
122 | +@@ -1992,13 +1992,13 @@ |
123 | btr_search_update_hash_on_delete(cursor); |
124 | } |
125 | |
126 | @@ -116,50 +116,14 @@ |
127 | + rw_lock_x_lock(btr_search_get_latch(cursor->index->id)); |
128 | } |
129 | |
130 | - if (!(flags & BTR_KEEP_SYS_FLAG)) { |
131 | -@@ -1985,7 +1985,7 @@ |
132 | row_upd_rec_in_place(rec, index, offsets, update, page_zip); |
133 | |
134 | - if (block->is_hashed) { |
135 | + if (is_hashed) { |
136 | - rw_lock_x_unlock(&btr_search_latch); |
137 | + rw_lock_x_unlock(btr_search_get_latch(cursor->index->id)); |
138 | } |
139 | |
140 | if (page_zip && !dict_index_is_clust(index) |
141 | -@@ -2824,7 +2824,7 @@ |
142 | - } |
143 | - |
144 | - if (block->is_hashed) { |
145 | -- rw_lock_x_lock(&btr_search_latch); |
146 | -+ rw_lock_x_lock(btr_search_get_latch(index->id)); |
147 | - } |
148 | - |
149 | - page_zip = buf_block_get_page_zip(block); |
150 | -@@ -2840,7 +2840,7 @@ |
151 | - } |
152 | - |
153 | - if (block->is_hashed) { |
154 | -- rw_lock_x_unlock(&btr_search_latch); |
155 | -+ rw_lock_x_unlock(btr_search_get_latch(index->id)); |
156 | - } |
157 | - |
158 | - btr_cur_del_mark_set_clust_rec_log(flags, rec, index, val, trx, |
159 | -@@ -2967,13 +2967,13 @@ |
160 | - == dict_table_is_comp(cursor->index->table)); |
161 | - |
162 | - if (block->is_hashed) { |
163 | -- rw_lock_x_lock(&btr_search_latch); |
164 | -+ rw_lock_x_lock(btr_search_get_latch(cursor->index->id)); |
165 | - } |
166 | - |
167 | - btr_rec_set_deleted_flag(rec, buf_block_get_page_zip(block), val); |
168 | - |
169 | - if (block->is_hashed) { |
170 | -- rw_lock_x_unlock(&btr_search_latch); |
171 | -+ rw_lock_x_unlock(btr_search_get_latch(cursor->index->id)); |
172 | - } |
173 | - |
174 | - btr_cur_del_mark_set_sec_rec_log(rec, val, mtr); |
175 | --- a/storage/innobase/btr/btr0sea.c |
176 | +++ b/storage/innobase/btr/btr0sea.c |
177 | @@ -48,6 +48,8 @@ |
178 | @@ -425,7 +389,7 @@ |
179 | } |
180 | |
181 | if (build_index) { |
182 | -@@ -881,17 +909,17 @@ |
183 | +@@ -882,17 +910,17 @@ |
184 | cursor->flag = BTR_CUR_HASH; |
185 | |
186 | if (UNIV_LIKELY(!has_search_latch)) { |
187 | @@ -447,7 +411,7 @@ |
188 | |
189 | if (UNIV_UNLIKELY(!rec)) { |
190 | goto failure_unlock; |
191 | -@@ -909,7 +937,7 @@ |
192 | +@@ -910,7 +938,7 @@ |
193 | goto failure_unlock; |
194 | } |
195 | |
196 | @@ -456,7 +420,7 @@ |
197 | |
198 | buf_block_dbg_add_level(block, SYNC_TREE_NODE_FROM_HASH); |
199 | } |
200 | -@@ -1006,7 +1034,7 @@ |
201 | +@@ -1007,7 +1035,7 @@ |
202 | /*-------------------------------------------*/ |
203 | failure_unlock: |
204 | if (UNIV_LIKELY(!has_search_latch)) { |
205 | @@ -465,7 +429,7 @@ |
206 | } |
207 | failure: |
208 | cursor->flag = BTR_CUR_HASH_FAIL; |
209 | -@@ -1029,10 +1057,11 @@ |
210 | +@@ -1030,10 +1058,11 @@ |
211 | void |
212 | btr_search_drop_page_hash_index( |
213 | /*============================*/ |
214 | @@ -478,7 +442,7 @@ |
215 | { |
216 | hash_table_t* table; |
217 | ulint n_fields; |
218 | -@@ -1051,22 +1080,60 @@ |
219 | +@@ -1052,22 +1081,60 @@ |
220 | ulint* offsets; |
221 | |
222 | #ifdef UNIV_SYNC_DEBUG |
223 | @@ -544,7 +508,7 @@ |
224 | |
225 | #ifdef UNIV_SYNC_DEBUG |
226 | ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED) |
227 | -@@ -1076,14 +1143,14 @@ |
228 | +@@ -1077,14 +1144,14 @@ |
229 | |
230 | n_fields = block->curr_n_fields; |
231 | n_bytes = block->curr_n_bytes; |
232 | @@ -561,7 +525,7 @@ |
233 | |
234 | ut_a(n_fields + n_bytes > 0); |
235 | |
236 | -@@ -1133,7 +1200,7 @@ |
237 | +@@ -1134,7 +1201,7 @@ |
238 | mem_heap_free(heap); |
239 | } |
240 | |
241 | @@ -570,7 +534,7 @@ |
242 | |
243 | if (UNIV_UNLIKELY(!block->is_hashed)) { |
244 | /* Someone else has meanwhile dropped the hash index */ |
245 | -@@ -1149,7 +1216,7 @@ |
246 | +@@ -1150,7 +1217,7 @@ |
247 | /* Someone else has meanwhile built a new hash index on the |
248 | page, with different parameters */ |
249 | |
250 | @@ -579,7 +543,7 @@ |
251 | |
252 | mem_free(folds); |
253 | goto retry; |
254 | -@@ -1165,6 +1232,7 @@ |
255 | +@@ -1166,6 +1233,7 @@ |
256 | |
257 | block->is_hashed = FALSE; |
258 | block->index = NULL; |
259 | @@ -587,7 +551,7 @@ |
260 | |
261 | cleanup: |
262 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
263 | -@@ -1177,14 +1245,14 @@ |
264 | +@@ -1178,14 +1246,14 @@ |
265 | "InnoDB: the hash index to a page of %s," |
266 | " still %lu hash nodes remain.\n", |
267 | index->name, (ulong) block->n_pointers); |
268 | @@ -605,7 +569,7 @@ |
269 | #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ |
270 | |
271 | mem_free(folds); |
272 | -@@ -1216,9 +1284,9 @@ |
273 | +@@ -1217,9 +1285,9 @@ |
274 | ulint* offsets; |
275 | ibool released_search_latch; |
276 | |
277 | @@ -617,7 +581,7 @@ |
278 | |
279 | for (j = 0; j < srv_buf_pool_instances; j++) { |
280 | buf_pool_t* buf_pool; |
281 | -@@ -1252,7 +1320,7 @@ |
282 | +@@ -1253,7 +1321,7 @@ |
283 | |
284 | |
285 | /* keeping latch order */ |
286 | @@ -626,7 +590,7 @@ |
287 | released_search_latch = TRUE; |
288 | rw_lock_x_lock(&block->lock); |
289 | |
290 | -@@ -1304,7 +1372,7 @@ |
291 | +@@ -1305,7 +1373,7 @@ |
292 | mem_heap_empty(heap); |
293 | } |
294 | |
295 | @@ -635,7 +599,7 @@ |
296 | |
297 | if (UNIV_UNLIKELY(!block->is_hashed)) { |
298 | goto cleanup; |
299 | -@@ -1314,12 +1382,12 @@ |
300 | +@@ -1315,12 +1383,12 @@ |
301 | |
302 | if (UNIV_UNLIKELY(block->curr_n_fields != n_fields) |
303 | || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) { |
304 | @@ -650,7 +614,7 @@ |
305 | goto retry; |
306 | } |
307 | |
308 | -@@ -1333,6 +1401,7 @@ |
309 | +@@ -1334,6 +1402,7 @@ |
310 | |
311 | block->is_hashed = FALSE; |
312 | block->index = NULL; |
313 | @@ -658,7 +622,7 @@ |
314 | |
315 | cleanup: |
316 | #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG |
317 | -@@ -1345,18 +1414,18 @@ |
318 | +@@ -1346,18 +1415,18 @@ |
319 | index->name, (ulong) block->n_pointers); |
320 | } |
321 | #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ |
322 | @@ -680,7 +644,7 @@ |
323 | |
324 | if (UNIV_LIKELY_NULL(heap)) { |
325 | mem_heap_free(heap); |
326 | -@@ -1403,7 +1472,7 @@ |
327 | +@@ -1404,7 +1473,7 @@ |
328 | |
329 | buf_block_dbg_add_level(block, SYNC_TREE_NODE_FROM_HASH); |
330 | |
331 | @@ -689,7 +653,7 @@ |
332 | } |
333 | |
334 | mtr_commit(&mtr); |
335 | -@@ -1445,26 +1514,26 @@ |
336 | +@@ -1446,26 +1515,26 @@ |
337 | ut_ad(index); |
338 | ut_a(!dict_index_is_ibuf(index)); |
339 | |
340 | @@ -722,7 +686,7 @@ |
341 | } |
342 | |
343 | n_recs = page_get_n_recs(page); |
344 | -@@ -1558,9 +1627,9 @@ |
345 | +@@ -1559,9 +1628,9 @@ |
346 | fold = next_fold; |
347 | } |
348 | |
349 | @@ -734,7 +698,7 @@ |
350 | |
351 | if (UNIV_UNLIKELY(btr_search_fully_disabled)) { |
352 | goto exit_func; |
353 | -@@ -1588,6 +1657,7 @@ |
354 | +@@ -1589,6 +1658,7 @@ |
355 | block->curr_n_bytes = n_bytes; |
356 | block->curr_left_side = left_side; |
357 | block->index = index; |
358 | @@ -742,7 +706,7 @@ |
359 | |
360 | for (i = 0; i < n_cached; i++) { |
361 | |
362 | -@@ -1595,7 +1665,7 @@ |
363 | +@@ -1596,7 +1666,7 @@ |
364 | } |
365 | |
366 | exit_func: |
367 | @@ -751,7 +715,7 @@ |
368 | |
369 | mem_free(folds); |
370 | mem_free(recs); |
371 | -@@ -1634,13 +1704,13 @@ |
372 | +@@ -1635,13 +1705,13 @@ |
373 | ut_a(!(new_block->is_hashed || block->is_hashed) |
374 | || !dict_index_is_ibuf(index)); |
375 | |
376 | @@ -768,7 +732,7 @@ |
377 | |
378 | return; |
379 | } |
380 | -@@ -1655,7 +1725,7 @@ |
381 | +@@ -1656,7 +1726,7 @@ |
382 | new_block->n_bytes = block->curr_n_bytes; |
383 | new_block->left_side = left_side; |
384 | |
385 | @@ -777,7 +741,7 @@ |
386 | |
387 | ut_a(n_fields + n_bytes > 0); |
388 | |
389 | -@@ -1667,7 +1737,7 @@ |
390 | +@@ -1668,7 +1738,7 @@ |
391 | return; |
392 | } |
393 | |
394 | @@ -786,7 +750,7 @@ |
395 | } |
396 | |
397 | /********************************************************************//** |
398 | -@@ -1706,7 +1776,7 @@ |
399 | +@@ -1707,7 +1777,7 @@ |
400 | ut_a(block->curr_n_fields + block->curr_n_bytes > 0); |
401 | ut_a(!dict_index_is_ibuf(cursor->index)); |
402 | |
403 | @@ -795,7 +759,7 @@ |
404 | |
405 | index_id = cursor->index->id; |
406 | fold = rec_fold(rec, rec_get_offsets(rec, cursor->index, offsets_, |
407 | -@@ -1715,11 +1785,11 @@ |
408 | +@@ -1716,11 +1786,11 @@ |
409 | if (UNIV_LIKELY_NULL(heap)) { |
410 | mem_heap_free(heap); |
411 | } |
412 | @@ -809,7 +773,7 @@ |
413 | } |
414 | |
415 | /********************************************************************//** |
416 | -@@ -1753,21 +1823,21 @@ |
417 | +@@ -1754,21 +1824,21 @@ |
418 | ut_a(block->index == cursor->index); |
419 | ut_a(!dict_index_is_ibuf(cursor->index)); |
420 | |
421 | @@ -835,7 +799,7 @@ |
422 | |
423 | btr_search_update_hash_on_insert(cursor); |
424 | } |
425 | -@@ -1802,9 +1872,9 @@ |
426 | +@@ -1803,9 +1873,9 @@ |
427 | ulint* offsets = offsets_; |
428 | rec_offs_init(offsets_); |
429 | |
430 | @@ -847,7 +811,7 @@ |
431 | |
432 | rec = btr_cur_get_rec(cursor); |
433 | |
434 | -@@ -1849,7 +1919,7 @@ |
435 | +@@ -1850,7 +1920,7 @@ |
436 | } else { |
437 | if (left_side) { |
438 | |
439 | @@ -856,7 +820,7 @@ |
440 | |
441 | locked = TRUE; |
442 | |
443 | -@@ -1863,7 +1933,7 @@ |
444 | +@@ -1864,7 +1934,7 @@ |
445 | |
446 | if (!locked) { |
447 | |
448 | @@ -865,7 +829,7 @@ |
449 | |
450 | locked = TRUE; |
451 | } |
452 | -@@ -1881,7 +1951,7 @@ |
453 | +@@ -1882,7 +1952,7 @@ |
454 | if (!left_side) { |
455 | |
456 | if (!locked) { |
457 | @@ -874,7 +838,7 @@ |
458 | |
459 | locked = TRUE; |
460 | } |
461 | -@@ -1896,7 +1966,7 @@ |
462 | +@@ -1897,7 +1967,7 @@ |
463 | |
464 | if (!locked) { |
465 | |
466 | @@ -883,7 +847,7 @@ |
467 | |
468 | locked = TRUE; |
469 | } |
470 | -@@ -1919,7 +1989,7 @@ |
471 | +@@ -1920,7 +1990,7 @@ |
472 | mem_heap_free(heap); |
473 | } |
474 | if (locked) { |
475 | @@ -892,7 +856,7 @@ |
476 | } |
477 | } |
478 | |
479 | -@@ -1935,7 +2005,7 @@ |
480 | +@@ -1936,7 +2006,7 @@ |
481 | ha_node_t* node; |
482 | ulint n_page_dumps = 0; |
483 | ibool ok = TRUE; |
484 | @@ -901,7 +865,7 @@ |
485 | ulint cell_count; |
486 | mem_heap_t* heap = NULL; |
487 | ulint offsets_[REC_OFFS_NORMAL_SIZE]; |
488 | -@@ -1947,23 +2017,25 @@ |
489 | +@@ -1948,23 +2018,25 @@ |
490 | |
491 | rec_offs_init(offsets_); |
492 | |
493 | @@ -932,7 +896,7 @@ |
494 | |
495 | for (; node != NULL; node = node->next) { |
496 | const buf_block_t* block |
497 | -@@ -2072,19 +2144,21 @@ |
498 | +@@ -2073,19 +2145,21 @@ |
499 | give other queries a chance to run. */ |
500 | if (i != 0) { |
501 | buf_pool_page_hash_x_unlock_all(); |
502 | @@ -1055,7 +1019,7 @@ |
503 | |
504 | --- a/storage/innobase/dict/dict0dict.c |
505 | +++ b/storage/innobase/dict/dict0dict.c |
506 | -@@ -1845,7 +1845,7 @@ |
507 | +@@ -1846,7 +1846,7 @@ |
508 | zero. */ |
509 | |
510 | for (;;) { |
511 | @@ -1078,7 +1042,7 @@ |
512 | #ifndef UNIV_HOTBACKUP |
513 | --- a/storage/innobase/handler/ha_innodb.cc |
514 | +++ b/storage/innobase/handler/ha_innodb.cc |
515 | -@@ -11712,6 +11712,11 @@ |
516 | +@@ -11824,6 +11824,11 @@ |
517 | "Disable with --skip-innodb-adaptive-hash-index.", |
518 | NULL, innodb_adaptive_hash_index_update, TRUE); |
519 | |
520 | @@ -1090,7 +1054,7 @@ |
521 | static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay, |
522 | PLUGIN_VAR_RQCMDARG, |
523 | "Replication thread delay (ms) on the slave server if " |
524 | -@@ -12091,6 +12096,7 @@ |
525 | +@@ -12204,6 +12209,7 @@ |
526 | MYSQL_SYSVAR(use_sys_stats_table), |
527 | MYSQL_SYSVAR(stats_sample_pages), |
528 | MYSQL_SYSVAR(adaptive_hash_index), |
529 | @@ -1283,7 +1247,7 @@ |
530 | + |
531 | --- a/storage/innobase/include/buf0buf.h |
532 | +++ b/storage/innobase/include/buf0buf.h |
533 | -@@ -1601,7 +1601,7 @@ |
534 | +@@ -1576,7 +1576,7 @@ |
535 | pointers in the adaptive hash index |
536 | pointing to this frame */ |
537 | #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ |
538 | @@ -1292,7 +1256,7 @@ |
539 | already been built on this |
540 | page; note that it does not |
541 | guarantee that the index is |
542 | -@@ -1615,6 +1615,7 @@ |
543 | +@@ -1590,6 +1590,7 @@ |
544 | unsigned curr_left_side:1;/*!< TRUE or FALSE in hash indexing */ |
545 | dict_index_t* index; /*!< Index for which the adaptive |
546 | hash index has been created. */ |
547 | @@ -1300,17 +1264,6 @@ |
548 | /* @} */ |
549 | # ifdef UNIV_SYNC_DEBUG |
550 | /** @name Debug fields */ |
551 | ---- a/storage/innobase/include/row0upd.ic |
552 | -+++ b/storage/innobase/include/row0upd.ic |
553 | -@@ -158,7 +158,7 @@ |
554 | - ut_ad(dict_index_is_clust(index)); |
555 | - ut_ad(rec_offs_validate(rec, index, offsets)); |
556 | - #ifdef UNIV_SYNC_DEBUG |
557 | -- if (!rw_lock_own(&btr_search_latch, RW_LOCK_EX)) { |
558 | -+ if (!rw_lock_own(btr_search_get_latch(index->id), RW_LOCK_EX)) { |
559 | - ut_ad(!buf_block_align(rec)->is_hashed); |
560 | - } |
561 | - #endif /* UNIV_SYNC_DEBUG */ |
562 | --- a/storage/innobase/page/page0page.c |
563 | +++ b/storage/innobase/page/page0page.c |
564 | @@ -218,7 +218,7 @@ |
565 | @@ -1344,7 +1297,7 @@ |
566 | ut_ad(block == back_block1); |
567 | --- a/storage/innobase/row/row0mysql.c |
568 | +++ b/storage/innobase/row/row0mysql.c |
569 | -@@ -2593,7 +2593,7 @@ |
570 | +@@ -2594,7 +2594,7 @@ |
571 | /* check adaptive hash entries */ |
572 | index = dict_table_get_first_index(table); |
573 | while (index) { |
574 | @@ -1353,7 +1306,7 @@ |
575 | if (ref_count) { |
576 | fprintf(stderr, "InnoDB: Warning:" |
577 | " hash index ref_count (%lu) is not zero" |
578 | -@@ -2954,7 +2954,7 @@ |
579 | +@@ -2955,7 +2955,7 @@ |
580 | table->space = space; |
581 | index = dict_table_get_first_index(table); |
582 | do { |
583 | @@ -1364,7 +1317,7 @@ |
584 | fprintf(stderr, "InnoDB: Warning:" |
585 | --- a/storage/innobase/row/row0sel.c |
586 | +++ b/storage/innobase/row/row0sel.c |
587 | -@@ -1211,7 +1211,7 @@ |
588 | +@@ -1222,7 +1222,7 @@ |
589 | ut_ad(plan->unique_search); |
590 | ut_ad(!plan->must_get_clust); |
591 | #ifdef UNIV_SYNC_DEBUG |
592 | @@ -1373,7 +1326,7 @@ |
593 | #endif /* UNIV_SYNC_DEBUG */ |
594 | |
595 | row_sel_open_pcur(plan, TRUE, mtr); |
596 | -@@ -1382,10 +1382,10 @@ |
597 | +@@ -1393,10 +1393,10 @@ |
598 | && !plan->must_get_clust |
599 | && !plan->table->big_rows) { |
600 | if (!search_latch_locked) { |
601 | @@ -1386,7 +1339,7 @@ |
602 | |
603 | /* There is an x-latch request waiting: release the |
604 | s-latch for a moment; as an s-latch here is often |
605 | -@@ -1394,8 +1394,8 @@ |
606 | +@@ -1405,8 +1405,8 @@ |
607 | from acquiring an s-latch for a long time, lowering |
608 | performance significantly in multiprocessors. */ |
609 | |
610 | @@ -1397,7 +1350,7 @@ |
611 | } |
612 | |
613 | found_flag = row_sel_try_search_shortcut(node, plan, &mtr); |
614 | -@@ -1418,7 +1418,7 @@ |
615 | +@@ -1429,7 +1429,7 @@ |
616 | } |
617 | |
618 | if (search_latch_locked) { |
619 | @@ -1406,7 +1359,7 @@ |
620 | |
621 | search_latch_locked = FALSE; |
622 | } |
623 | -@@ -1994,7 +1994,7 @@ |
624 | +@@ -2005,7 +2005,7 @@ |
625 | |
626 | func_exit: |
627 | if (search_latch_locked) { |
628 | @@ -1415,7 +1368,7 @@ |
629 | } |
630 | if (UNIV_LIKELY_NULL(heap)) { |
631 | mem_heap_free(heap); |
632 | -@@ -3397,6 +3397,8 @@ |
633 | +@@ -3408,6 +3408,8 @@ |
634 | /* if the returned record was locked and we did a semi-consistent |
635 | read (fetch the newest committed version), then this is set to |
636 | TRUE */ |
637 | @@ -1424,7 +1377,7 @@ |
638 | #ifdef UNIV_SEARCH_DEBUG |
639 | ulint cnt = 0; |
640 | #endif /* UNIV_SEARCH_DEBUG */ |
641 | -@@ -3487,18 +3489,33 @@ |
642 | +@@ -3505,18 +3507,33 @@ |
643 | /* PHASE 0: Release a possible s-latch we are holding on the |
644 | adaptive hash index latch if there is someone waiting behind */ |
645 | |
646 | @@ -1462,7 +1415,7 @@ |
647 | } |
648 | |
649 | /* Reset the new record lock info if srv_locks_unsafe_for_binlog |
650 | -@@ -3649,9 +3666,28 @@ |
651 | +@@ -3667,9 +3684,28 @@ |
652 | hash index semaphore! */ |
653 | |
654 | #ifndef UNIV_SEARCH_DEBUG |
655 | @@ -1494,7 +1447,7 @@ |
656 | } |
657 | #endif |
658 | switch (row_sel_try_search_shortcut_for_mysql( |
659 | -@@ -3712,7 +3748,11 @@ |
660 | +@@ -3730,7 +3766,11 @@ |
661 | |
662 | trx->search_latch_timeout--; |
663 | |
664 | @@ -1507,7 +1460,7 @@ |
665 | trx->has_search_latch = FALSE; |
666 | } |
667 | |
668 | -@@ -3736,7 +3776,12 @@ |
669 | +@@ -3754,7 +3794,12 @@ |
670 | /* PHASE 3: Open or restore index cursor position */ |
671 | |
672 | if (trx->has_search_latch) { |
673 | @@ -1569,7 +1522,7 @@ |
674 | (ulong) (buf_pool_from_array(0)->page_hash->n_cells * sizeof(hash_cell_t)), |
675 | --- a/storage/innobase/sync/sync0sync.c |
676 | +++ b/storage/innobase/sync/sync0sync.c |
677 | -@@ -1228,7 +1228,6 @@ |
678 | +@@ -1222,7 +1222,6 @@ |
679 | case SYNC_OUTER_ANY_LATCH: |
680 | case SYNC_FILE_FORMAT_TAG: |
681 | case SYNC_DOUBLEWRITE: |
682 | @@ -1577,7 +1530,7 @@ |
683 | case SYNC_SEARCH_SYS_CONF: |
684 | case SYNC_TRX_LOCK_HEAP: |
685 | case SYNC_KERNEL: |
686 | -@@ -1249,6 +1248,7 @@ |
687 | +@@ -1244,6 +1243,7 @@ |
688 | ut_error; |
689 | } |
690 | break; |
691 | |
692 | === modified file 'patches/innodb_admin_command_base.patch' |
693 | --- patches/innodb_admin_command_base.patch 2011-10-07 21:14:32 +0000 |
694 | +++ patches/innodb_admin_command_base.patch 2011-11-16 09:37:24 +0000 |
695 | @@ -7,7 +7,7 @@ |
696 | # should be done or reviewed by the maintainer! |
697 | --- a/storage/innobase/handler/ha_innodb.cc |
698 | +++ b/storage/innobase/handler/ha_innodb.cc |
699 | -@@ -11877,7 +11877,8 @@ |
700 | +@@ -11990,7 +11990,8 @@ |
701 | i_s_innodb_sys_foreign_cols, |
702 | i_s_innodb_sys_stats, |
703 | i_s_innodb_table_stats, |
704 | |
705 | === modified file 'patches/innodb_buffer_pool_pages_i_s.patch' |
706 | --- patches/innodb_buffer_pool_pages_i_s.patch 2011-10-10 14:35:27 +0000 |
707 | +++ patches/innodb_buffer_pool_pages_i_s.patch 2011-11-16 09:37:24 +0000 |
708 | @@ -7,7 +7,7 @@ |
709 | # should be done or reviewed by the maintainer! |
710 | --- a/storage/innobase/buf/buf0buf.c |
711 | +++ b/storage/innobase/buf/buf0buf.c |
712 | -@@ -4161,6 +4161,36 @@ |
713 | +@@ -4224,6 +4224,36 @@ |
714 | mutex_exit(block_mutex); |
715 | } |
716 | |
717 | @@ -46,7 +46,7 @@ |
718 | @return TRUE */ |
719 | --- a/storage/innobase/handler/ha_innodb.cc |
720 | +++ b/storage/innobase/handler/ha_innodb.cc |
721 | -@@ -12174,6 +12174,9 @@ |
722 | +@@ -12287,6 +12287,9 @@ |
723 | i_s_innodb_sys_stats, |
724 | i_s_innodb_table_stats, |
725 | i_s_innodb_index_stats, |
726 | @@ -781,7 +781,7 @@ |
727 | #endif /* i_s_h */ |
728 | --- a/storage/innobase/include/buf0buf.h |
729 | +++ b/storage/innobase/include/buf0buf.h |
730 | -@@ -1199,6 +1199,14 @@ |
731 | +@@ -1174,6 +1174,14 @@ |
732 | /*===========*/ |
733 | const buf_pool_t* buf_pool) /*!< in: buffer pool */ |
734 | __attribute__((nonnull, const)); |
735 | |
736 | === modified file 'patches/innodb_buffer_pool_shm.patch' |
737 | --- patches/innodb_buffer_pool_shm.patch 2011-10-10 14:35:27 +0000 |
738 | +++ patches/innodb_buffer_pool_shm.patch 2011-11-16 09:37:24 +0000 |
739 | @@ -42,7 +42,7 @@ |
740 | |
741 | |
742 | static char* internal_innobase_data_file_path = NULL; |
743 | -@@ -2679,6 +2681,12 @@ |
744 | +@@ -2706,6 +2708,12 @@ |
745 | srv_buf_pool_size = (ulint) innobase_buffer_pool_size; |
746 | srv_buf_pool_instances = (ulint) innobase_buffer_pool_instances; |
747 | |
748 | @@ -55,7 +55,7 @@ |
749 | srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size; |
750 | |
751 | srv_n_file_io_threads = (ulint) innobase_file_io_threads; |
752 | -@@ -11743,6 +11751,16 @@ |
753 | +@@ -11855,6 +11863,16 @@ |
754 | "Number of buffer pool instances, set to higher value on high-end machines to increase scalability", |
755 | NULL, NULL, 1L, 1L, MAX_BUFFER_POOLS, 1L); |
756 | |
757 | @@ -72,7 +72,7 @@ |
758 | static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, |
759 | PLUGIN_VAR_RQCMDARG, |
760 | "Helps in performance tuning in heavily concurrent environments.", |
761 | -@@ -12049,6 +12067,8 @@ |
762 | +@@ -12161,6 +12179,8 @@ |
763 | MYSQL_SYSVAR(autoextend_increment), |
764 | MYSQL_SYSVAR(buffer_pool_size), |
765 | MYSQL_SYSVAR(buffer_pool_instances), |
766 | |
767 | === modified file 'patches/innodb_deadlock_count.patch' |
768 | --- patches/innodb_deadlock_count.patch 2011-10-10 14:35:27 +0000 |
769 | +++ patches/innodb_deadlock_count.patch 2011-11-16 09:37:24 +0000 |
770 | @@ -28,7 +28,7 @@ |
771 | Gets the size of a lock struct. |
772 | --- a/storage/innobase/include/srv0srv.h |
773 | +++ b/storage/innobase/include/srv0srv.h |
774 | -@@ -763,6 +763,7 @@ |
775 | +@@ -767,6 +767,7 @@ |
776 | ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ |
777 | ulint innodb_dblwr_pages_written; /*!< srv_dblwr_pages_written */ |
778 | ulint innodb_dblwr_writes; /*!< srv_dblwr_writes */ |
779 | |
780 | === modified file 'patches/innodb_dict_size_limit.patch' |
781 | --- patches/innodb_dict_size_limit.patch 2011-09-21 09:20:58 +0000 |
782 | +++ patches/innodb_dict_size_limit.patch 2011-11-16 09:37:24 +0000 |
783 | @@ -7,7 +7,7 @@ |
784 | # should be done or reviewed by the maintainer! |
785 | --- a/storage/innobase/btr/btr0sea.c |
786 | +++ b/storage/innobase/btr/btr0sea.c |
787 | -@@ -1185,6 +1185,179 @@ |
788 | +@@ -1186,6 +1186,179 @@ |
789 | mem_free(folds); |
790 | } |
791 | |
792 | @@ -355,7 +355,7 @@ |
793 | /****************************************************************//** |
794 | If the given column name is reserved for InnoDB system columns, return |
795 | TRUE. |
796 | -@@ -1762,6 +1824,11 @@ |
797 | +@@ -1763,6 +1825,11 @@ |
798 | ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); |
799 | ut_ad(mutex_own(&(dict_sys->mutex))); |
800 | |
801 | @@ -378,7 +378,7 @@ |
802 | {"have_atomic_builtins", |
803 | (char*) &export_vars.innodb_have_atomic_builtins, SHOW_BOOL}, |
804 | {"log_waits", |
805 | -@@ -11653,6 +11655,11 @@ |
806 | +@@ -11765,6 +11767,11 @@ |
807 | "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)", |
808 | NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib); |
809 | |
810 | @@ -390,7 +390,7 @@ |
811 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
812 | MYSQL_SYSVAR(additional_mem_pool_size), |
813 | MYSQL_SYSVAR(autoextend_increment), |
814 | -@@ -11721,6 +11728,7 @@ |
815 | +@@ -11834,6 +11841,7 @@ |
816 | MYSQL_SYSVAR(flush_neighbor_pages), |
817 | MYSQL_SYSVAR(read_ahead), |
818 | MYSQL_SYSVAR(adaptive_flushing_method), |
819 | @@ -426,7 +426,7 @@ |
820 | Drops possible hash index if the page happens to be in the buffer pool. */ |
821 | --- a/storage/innobase/include/buf0buf.h |
822 | +++ b/storage/innobase/include/buf0buf.h |
823 | -@@ -1610,6 +1610,15 @@ |
824 | +@@ -1585,6 +1585,15 @@ |
825 | #define BUF_POOL_ZIP_FOLD_BPAGE(b) BUF_POOL_ZIP_FOLD((buf_block_t*) (b)) |
826 | /* @} */ |
827 | |
828 | @@ -444,7 +444,7 @@ |
829 | ulint n_page_gets; /*!< number of page gets performed; |
830 | --- a/storage/innobase/include/dict0dict.h |
831 | +++ b/storage/innobase/include/dict0dict.h |
832 | -@@ -1183,6 +1183,12 @@ |
833 | +@@ -1200,6 +1200,12 @@ |
834 | /*====================================*/ |
835 | dict_table_t* table, /*!< in: table */ |
836 | const char* name); /*!< in: name of the index to find */ |
837 | @@ -459,7 +459,7 @@ |
838 | extern FILE* dict_foreign_err_file; |
839 | --- a/storage/innobase/include/dict0dict.ic |
840 | +++ b/storage/innobase/include/dict0dict.ic |
841 | -@@ -824,6 +824,13 @@ |
842 | +@@ -825,6 +825,13 @@ |
843 | HASH_SEARCH(name_hash, dict_sys->table_hash, table_fold, |
844 | dict_table_t*, table, ut_ad(table->cached), |
845 | !strcmp(table->name, table_name)); |
846 | @@ -473,7 +473,7 @@ |
847 | return(table); |
848 | } |
849 | |
850 | -@@ -905,6 +912,12 @@ |
851 | +@@ -918,6 +925,12 @@ |
852 | table = dict_load_table_on_id(table_id); |
853 | } |
854 | |
855 | @@ -488,7 +488,7 @@ |
856 | /* TODO: should get the type information from MySQL */ |
857 | --- a/storage/innobase/include/srv0srv.h |
858 | +++ b/storage/innobase/include/srv0srv.h |
859 | -@@ -230,6 +230,7 @@ |
860 | +@@ -234,6 +234,7 @@ |
861 | extern ulint srv_read_ahead; |
862 | extern ulint srv_adaptive_flushing_method; |
863 | |
864 | @@ -496,7 +496,7 @@ |
865 | /*-------------------------------------------*/ |
866 | |
867 | extern ulint srv_n_rows_inserted; |
868 | -@@ -710,6 +711,7 @@ |
869 | +@@ -714,6 +715,7 @@ |
870 | ulint innodb_data_writes; /*!< I/O write requests */ |
871 | ulint innodb_data_written; /*!< Data bytes written */ |
872 | ulint innodb_data_reads; /*!< I/O read requests */ |
873 | |
874 | === modified file 'patches/innodb_expand_fast_index_creation.patch' |
875 | --- patches/innodb_expand_fast_index_creation.patch 2011-10-10 14:35:27 +0000 |
876 | +++ patches/innodb_expand_fast_index_creation.patch 2011-11-16 09:37:24 +0000 |
877 | @@ -864,7 +864,7 @@ |
878 | +--source include/wait_until_count_sessions.inc |
879 | --- a/sql/sql_lex.cc |
880 | +++ b/sql/sql_lex.cc |
881 | -@@ -1631,6 +1631,9 @@ |
882 | +@@ -1632,6 +1632,9 @@ |
883 | alter_list(rhs.alter_list, mem_root), |
884 | key_list(rhs.key_list, mem_root), |
885 | create_list(rhs.create_list, mem_root), |
886 | @@ -874,7 +874,7 @@ |
887 | flags(rhs.flags), |
888 | keys_onoff(rhs.keys_onoff), |
889 | tablespace_op(rhs.tablespace_op), |
890 | -@@ -1653,6 +1656,7 @@ |
891 | +@@ -1654,6 +1657,7 @@ |
892 | list_copy_and_replace_each_value(alter_list, mem_root); |
893 | list_copy_and_replace_each_value(key_list, mem_root); |
894 | list_copy_and_replace_each_value(create_list, mem_root); |
895 | @@ -1300,7 +1300,7 @@ |
896 | |
897 | /* Ignore posix_fadvise() on those platforms where it does not exist */ |
898 | #if defined __WIN__ |
899 | -@@ -2672,6 +2673,9 @@ |
900 | +@@ -2673,6 +2674,9 @@ |
901 | } |
902 | } |
903 | |
904 | |
905 | === modified file 'patches/innodb_expand_import.patch' |
906 | --- patches/innodb_expand_import.patch 2011-09-21 09:20:58 +0000 |
907 | +++ patches/innodb_expand_import.patch 2011-11-16 09:37:24 +0000 |
908 | @@ -7,7 +7,7 @@ |
909 | # should be done or reviewed by the maintainer! |
910 | --- a/storage/innobase/btr/btr0btr.c |
911 | +++ b/storage/innobase/btr/btr0btr.c |
912 | -@@ -837,7 +837,7 @@ |
913 | +@@ -838,7 +838,7 @@ |
914 | /**************************************************************//** |
915 | Creates a new index page (not the root, and also not |
916 | used in page reorganization). @see btr_page_empty(). */ |
917 | @@ -16,7 +16,7 @@ |
918 | void |
919 | btr_page_create( |
920 | /*============*/ |
921 | -@@ -1707,7 +1707,7 @@ |
922 | +@@ -1712,7 +1712,7 @@ |
923 | #ifndef UNIV_HOTBACKUP |
924 | /*************************************************************//** |
925 | Empties an index page. @see btr_page_create(). */ |
926 | @@ -25,7 +25,7 @@ |
927 | void |
928 | btr_page_empty( |
929 | /*===========*/ |
930 | -@@ -2269,7 +2269,7 @@ |
931 | +@@ -2274,7 +2274,7 @@ |
932 | /**************************************************************//** |
933 | Attaches the halves of an index page on the appropriate level in an |
934 | index tree. */ |
935 | @@ -865,7 +865,7 @@ |
936 | #endif /* !UNIV_HOTBACKUP */ |
937 | --- a/storage/innobase/handler/ha_innodb.cc |
938 | +++ b/storage/innobase/handler/ha_innodb.cc |
939 | -@@ -7371,6 +7371,14 @@ |
940 | +@@ -7423,6 +7423,14 @@ |
941 | err = row_discard_tablespace_for_mysql(dict_table->name, trx); |
942 | } else { |
943 | err = row_import_tablespace_for_mysql(dict_table->name, trx); |
944 | @@ -880,7 +880,7 @@ |
945 | } |
946 | |
947 | err = convert_error_code_to_mysql(err, dict_table->flags, NULL); |
948 | -@@ -11660,6 +11668,11 @@ |
949 | +@@ -11772,6 +11780,11 @@ |
950 | "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)", |
951 | NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib); |
952 | |
953 | @@ -892,7 +892,7 @@ |
954 | static MYSQL_SYSVAR_ULONG(dict_size_limit, srv_dict_size_limit, |
955 | PLUGIN_VAR_RQCMDARG, |
956 | "Limit the allocated memory for dictionary cache. (0: unlimited)", |
957 | -@@ -11733,6 +11746,7 @@ |
958 | +@@ -11846,6 +11859,7 @@ |
959 | MYSQL_SYSVAR(flush_neighbor_pages), |
960 | MYSQL_SYSVAR(read_ahead), |
961 | MYSQL_SYSVAR(adaptive_flushing_method), |
962 | @@ -902,10 +902,10 @@ |
963 | MYSQL_SYSVAR(use_native_aio), |
964 | --- a/storage/innobase/include/btr0btr.h |
965 | +++ b/storage/innobase/include/btr0btr.h |
966 | -@@ -219,6 +219,17 @@ |
967 | +@@ -238,6 +238,17 @@ |
968 | @return the uncompressed page frame */ |
969 | - # define btr_page_get(space,zip_size,page_no,mode,mtr) \ |
970 | - buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,mtr)) |
971 | + # define btr_page_get(space,zip_size,page_no,mode,idx,mtr) \ |
972 | + buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,idx,mtr)) |
973 | +/**************************************************************//** |
974 | +Sets the index id field of a page. */ |
975 | +UNIV_INLINE |
976 | @@ -920,7 +920,7 @@ |
977 | #endif /* !UNIV_HOTBACKUP */ |
978 | /**************************************************************//** |
979 | Gets the index id field of a page. |
980 | -@@ -256,6 +267,17 @@ |
981 | +@@ -275,6 +286,17 @@ |
982 | const page_t* page, /*!< in: index page */ |
983 | mtr_t* mtr); /*!< in: mini-transaction handle */ |
984 | /********************************************************//** |
985 | @@ -938,7 +938,7 @@ |
986 | Gets the previous index page number. |
987 | @return prev page number */ |
988 | UNIV_INLINE |
989 | -@@ -264,6 +286,17 @@ |
990 | +@@ -283,6 +305,17 @@ |
991 | /*==============*/ |
992 | const page_t* page, /*!< in: index page */ |
993 | mtr_t* mtr); /*!< in: mini-transaction handle */ |
994 | @@ -956,7 +956,7 @@ |
995 | /*************************************************************//** |
996 | Gets pointer to the previous user record in the tree. It is assumed |
997 | that the caller has appropriate latches on the page and its neighbor. |
998 | -@@ -309,6 +342,18 @@ |
999 | +@@ -328,6 +361,18 @@ |
1000 | /*===========================*/ |
1001 | const rec_t* rec, /*!< in: node pointer record */ |
1002 | const ulint* offsets);/*!< in: array returned by rec_get_offsets() */ |
1003 | @@ -975,7 +975,7 @@ |
1004 | /************************************************************//** |
1005 | Creates the root node for a new index tree. |
1006 | @return page number of the created root, FIL_NULL if did not succeed */ |
1007 | -@@ -379,6 +424,17 @@ |
1008 | +@@ -397,6 +442,17 @@ |
1009 | dict_index_t* index, /*!< in: record descriptor */ |
1010 | mtr_t* mtr); /*!< in: mtr */ |
1011 | /*************************************************************//** |
1012 | @@ -993,7 +993,7 @@ |
1013 | Decides if the page should be split at the convergence point of |
1014 | inserts converging to left. |
1015 | @return TRUE if split recommended */ |
1016 | -@@ -437,6 +493,20 @@ |
1017 | +@@ -455,6 +511,20 @@ |
1018 | # define btr_insert_on_non_leaf_level(i,l,t,m) \ |
1019 | btr_insert_on_non_leaf_level_func(i,l,t,__FILE__,__LINE__,m) |
1020 | #endif /* !UNIV_HOTBACKUP */ |
1021 | @@ -1006,7 +1006,7 @@ |
1022 | +/*==================*/ |
1023 | + dict_index_t* index, /*!< in: the index tree */ |
1024 | + buf_block_t* block, /*!< in/out: page to be split */ |
1025 | -+ const rec_t* split_rec, /*!< in: first record on upper |
1026 | ++ rec_t* split_rec, /*!< in: first record on upper |
1027 | + half page */ |
1028 | + buf_block_t* new_block, /*!< in/out: the new half page */ |
1029 | + ulint direction, /*!< in: FSP_UP or FSP_DOWN */ |
1030 | @@ -1016,7 +1016,7 @@ |
1031 | UNIV_INTERN |
1032 | --- a/storage/innobase/include/srv0srv.h |
1033 | +++ b/storage/innobase/include/srv0srv.h |
1034 | -@@ -230,6 +230,8 @@ |
1035 | +@@ -234,6 +234,8 @@ |
1036 | extern ulint srv_read_ahead; |
1037 | extern ulint srv_adaptive_flushing_method; |
1038 | |
1039 | @@ -1027,7 +1027,7 @@ |
1040 | |
1041 | --- a/storage/innobase/row/row0mysql.c |
1042 | +++ b/storage/innobase/row/row0mysql.c |
1043 | -@@ -2546,6 +2546,11 @@ |
1044 | +@@ -2547,6 +2547,11 @@ |
1045 | |
1046 | current_lsn = log_get_lsn(); |
1047 | |
1048 | @@ -1039,7 +1039,7 @@ |
1049 | /* It is possible, though very improbable, that the lsn's in the |
1050 | tablespace to be imported have risen above the current system lsn, if |
1051 | a lengthy purge, ibuf merge, or rollback was performed on a backup |
1052 | -@@ -2657,6 +2662,11 @@ |
1053 | +@@ -2658,6 +2663,11 @@ |
1054 | |
1055 | trx->op_info = ""; |
1056 | |
1057 | |
1058 | === modified file 'patches/innodb_extend_slow.patch' |
1059 | --- patches/innodb_extend_slow.patch 2011-09-21 09:20:58 +0000 |
1060 | +++ patches/innodb_extend_slow.patch 2011-11-16 09:37:24 +0000 |
1061 | @@ -395,7 +395,7 @@ |
1062 | |
1063 | --- a/storage/innobase/handler/ha_innodb.cc |
1064 | +++ b/storage/innobase/handler/ha_innodb.cc |
1065 | -@@ -1580,6 +1580,16 @@ |
1066 | +@@ -1584,6 +1584,16 @@ |
1067 | trx->check_unique_secondary = !thd_test_options( |
1068 | thd, OPTION_RELAXED_UNIQUE_CHECKS); |
1069 | |
1070 | @@ -412,7 +412,7 @@ |
1071 | DBUG_VOID_RETURN; |
1072 | } |
1073 | |
1074 | -@@ -1634,6 +1644,32 @@ |
1075 | +@@ -1638,6 +1648,32 @@ |
1076 | return(trx); |
1077 | } |
1078 | |
1079 | @@ -445,7 +445,7 @@ |
1080 | /*********************************************************************//** |
1081 | Note that a transaction has been registered with MySQL. |
1082 | @return true if transaction is registered with MySQL 2PC coordinator */ |
1083 | -@@ -9302,6 +9338,25 @@ |
1084 | +@@ -9409,6 +9445,25 @@ |
1085 | statement has ended */ |
1086 | |
1087 | if (trx->n_mysql_tables_in_use == 0) { |
1088 | |
1089 | === modified file 'patches/innodb_extra_rseg.patch' |
1090 | --- patches/innodb_extra_rseg.patch 2011-09-21 09:20:58 +0000 |
1091 | +++ patches/innodb_extra_rseg.patch 2011-11-16 09:37:24 +0000 |
1092 | @@ -7,7 +7,7 @@ |
1093 | # should be done or reviewed by the maintainer! |
1094 | --- a/storage/innobase/handler/ha_innodb.cc |
1095 | +++ b/storage/innobase/handler/ha_innodb.cc |
1096 | -@@ -11542,6 +11542,7 @@ |
1097 | +@@ -11655,6 +11655,7 @@ |
1098 | NULL, /* reserved */ |
1099 | 0, /* flags */ |
1100 | }, |
1101 | |
1102 | === modified file 'patches/innodb_fake_changes.patch' |
1103 | --- patches/innodb_fake_changes.patch 2011-10-10 14:35:27 +0000 |
1104 | +++ patches/innodb_fake_changes.patch 2011-11-16 09:37:24 +0000 |
1105 | @@ -7,7 +7,7 @@ |
1106 | # should be done or reviewed by the maintainer! |
1107 | --- a/storage/innobase/btr/btr0cur.c |
1108 | +++ b/storage/innobase/btr/btr0cur.c |
1109 | -@@ -1167,6 +1167,11 @@ |
1110 | +@@ -1173,6 +1173,11 @@ |
1111 | rec_t* rec; |
1112 | roll_ptr_t roll_ptr; |
1113 | |
1114 | @@ -19,7 +19,7 @@ |
1115 | /* Check if we have to wait for a lock: enqueue an explicit lock |
1116 | request if yes */ |
1117 | |
1118 | -@@ -1298,7 +1303,7 @@ |
1119 | +@@ -1304,7 +1309,7 @@ |
1120 | } |
1121 | #endif /* UNIV_DEBUG */ |
1122 | |
1123 | @@ -28,7 +28,7 @@ |
1124 | max_size = page_get_max_insert_size_after_reorganize(page, 1); |
1125 | leaf = page_is_leaf(page); |
1126 | |
1127 | -@@ -1393,6 +1398,12 @@ |
1128 | +@@ -1399,6 +1404,12 @@ |
1129 | goto fail_err; |
1130 | } |
1131 | |
1132 | @@ -41,7 +41,7 @@ |
1133 | page_cursor = btr_cur_get_page_cur(cursor); |
1134 | |
1135 | /* Now, try the insert */ |
1136 | -@@ -1535,10 +1546,10 @@ |
1137 | +@@ -1541,10 +1552,10 @@ |
1138 | |
1139 | *big_rec = NULL; |
1140 | |
1141 | @@ -54,7 +54,7 @@ |
1142 | MTR_MEMO_PAGE_X_FIX)); |
1143 | |
1144 | /* Try first an optimistic insert; reset the cursor flag: we do not |
1145 | -@@ -1604,6 +1615,16 @@ |
1146 | +@@ -1610,6 +1621,16 @@ |
1147 | } |
1148 | } |
1149 | |
1150 | @@ -71,7 +71,7 @@ |
1151 | if (dict_index_get_page(index) |
1152 | == buf_block_get_page_no(btr_cur_get_block(cursor))) { |
1153 | |
1154 | -@@ -1660,6 +1681,11 @@ |
1155 | +@@ -1666,6 +1687,11 @@ |
1156 | |
1157 | ut_ad(cursor && update && thr && roll_ptr); |
1158 | |
1159 | @@ -83,7 +83,7 @@ |
1160 | rec = btr_cur_get_rec(cursor); |
1161 | index = cursor->index; |
1162 | |
1163 | -@@ -1958,6 +1984,14 @@ |
1164 | +@@ -1965,6 +1991,14 @@ |
1165 | return(err); |
1166 | } |
1167 | |
1168 | @@ -95,10 +95,10 @@ |
1169 | + return(err); /* == DB_SUCCESS */ |
1170 | + } |
1171 | + |
1172 | - if (block->is_hashed) { |
1173 | - /* The function row_upd_changes_ord_field_binary works only |
1174 | - if the update vector was built for a clustered index, we must |
1175 | -@@ -2060,7 +2094,7 @@ |
1176 | + if (!(flags & BTR_KEEP_SYS_FLAG)) { |
1177 | + row_upd_rec_sys_fields(rec, NULL, |
1178 | + index, offsets, trx, roll_ptr); |
1179 | +@@ -2074,7 +2108,7 @@ |
1180 | rec = btr_cur_get_rec(cursor); |
1181 | index = cursor->index; |
1182 | ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table)); |
1183 | @@ -107,7 +107,7 @@ |
1184 | /* The insert buffer tree should never be updated in place. */ |
1185 | ut_ad(!dict_index_is_ibuf(index)); |
1186 | |
1187 | -@@ -2174,6 +2208,11 @@ |
1188 | +@@ -2187,6 +2221,11 @@ |
1189 | goto err_exit; |
1190 | } |
1191 | |
1192 | @@ -119,7 +119,7 @@ |
1193 | /* Ok, we may do the replacement. Store on the page infimum the |
1194 | explicit locks on rec, before deleting rec (see the comment in |
1195 | btr_cur_pessimistic_update). */ |
1196 | -@@ -2324,9 +2363,9 @@ |
1197 | +@@ -2337,9 +2376,9 @@ |
1198 | rec = btr_cur_get_rec(cursor); |
1199 | index = cursor->index; |
1200 | |
1201 | @@ -131,7 +131,7 @@ |
1202 | #ifdef UNIV_ZIP_DEBUG |
1203 | ut_a(!page_zip || page_zip_validate(page_zip, page)); |
1204 | #endif /* UNIV_ZIP_DEBUG */ |
1205 | -@@ -2414,6 +2453,9 @@ |
1206 | +@@ -2427,6 +2466,9 @@ |
1207 | |
1208 | ut_ad(big_rec_vec == NULL); |
1209 | |
1210 | @@ -141,8 +141,8 @@ |
1211 | btr_rec_free_updated_extern_fields( |
1212 | index, rec, page_zip, offsets, update, |
1213 | trx_is_recv(trx) ? RB_RECOVERY : RB_NORMAL, mtr); |
1214 | -@@ -2452,6 +2494,12 @@ |
1215 | - ut_ad(flags & BTR_KEEP_POS_FLAG); |
1216 | +@@ -2461,6 +2503,12 @@ |
1217 | + } |
1218 | } |
1219 | |
1220 | + if (trx->fake_changes) { |
1221 | @@ -154,7 +154,7 @@ |
1222 | /* Store state of explicit locks on rec on the page infimum record, |
1223 | before deleting rec. The page infimum acts as a dummy carrier of the |
1224 | locks, taking care also of lock releases, before we can move the locks |
1225 | -@@ -2807,6 +2855,11 @@ |
1226 | +@@ -2763,6 +2811,11 @@ |
1227 | ut_ad(dict_index_is_clust(index)); |
1228 | ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets))); |
1229 | |
1230 | @@ -166,7 +166,7 @@ |
1231 | err = lock_clust_rec_modify_check_and_lock(flags, block, |
1232 | rec, index, offsets, thr); |
1233 | |
1234 | -@@ -2944,6 +2997,11 @@ |
1235 | +@@ -2897,6 +2950,11 @@ |
1236 | rec_t* rec; |
1237 | ulint err; |
1238 | |
1239 | @@ -193,7 +193,7 @@ |
1240 | |
1241 | static handler *innobase_create_handler(handlerton *hton, |
1242 | TABLE_SHARE *table, |
1243 | -@@ -1685,6 +1691,8 @@ |
1244 | +@@ -1689,6 +1695,8 @@ |
1245 | trx->check_unique_secondary = !thd_test_options( |
1246 | thd, OPTION_RELAXED_UNIQUE_CHECKS); |
1247 | |
1248 | @@ -202,7 +202,7 @@ |
1249 | #ifdef EXTENDED_SLOWLOG |
1250 | if (thd_log_slow_verbosity(thd) & SLOG_V_INNODB) { |
1251 | trx->take_stats = TRUE; |
1252 | -@@ -3169,6 +3177,11 @@ |
1253 | +@@ -3196,6 +3204,11 @@ |
1254 | trx_search_latch_release_if_reserved(trx); |
1255 | } |
1256 | |
1257 | @@ -214,7 +214,7 @@ |
1258 | /* Transaction is deregistered only in a commit or a rollback. If |
1259 | it is deregistered we know there cannot be resources to be freed |
1260 | and we could return immediately. For the time being, we play safe |
1261 | -@@ -7493,6 +7506,12 @@ |
1262 | +@@ -7545,6 +7558,12 @@ |
1263 | |
1264 | trx = innobase_trx_allocate(thd); |
1265 | |
1266 | @@ -227,7 +227,7 @@ |
1267 | /* Latch the InnoDB data dictionary exclusively so that no deadlocks |
1268 | or lock waits can happen in it during a table create operation. |
1269 | Drop table etc. do this latching in row0mysql.c. */ |
1270 | -@@ -7713,6 +7732,10 @@ |
1271 | +@@ -7765,6 +7784,10 @@ |
1272 | DBUG_RETURN(HA_ERR_CRASHED); |
1273 | } |
1274 | |
1275 | @@ -238,7 +238,7 @@ |
1276 | /* Truncate the table in InnoDB */ |
1277 | |
1278 | error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx); |
1279 | -@@ -7769,6 +7792,12 @@ |
1280 | +@@ -7821,6 +7844,12 @@ |
1281 | |
1282 | trx = innobase_trx_allocate(thd); |
1283 | |
1284 | @@ -251,7 +251,7 @@ |
1285 | name_len = strlen(name); |
1286 | |
1287 | ut_a(name_len < 1000); |
1288 | -@@ -7855,6 +7884,12 @@ |
1289 | +@@ -7907,6 +7936,12 @@ |
1290 | trx->mysql_thd = NULL; |
1291 | #else |
1292 | trx = innobase_trx_allocate(thd); |
1293 | @@ -264,7 +264,7 @@ |
1294 | #endif |
1295 | row_drop_database_for_mysql(namebuf, trx); |
1296 | my_free(namebuf); |
1297 | -@@ -7960,6 +7995,11 @@ |
1298 | +@@ -8012,6 +8047,11 @@ |
1299 | trx_search_latch_release_if_reserved(parent_trx); |
1300 | |
1301 | trx = innobase_trx_allocate(thd); |
1302 | @@ -276,7 +276,7 @@ |
1303 | |
1304 | error = innobase_rename_table(trx, from, to, TRUE); |
1305 | |
1306 | -@@ -10765,6 +10805,10 @@ |
1307 | +@@ -10872,6 +10912,10 @@ |
1308 | return(0); |
1309 | } |
1310 | |
1311 | @@ -287,7 +287,7 @@ |
1312 | thd_get_xid(thd, (MYSQL_XID*) &trx->xid); |
1313 | |
1314 | /* Release a possible FIFO ticket and search latch. Since we will |
1315 | -@@ -12307,6 +12351,7 @@ |
1316 | +@@ -12420,6 +12464,7 @@ |
1317 | MYSQL_SYSVAR(rollback_segments), |
1318 | MYSQL_SYSVAR(corrupt_table_action), |
1319 | MYSQL_SYSVAR(lazy_drop_table), |
1320 | @@ -453,7 +453,7 @@ |
1321 | } |
1322 | --- a/storage/innobase/row/row0ins.c |
1323 | +++ b/storage/innobase/row/row0ins.c |
1324 | -@@ -1499,6 +1499,11 @@ |
1325 | +@@ -1502,6 +1502,11 @@ |
1326 | if (UNIV_LIKELY_NULL(heap)) { |
1327 | mem_heap_free(heap); |
1328 | } |
1329 | @@ -465,7 +465,7 @@ |
1330 | return(err); |
1331 | } |
1332 | |
1333 | -@@ -2005,7 +2010,7 @@ |
1334 | +@@ -2007,7 +2012,7 @@ |
1335 | } |
1336 | |
1337 | btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, |
1338 | @@ -474,7 +474,7 @@ |
1339 | &cursor, 0, __FILE__, __LINE__, &mtr); |
1340 | |
1341 | if (cursor.flag == BTR_CUR_INSERT_TO_IBUF) { |
1342 | -@@ -2066,7 +2071,7 @@ |
1343 | +@@ -2067,7 +2072,7 @@ |
1344 | |
1345 | btr_cur_search_to_nth_level(index, 0, entry, |
1346 | PAGE_CUR_LE, |
1347 | @@ -483,10 +483,11 @@ |
1348 | &cursor, 0, |
1349 | __FILE__, __LINE__, &mtr); |
1350 | } |
1351 | -@@ -2154,6 +2159,21 @@ |
1352 | - mtr_commit(&mtr); |
1353 | - |
1354 | +@@ -2121,6 +2126,22 @@ |
1355 | if (UNIV_LIKELY_NULL(big_rec)) { |
1356 | + rec_t* rec; |
1357 | + ulint* offsets; |
1358 | ++ |
1359 | + if (thr_get_trx(thr)->fake_changes) { |
1360 | + /* skip store extern */ |
1361 | + if (modify) { |
1362 | @@ -507,7 +508,7 @@ |
1363 | btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, |
1364 | --- a/storage/innobase/row/row0mysql.c |
1365 | +++ b/storage/innobase/row/row0mysql.c |
1366 | -@@ -1245,6 +1245,7 @@ |
1367 | +@@ -1246,6 +1246,7 @@ |
1368 | prebuilt->table->stat_n_rows--; |
1369 | } |
1370 | |
1371 | @@ -515,7 +516,7 @@ |
1372 | row_update_statistics_if_needed(prebuilt->table); |
1373 | trx->op_info = ""; |
1374 | |
1375 | -@@ -1504,6 +1505,7 @@ |
1376 | +@@ -1505,6 +1506,7 @@ |
1377 | that changes indexed columns, UPDATEs that change only non-indexed |
1378 | columns would not affect statistics. */ |
1379 | if (node->is_delete || !(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) { |
1380 | @@ -523,7 +524,7 @@ |
1381 | row_update_statistics_if_needed(prebuilt->table); |
1382 | } |
1383 | |
1384 | -@@ -1721,6 +1723,7 @@ |
1385 | +@@ -1722,6 +1724,7 @@ |
1386 | srv_n_rows_updated++; |
1387 | } |
1388 | |
1389 | @@ -574,17 +575,17 @@ |
1390 | |
1391 | ut_ad(!rec_get_deleted_flag(btr_pcur_get_rec(pcur), |
1392 | dict_table_is_comp(index->table))); |
1393 | -@@ -2020,7 +2024,8 @@ |
1394 | - err = btr_cur_pessimistic_update( |
1395 | - BTR_NO_LOCKING_FLAG | BTR_KEEP_POS_FLAG, btr_cur, |
1396 | - &heap, &big_rec, node->update, node->cmpl_info, thr, mtr); |
1397 | -- if (big_rec) { |
1398 | +@@ -2022,7 +2026,8 @@ |
1399 | + node->cmpl_info, thr, mtr); |
1400 | + mtr_commit(mtr); |
1401 | + |
1402 | +- if (err == DB_SUCCESS && big_rec) { |
1403 | + /* skip store extern for fake_changes */ |
1404 | -+ if (big_rec && !(thr_get_trx(thr)->fake_changes)) { |
1405 | ++ if (err == DB_SUCCESS && big_rec && !(thr_get_trx(thr)->fake_changes)) { |
1406 | ulint offsets_[REC_OFFS_NORMAL_SIZE]; |
1407 | rec_t* rec; |
1408 | rec_offs_init(offsets_); |
1409 | -@@ -2161,7 +2166,8 @@ |
1410 | +@@ -2146,7 +2151,8 @@ |
1411 | |
1412 | ut_a(pcur->rel_pos == BTR_PCUR_ON); |
1413 | |
1414 | |
1415 | === modified file 'patches/innodb_fast_checksum.patch' |
1416 | --- patches/innodb_fast_checksum.patch 2011-10-10 14:35:27 +0000 |
1417 | +++ patches/innodb_fast_checksum.patch 2011-11-16 09:37:24 +0000 |
1418 | @@ -153,7 +153,7 @@ |
1419 | static my_bool innobase_recovery_stats = TRUE; |
1420 | static my_bool innobase_locks_unsafe_for_binlog = FALSE; |
1421 | static my_bool innobase_overwrite_relay_log_info = FALSE; |
1422 | -@@ -2629,6 +2630,7 @@ |
1423 | +@@ -2656,6 +2657,7 @@ |
1424 | |
1425 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
1426 | srv_use_checksums = (ibool) innobase_use_checksums; |
1427 | @@ -161,7 +161,7 @@ |
1428 | |
1429 | srv_blocking_lru_restore = (ibool) innobase_blocking_lru_restore; |
1430 | |
1431 | -@@ -11426,6 +11428,15 @@ |
1432 | +@@ -11533,6 +11535,15 @@ |
1433 | "Disable with --skip-innodb-checksums.", |
1434 | NULL, NULL, TRUE); |
1435 | |
1436 | @@ -177,7 +177,7 @@ |
1437 | static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, |
1438 | PLUGIN_VAR_READONLY, |
1439 | "The common part for InnoDB table spaces.", |
1440 | -@@ -11952,6 +11963,7 @@ |
1441 | +@@ -12064,6 +12075,7 @@ |
1442 | MYSQL_SYSVAR(buffer_pool_size), |
1443 | MYSQL_SYSVAR(buffer_pool_instances), |
1444 | MYSQL_SYSVAR(checksums), |
1445 | @@ -187,7 +187,7 @@ |
1446 | MYSQL_SYSVAR(data_file_path), |
1447 | --- a/storage/innobase/include/buf0buf.h |
1448 | +++ b/storage/innobase/include/buf0buf.h |
1449 | -@@ -659,6 +659,11 @@ |
1450 | +@@ -634,6 +634,11 @@ |
1451 | buf_calc_page_new_checksum( |
1452 | /*=======================*/ |
1453 | const byte* page); /*!< in: buffer page */ |
1454 | @@ -211,7 +211,7 @@ |
1455 | #define FIL_PAGE_END_LSN_OLD_CHKSUM 8 /*!< the low 4 bytes of this are used |
1456 | --- a/storage/innobase/include/srv0srv.h |
1457 | +++ b/storage/innobase/include/srv0srv.h |
1458 | -@@ -225,6 +225,7 @@ |
1459 | +@@ -229,6 +229,7 @@ |
1460 | |
1461 | extern ibool srv_use_doublewrite_buf; |
1462 | extern ibool srv_use_checksums; |
1463 | |
1464 | === modified file 'patches/innodb_files_extend.patch' |
1465 | --- patches/innodb_files_extend.patch 2011-10-10 14:35:27 +0000 |
1466 | +++ patches/innodb_files_extend.patch 2011-11-16 09:37:24 +0000 |
1467 | @@ -109,7 +109,7 @@ |
1468 | static my_bool innobase_thread_concurrency_timer_based; |
1469 | static long long innobase_buffer_pool_size, innobase_log_file_size; |
1470 | |
1471 | -@@ -2325,6 +2328,65 @@ |
1472 | +@@ -2352,6 +2355,65 @@ |
1473 | } |
1474 | #endif /* DBUG_OFF */ |
1475 | |
1476 | @@ -175,7 +175,7 @@ |
1477 | #ifndef MYSQL_SERVER |
1478 | innodb_overwrite_relay_log_info = FALSE; |
1479 | #endif |
1480 | -@@ -7239,9 +7301,9 @@ |
1481 | +@@ -7291,9 +7353,9 @@ |
1482 | | DICT_TF_COMPACT |
1483 | | DICT_TF_FORMAT_ZIP |
1484 | << DICT_TF_FORMAT_SHIFT; |
1485 | @@ -188,7 +188,7 @@ |
1486 | } |
1487 | } |
1488 | |
1489 | -@@ -11437,6 +11499,16 @@ |
1490 | +@@ -11544,6 +11606,16 @@ |
1491 | "#### Attention: The checksum is not compatible for normal or disabled version! ####", |
1492 | NULL, NULL, FALSE); |
1493 | |
1494 | @@ -205,7 +205,7 @@ |
1495 | static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, |
1496 | PLUGIN_VAR_READONLY, |
1497 | "The common part for InnoDB table spaces.", |
1498 | -@@ -11958,6 +12030,8 @@ |
1499 | +@@ -12070,6 +12142,8 @@ |
1500 | NULL, NULL, 0, &corrupt_table_action_typelib); |
1501 | |
1502 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
1503 | @@ -216,7 +216,7 @@ |
1504 | MYSQL_SYSVAR(buffer_pool_size), |
1505 | --- a/storage/innobase/include/buf0buf.h |
1506 | +++ b/storage/innobase/include/buf0buf.h |
1507 | -@@ -1740,7 +1740,7 @@ |
1508 | +@@ -1715,7 +1715,7 @@ |
1509 | time_t last_printout_time; |
1510 | /*!< when buf_print_io was last time |
1511 | called */ |
1512 | @@ -225,7 +225,7 @@ |
1513 | /*!< Statistics of buddy system, |
1514 | indexed by block size */ |
1515 | buf_pool_stat_t stat; /*!< current statistics */ |
1516 | -@@ -1838,7 +1838,7 @@ |
1517 | +@@ -1813,7 +1813,7 @@ |
1518 | UT_LIST_BASE_NODE_T(buf_page_t) zip_clean; |
1519 | /*!< unmodified compressed pages */ |
1520 | #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ |
1521 | @@ -234,7 +234,7 @@ |
1522 | /*!< buddy free lists */ |
1523 | |
1524 | buf_page_t watch[BUF_POOL_WATCH_SIZE]; |
1525 | -@@ -1846,9 +1846,9 @@ |
1526 | +@@ -1821,9 +1821,9 @@ |
1527 | pool watches. Protected by |
1528 | buf_pool->mutex. */ |
1529 | |
1530 | @@ -358,7 +358,7 @@ |
1531 | #define TRX_SYS_MYSQL_MASTER_LOG_INFO (UNIV_PAGE_SIZE - 2000) |
1532 | --- a/storage/innobase/include/univ.i |
1533 | +++ b/storage/innobase/include/univ.i |
1534 | -@@ -310,9 +310,13 @@ |
1535 | +@@ -313,9 +313,13 @@ |
1536 | */ |
1537 | |
1538 | /* The 2-logarithm of UNIV_PAGE_SIZE: */ |
1539 | @@ -374,7 +374,7 @@ |
1540 | |
1541 | /* Maximum number of parallel threads in a parallelized operation */ |
1542 | #define UNIV_MAX_PARALLELISM 32 |
1543 | -@@ -431,7 +435,7 @@ |
1544 | +@@ -434,7 +438,7 @@ |
1545 | stored part of the field in the tablespace. The length field then |
1546 | contains the sum of the following flag and the locally stored len. */ |
1547 | |
1548 | @@ -383,7 +383,7 @@ |
1549 | |
1550 | /* Some macros to improve branch prediction and reduce cache misses */ |
1551 | #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER) |
1552 | -@@ -534,4 +538,6 @@ |
1553 | +@@ -537,4 +541,6 @@ |
1554 | UNIV_MEM_ALLOC(addr, size); \ |
1555 | } while (0) |
1556 | |
1557 | |
1558 | === modified file 'patches/innodb_fix_misc.patch' |
1559 | --- patches/innodb_fix_misc.patch 2011-10-10 14:35:27 +0000 |
1560 | +++ patches/innodb_fix_misc.patch 2011-11-16 09:37:24 +0000 |
1561 | @@ -68,7 +68,7 @@ |
1562 | block_mutex = buf_page_get_mutex_enter((buf_page_t*)block); |
1563 | ut_a(block_mutex); |
1564 | } |
1565 | -@@ -3471,11 +3513,28 @@ |
1566 | +@@ -3472,11 +3514,28 @@ |
1567 | |
1568 | fold = buf_page_address_fold(space, offset); |
1569 | |
1570 | @@ -97,7 +97,7 @@ |
1571 | if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) { |
1572 | /* The page is already in the buffer pool. */ |
1573 | watch_page = NULL; |
1574 | -@@ -3606,6 +3665,7 @@ |
1575 | +@@ -3607,6 +3666,7 @@ |
1576 | bpage->state = BUF_BLOCK_ZIP_PAGE; |
1577 | bpage->space = space; |
1578 | bpage->offset = offset; |
1579 | @@ -105,7 +105,7 @@ |
1580 | |
1581 | #ifdef UNIV_DEBUG |
1582 | bpage->in_page_hash = FALSE; |
1583 | -@@ -3690,6 +3750,7 @@ |
1584 | +@@ -3691,6 +3751,7 @@ |
1585 | |
1586 | fold = buf_page_address_fold(space, offset); |
1587 | |
1588 | @@ -113,7 +113,7 @@ |
1589 | //buf_pool_mutex_enter(buf_pool); |
1590 | mutex_enter(&buf_pool->LRU_list_mutex); |
1591 | rw_lock_x_lock(&buf_pool->page_hash_latch); |
1592 | -@@ -3697,6 +3758,21 @@ |
1593 | +@@ -3698,6 +3759,21 @@ |
1594 | block = (buf_block_t*) buf_page_hash_get_low( |
1595 | buf_pool, space, offset, fold); |
1596 | |
1597 | @@ -135,7 +135,7 @@ |
1598 | if (block |
1599 | && buf_page_in_file(&block->page) |
1600 | && !buf_pool_watch_is_sentinel(buf_pool, &block->page)) { |
1601 | -@@ -3988,8 +4064,11 @@ |
1602 | +@@ -4051,8 +4127,11 @@ |
1603 | } |
1604 | |
1605 | if (io_type == BUF_IO_WRITE |
1606 | @@ -452,7 +452,7 @@ |
1607 | ut_a(ret); |
1608 | --- a/storage/innobase/handler/ha_innodb.cc |
1609 | +++ b/storage/innobase/handler/ha_innodb.cc |
1610 | -@@ -12029,6 +12029,12 @@ |
1611 | +@@ -12141,6 +12141,12 @@ |
1612 | "except for the deletion.", |
1613 | NULL, NULL, 0, &corrupt_table_action_typelib); |
1614 | |
1615 | @@ -465,7 +465,7 @@ |
1616 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
1617 | MYSQL_SYSVAR(page_size), |
1618 | MYSQL_SYSVAR(log_block_size), |
1619 | -@@ -12122,6 +12128,7 @@ |
1620 | +@@ -12235,6 +12241,7 @@ |
1621 | MYSQL_SYSVAR(purge_batch_size), |
1622 | MYSQL_SYSVAR(rollback_segments), |
1623 | MYSQL_SYSVAR(corrupt_table_action), |
1624 | @@ -473,7 +473,7 @@ |
1625 | NULL |
1626 | }; |
1627 | |
1628 | -@@ -12131,7 +12138,7 @@ |
1629 | +@@ -12244,7 +12251,7 @@ |
1630 | &innobase_storage_engine, |
1631 | innobase_hton_name, |
1632 | plugin_author, |
1633 | @@ -484,7 +484,7 @@ |
1634 | NULL, /* Plugin Deinit */ |
1635 | --- a/storage/innobase/include/buf0buf.h |
1636 | +++ b/storage/innobase/include/buf0buf.h |
1637 | -@@ -1493,6 +1493,7 @@ |
1638 | +@@ -1468,6 +1468,7 @@ |
1639 | 0 if the block was never accessed |
1640 | in the buffer pool */ |
1641 | /* @} */ |
1642 | @@ -612,7 +612,7 @@ |
1643 | |
1644 | --- a/storage/innobase/include/srv0srv.h |
1645 | +++ b/storage/innobase/include/srv0srv.h |
1646 | -@@ -245,6 +245,8 @@ |
1647 | +@@ -249,6 +249,8 @@ |
1648 | extern ulint srv_pass_corrupt_table; |
1649 | |
1650 | extern ulint srv_dict_size_limit; |
1651 | @@ -623,17 +623,17 @@ |
1652 | extern ulint srv_n_rows_inserted; |
1653 | --- a/storage/innobase/include/sync0sync.h |
1654 | +++ b/storage/innobase/include/sync0sync.h |
1655 | -@@ -693,6 +693,7 @@ |
1656 | +@@ -690,6 +690,7 @@ |
1657 | #define SYNC_BUF_POOL 150 /* Buffer pool mutex */ |
1658 | #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */ |
1659 | #define SYNC_DOUBLEWRITE 140 |
1660 | +#define SYNC_OUTER_ANY_LATCH 136 |
1661 | #define SYNC_ANY_LATCH 135 |
1662 | - #define SYNC_THR_LOCAL 133 |
1663 | #define SYNC_MEM_HASH 131 |
1664 | + #define SYNC_MEM_POOL 130 |
1665 | --- a/storage/innobase/include/univ.i |
1666 | +++ b/storage/innobase/include/univ.i |
1667 | -@@ -52,6 +52,11 @@ |
1668 | +@@ -53,6 +53,11 @@ |
1669 | #define INNODB_VERSION_MINOR 1 |
1670 | #define INNODB_VERSION_BUGFIX 8 |
1671 | |
1672 | @@ -645,7 +645,7 @@ |
1673 | /* The following is the InnoDB version as shown in |
1674 | SELECT plugin_version FROM information_schema.plugins; |
1675 | calculated in make_version_string() in sql/sql_show.cc like this: |
1676 | -@@ -64,7 +69,8 @@ |
1677 | +@@ -65,7 +70,8 @@ |
1678 | #define INNODB_VERSION_STR \ |
1679 | IB_TO_STR(INNODB_VERSION_MAJOR) "." \ |
1680 | IB_TO_STR(INNODB_VERSION_MINOR) "." \ |
1681 | @@ -764,7 +764,7 @@ |
1682 | |
1683 | /** Provide optional 4.x backwards compatibility for 5.0 and above */ |
1684 | UNIV_INTERN ibool row_rollback_on_timeout = FALSE; |
1685 | -@@ -1191,6 +1192,13 @@ |
1686 | +@@ -1192,6 +1193,13 @@ |
1687 | |
1688 | thr = que_fork_get_first_thr(prebuilt->ins_graph); |
1689 | |
1690 | @@ -778,7 +778,7 @@ |
1691 | if (prebuilt->sql_stat_start) { |
1692 | node->state = INS_NODE_SET_IX_LOCK; |
1693 | prebuilt->sql_stat_start = FALSE; |
1694 | -@@ -2575,10 +2583,29 @@ |
1695 | +@@ -2576,10 +2584,29 @@ |
1696 | |
1697 | err = DB_ERROR; |
1698 | } else { |
1699 | @@ -808,7 +808,7 @@ |
1700 | } |
1701 | } |
1702 | |
1703 | -@@ -2927,6 +2954,19 @@ |
1704 | +@@ -2928,6 +2955,19 @@ |
1705 | table->space = space; |
1706 | index = dict_table_get_first_index(table); |
1707 | do { |
1708 | @@ -830,7 +830,7 @@ |
1709 | } while (index); |
1710 | --- a/storage/innobase/row/row0sel.c |
1711 | +++ b/storage/innobase/row/row0sel.c |
1712 | -@@ -3407,6 +3407,7 @@ |
1713 | +@@ -3418,6 +3418,7 @@ |
1714 | ulint offsets_[REC_OFFS_NORMAL_SIZE]; |
1715 | ulint* offsets = offsets_; |
1716 | ibool table_lock_waited = FALSE; |
1717 | @@ -838,7 +838,7 @@ |
1718 | |
1719 | rec_offs_init(offsets_); |
1720 | |
1721 | -@@ -3778,6 +3779,17 @@ |
1722 | +@@ -3796,6 +3797,17 @@ |
1723 | |
1724 | /* Do some start-of-statement preparations */ |
1725 | |
1726 | @@ -856,7 +856,7 @@ |
1727 | if (!prebuilt->sql_stat_start) { |
1728 | /* No need to set an intention lock or assign a read view */ |
1729 | |
1730 | -@@ -3788,6 +3800,18 @@ |
1731 | +@@ -3806,6 +3818,18 @@ |
1732 | " perform a consistent read\n" |
1733 | "InnoDB: but the read view is not assigned!\n", |
1734 | stderr); |
1735 | @@ -899,9 +899,9 @@ |
1736 | } |
1737 | --- a/storage/innobase/sync/sync0sync.c |
1738 | +++ b/storage/innobase/sync/sync0sync.c |
1739 | -@@ -1225,6 +1225,7 @@ |
1740 | +@@ -1219,6 +1219,7 @@ |
1741 | + case SYNC_LOG: |
1742 | case SYNC_LOG_FLUSH_ORDER: |
1743 | - case SYNC_THR_LOCAL: |
1744 | case SYNC_ANY_LATCH: |
1745 | + case SYNC_OUTER_ANY_LATCH: |
1746 | case SYNC_FILE_FORMAT_TAG: |
1747 | |
1748 | === modified file 'patches/innodb_io_patches.patch' |
1749 | --- patches/innodb_io_patches.patch 2011-09-21 09:20:58 +0000 |
1750 | +++ patches/innodb_io_patches.patch 2011-11-16 09:37:24 +0000 |
1751 | @@ -165,7 +165,7 @@ |
1752 | /********************************************************************//** |
1753 | Obtain the InnoDB transaction of a MySQL thread. |
1754 | @return reference to transaction pointer */ |
1755 | -@@ -2444,6 +2461,9 @@ |
1756 | +@@ -2471,6 +2488,9 @@ |
1757 | srv_n_read_io_threads = (ulint) innobase_read_io_threads; |
1758 | srv_n_write_io_threads = (ulint) innobase_write_io_threads; |
1759 | |
1760 | @@ -175,7 +175,7 @@ |
1761 | srv_force_recovery = (ulint) innobase_force_recovery; |
1762 | |
1763 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
1764 | -@@ -11026,7 +11046,7 @@ |
1765 | +@@ -11133,7 +11153,7 @@ |
1766 | PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, |
1767 | "Purge threads can be either 0 or 1.", |
1768 | NULL, NULL, |
1769 | @@ -184,7 +184,7 @@ |
1770 | 0, /* Minimum value */ |
1771 | 1, 0); /* Maximum value */ |
1772 | |
1773 | -@@ -11068,12 +11088,18 @@ |
1774 | +@@ -11175,12 +11195,18 @@ |
1775 | innodb_file_format_max_validate, |
1776 | innodb_file_format_max_update, "Antelope"); |
1777 | |
1778 | @@ -209,7 +209,7 @@ |
1779 | |
1780 | static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, |
1781 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
1782 | -@@ -11173,7 +11199,7 @@ |
1783 | +@@ -11285,7 +11311,7 @@ |
1784 | static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size, |
1785 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
1786 | "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", |
1787 | @@ -218,7 +218,7 @@ |
1788 | |
1789 | static MYSQL_SYSVAR_LONG(buffer_pool_instances, innobase_buffer_pool_instances, |
1790 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
1791 | -@@ -11330,6 +11356,95 @@ |
1792 | +@@ -11442,6 +11468,95 @@ |
1793 | "trigger a readahead.", |
1794 | NULL, NULL, 56, 0, 64, 0); |
1795 | |
1796 | @@ -314,7 +314,7 @@ |
1797 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
1798 | MYSQL_SYSVAR(additional_mem_pool_size), |
1799 | MYSQL_SYSVAR(autoextend_increment), |
1800 | -@@ -11350,6 +11465,7 @@ |
1801 | +@@ -11462,6 +11577,7 @@ |
1802 | MYSQL_SYSVAR(file_format_check), |
1803 | MYSQL_SYSVAR(file_format_max), |
1804 | MYSQL_SYSVAR(flush_log_at_trx_commit), |
1805 | @@ -322,7 +322,7 @@ |
1806 | MYSQL_SYSVAR(flush_method), |
1807 | MYSQL_SYSVAR(force_recovery), |
1808 | MYSQL_SYSVAR(large_prefix), |
1809 | -@@ -11388,6 +11504,13 @@ |
1810 | +@@ -11501,6 +11617,13 @@ |
1811 | MYSQL_SYSVAR(show_verbose_locks), |
1812 | MYSQL_SYSVAR(show_locks_held), |
1813 | MYSQL_SYSVAR(version), |
1814 | @@ -474,8 +474,8 @@ |
1815 | +extern char srv_use_global_flush_log_at_trx_commit; |
1816 | extern char srv_adaptive_flushing; |
1817 | |
1818 | - |
1819 | -@@ -217,6 +218,16 @@ |
1820 | + /* If this flag is TRUE, then we will load the indexes' (and tables') metadata |
1821 | +@@ -221,6 +222,16 @@ |
1822 | extern ulong srv_max_purge_lag; |
1823 | |
1824 | extern ulong srv_replication_delay; |
1825 | @@ -492,7 +492,7 @@ |
1826 | /*-------------------------------------------*/ |
1827 | |
1828 | extern ulint srv_n_rows_inserted; |
1829 | -@@ -395,8 +406,9 @@ |
1830 | +@@ -399,8 +410,9 @@ |
1831 | when writing data files, but do flush |
1832 | after writing to log files */ |
1833 | SRV_UNIX_NOSYNC, /*!< do not flush after writing */ |
1834 | |
1835 | === modified file 'patches/innodb_kill_idle_transaction.patch' |
1836 | --- patches/innodb_kill_idle_transaction.patch 2011-10-10 14:35:27 +0000 |
1837 | +++ patches/innodb_kill_idle_transaction.patch 2011-11-16 09:37:24 +0000 |
1838 | @@ -14,7 +14,7 @@ |
1839 | + |
1840 | +int thd_command(const MYSQL_THD thd); |
1841 | +long long thd_start_time(const MYSQL_THD thd); |
1842 | -+void thd_kill(MYSQL_THD thd); |
1843 | ++void thd_kill(unsigned long id); |
1844 | +#define EXTENDED_FOR_KILLIDLE |
1845 | + |
1846 | #ifdef __cplusplus |
1847 | @@ -28,7 +28,7 @@ |
1848 | const void *ha_data); |
1849 | +int thd_command(const void* thd); |
1850 | +long long thd_start_time(const void* thd); |
1851 | -+void thd_kill(void* thd); |
1852 | ++void thd_kill(unsigned long id); |
1853 | struct mysql_event_general |
1854 | { |
1855 | unsigned int event_subclass; |
1856 | @@ -40,7 +40,7 @@ |
1857 | const void *ha_data); |
1858 | +int thd_command(const void* thd); |
1859 | +long long thd_start_time(const void* thd); |
1860 | -+void thd_kill(void* thd); |
1861 | ++void thd_kill(unsigned long id); |
1862 | #include <mysql/plugin_auth_common.h> |
1863 | typedef struct st_plugin_vio_info |
1864 | { |
1865 | @@ -52,13 +52,13 @@ |
1866 | const void *ha_data); |
1867 | +int thd_command(const void* thd); |
1868 | +long long thd_start_time(const void* thd); |
1869 | -+void thd_kill(void* thd); |
1870 | ++void thd_kill(unsigned long id); |
1871 | enum enum_ftparser_mode |
1872 | { |
1873 | MYSQL_FTPARSER_SIMPLE_MODE= 0, |
1874 | --- a/sql/sql_class.cc |
1875 | +++ b/sql/sql_class.cc |
1876 | -@@ -713,6 +713,26 @@ |
1877 | +@@ -713,6 +713,42 @@ |
1878 | return buffer; |
1879 | } |
1880 | |
1881 | @@ -76,18 +76,34 @@ |
1882 | +} |
1883 | + |
1884 | +extern "C" |
1885 | -+void thd_kill(THD* thd) |
1886 | ++void thd_kill(ulong id) |
1887 | +{ |
1888 | -+ mysql_mutex_lock(&thd->LOCK_thd_data); |
1889 | -+ thd->awake(THD::KILL_CONNECTION); |
1890 | -+ mysql_mutex_unlock(&thd->LOCK_thd_data); |
1891 | ++ THD *tmp; |
1892 | ++ mysql_mutex_lock(&LOCK_thread_count); |
1893 | ++ I_List_iterator<THD> it(threads); |
1894 | ++ while ((tmp=it++)) |
1895 | ++ { |
1896 | ++ if (tmp->command == COM_DAEMON) |
1897 | ++ continue; |
1898 | ++ if (tmp->thread_id == id) |
1899 | ++ { |
1900 | ++ mysql_mutex_lock(&tmp->LOCK_thd_data); |
1901 | ++ break; |
1902 | ++ } |
1903 | ++ } |
1904 | ++ mysql_mutex_unlock(&LOCK_thread_count); |
1905 | ++ if (tmp) |
1906 | ++ { |
1907 | ++ tmp->awake(THD::KILL_CONNECTION); |
1908 | ++ mysql_mutex_unlock(&tmp->LOCK_thd_data); |
1909 | ++ } |
1910 | +} |
1911 | |
1912 | /** |
1913 | Implementation of Drop_table_error_handler::handle_condition(). |
1914 | --- a/storage/innobase/handler/ha_innodb.cc |
1915 | +++ b/storage/innobase/handler/ha_innodb.cc |
1916 | -@@ -2833,6 +2833,10 @@ |
1917 | +@@ -2860,6 +2860,10 @@ |
1918 | |
1919 | innobase_commit_concurrency_init_default(); |
1920 | |
1921 | @@ -98,7 +114,7 @@ |
1922 | #ifdef HAVE_PSI_INTERFACE |
1923 | /* Register keys with MySQL performance schema */ |
1924 | if (PSI_server) { |
1925 | -@@ -11579,6 +11583,48 @@ |
1926 | +@@ -11686,6 +11690,57 @@ |
1927 | return(false); |
1928 | } |
1929 | |
1930 | @@ -134,20 +150,29 @@ |
1931 | +void |
1932 | +innobase_thd_kill( |
1933 | +/*==============*/ |
1934 | -+ void* thd) |
1935 | ++ ulong thd_id) |
1936 | +{ |
1937 | +#ifdef EXTENDED_FOR_KILLIDLE |
1938 | -+ thd_kill((THD*) thd); |
1939 | ++ thd_kill(thd_id); |
1940 | +#else |
1941 | + return; |
1942 | +#endif |
1943 | +} |
1944 | + |
1945 | ++extern "C" |
1946 | ++ulong |
1947 | ++innobase_thd_get_thread_id( |
1948 | ++/*=======================*/ |
1949 | ++ const void* thd) |
1950 | ++{ |
1951 | ++ return(thd_get_thread_id((const THD*) thd)); |
1952 | ++} |
1953 | ++ |
1954 | + |
1955 | static SHOW_VAR innodb_status_variables_export[]= { |
1956 | {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC}, |
1957 | {NullS, NullS, SHOW_LONG} |
1958 | -@@ -11865,6 +11911,15 @@ |
1959 | +@@ -11977,6 +12032,15 @@ |
1960 | "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket", |
1961 | NULL, NULL, 500L, 1L, ~0L, 0); |
1962 | |
1963 | @@ -163,7 +188,7 @@ |
1964 | static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads, |
1965 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR, |
1966 | "Number of file I/O threads in InnoDB.", |
1967 | -@@ -12167,6 +12222,7 @@ |
1968 | +@@ -12279,6 +12343,7 @@ |
1969 | MYSQL_SYSVAR(fast_checksum), |
1970 | MYSQL_SYSVAR(commit_concurrency), |
1971 | MYSQL_SYSVAR(concurrency_tickets), |
1972 | @@ -173,7 +198,7 @@ |
1973 | MYSQL_SYSVAR(data_home_dir), |
1974 | --- a/storage/innobase/include/srv0srv.h |
1975 | +++ b/storage/innobase/include/srv0srv.h |
1976 | -@@ -292,6 +292,7 @@ |
1977 | +@@ -296,6 +296,7 @@ |
1978 | extern ulint srv_activity_count; |
1979 | extern ulint srv_fatal_semaphore_wait_threshold; |
1980 | extern ulint srv_dml_needed_delay; |
1981 | @@ -194,19 +219,20 @@ |
1982 | used in the processing of the current |
1983 | --- a/storage/innobase/srv/srv0srv.c |
1984 | +++ b/storage/innobase/srv/srv0srv.c |
1985 | -@@ -87,6 +87,11 @@ |
1986 | +@@ -87,6 +87,12 @@ |
1987 | #include "mysql/plugin.h" |
1988 | #include "mysql/service_thd_wait.h" |
1989 | |
1990 | +/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */ |
1991 | +ibool innobase_thd_is_idle(const void* thd); |
1992 | +ib_int64_t innobase_thd_get_start_time(const void* thd); |
1993 | -+void innobase_thd_kill(void* thd); |
1994 | ++void innobase_thd_kill(ulong thd_id); |
1995 | ++ulong innobase_thd_get_thread_id(const void* thd); |
1996 | + |
1997 | /* prototypes for new functions added to ha_innodb.cc */ |
1998 | ibool innobase_get_slow_log(); |
1999 | |
2000 | -@@ -97,6 +102,9 @@ |
2001 | +@@ -97,6 +103,9 @@ |
2002 | /* The following is the maximum allowed duration of a lock wait. */ |
2003 | UNIV_INTERN ulint srv_fatal_semaphore_wait_threshold = 600; |
2004 | |
2005 | @@ -216,7 +242,7 @@ |
2006 | /* How much data manipulation language (DML) statements need to be delayed, |
2007 | in microseconds, in order to reduce the lagging of the purge thread. */ |
2008 | UNIV_INTERN ulint srv_dml_needed_delay = 0; |
2009 | -@@ -2834,6 +2842,36 @@ |
2010 | +@@ -2834,6 +2843,36 @@ |
2011 | old_sema = sema; |
2012 | } |
2013 | |
2014 | @@ -231,9 +257,9 @@ |
2015 | + if (trx->conc_state == TRX_ACTIVE |
2016 | + && trx->mysql_thd |
2017 | + && innobase_thd_is_idle(trx->mysql_thd)) { |
2018 | -+ ib_int64_t start_time; /* as stmt ID */ |
2019 | ++ ib_int64_t start_time = innobase_thd_get_start_time(trx->mysql_thd); |
2020 | ++ ulong thd_id = innobase_thd_get_thread_id(trx->mysql_thd); |
2021 | + |
2022 | -+ start_time = innobase_thd_get_start_time(trx->mysql_thd); |
2023 | + if (trx->last_stmt_start != start_time) { |
2024 | + trx->idle_start = now; |
2025 | + trx->last_stmt_start = start_time; |
2026 | @@ -241,7 +267,7 @@ |
2027 | + > srv_kill_idle_transaction) { |
2028 | + /* kill the session */ |
2029 | + mutex_exit(&kernel_mutex); |
2030 | -+ innobase_thd_kill(trx->mysql_thd); |
2031 | ++ innobase_thd_kill(thd_id); |
2032 | + goto rescan_idle; |
2033 | + } |
2034 | + } |
2035 | |
2036 | === modified file 'patches/innodb_lru_dump_restore.patch' |
2037 | --- patches/innodb_lru_dump_restore.patch 2011-10-03 01:19:24 +0000 |
2038 | +++ patches/innodb_lru_dump_restore.patch 2011-11-16 09:37:24 +0000 |
2039 | @@ -7,7 +7,7 @@ |
2040 | # should be done or reviewed by the maintainer! |
2041 | --- a/storage/innobase/buf/buf0lru.c |
2042 | +++ b/storage/innobase/buf/buf0lru.c |
2043 | -@@ -2167,6 +2167,289 @@ |
2044 | +@@ -2183,6 +2183,289 @@ |
2045 | memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur); |
2046 | } |
2047 | |
2048 | @@ -392,7 +392,7 @@ |
2049 | /** Possible values for system variable "innodb_stats_method". The values |
2050 | are defined the same as its corresponding MyISAM system variable |
2051 | "myisam_stats_method"(see "myisam_stats_method_names"), for better usability */ |
2052 | -@@ -2625,6 +2627,8 @@ |
2053 | +@@ -2652,6 +2654,8 @@ |
2054 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
2055 | srv_use_checksums = (ibool) innobase_use_checksums; |
2056 | |
2057 | @@ -401,7 +401,7 @@ |
2058 | #ifdef HAVE_LARGE_PAGES |
2059 | if ((os_use_large_pages = (ibool) my_use_large_pages)) |
2060 | os_large_page_size = (ulint) opt_large_page_size; |
2061 | -@@ -11804,6 +11808,19 @@ |
2062 | +@@ -11916,6 +11920,19 @@ |
2063 | "Limit the allocated memory for dictionary cache. (0: unlimited)", |
2064 | NULL, NULL, 0, 0, LONG_MAX, 0); |
2065 | |
2066 | @@ -421,7 +421,7 @@ |
2067 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
2068 | MYSQL_SYSVAR(additional_mem_pool_size), |
2069 | MYSQL_SYSVAR(autoextend_increment), |
2070 | -@@ -11887,6 +11904,8 @@ |
2071 | +@@ -12000,6 +12017,8 @@ |
2072 | MYSQL_SYSVAR(random_read_ahead), |
2073 | MYSQL_SYSVAR(read_ahead_threshold), |
2074 | MYSQL_SYSVAR(io_capacity), |
2075 | @@ -496,8 +496,8 @@ |
2076 | +buf_LRU_file_restore(void); |
2077 | +/*======================*/ |
2078 | |
2079 | - #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG |
2080 | - /**********************************************************************//** |
2081 | + /******************************************************************//** |
2082 | + Remove one page from LRU list and put it to free list */ |
2083 | --- a/storage/innobase/include/buf0rea.h |
2084 | +++ b/storage/innobase/include/buf0rea.h |
2085 | @@ -31,6 +31,37 @@ |
2086 | @@ -557,7 +557,7 @@ |
2087 | handler for completed requests. The aio array of pending requests is divided |
2088 | --- a/storage/innobase/include/srv0srv.h |
2089 | +++ b/storage/innobase/include/srv0srv.h |
2090 | -@@ -357,6 +357,12 @@ |
2091 | +@@ -361,6 +361,12 @@ |
2092 | reading of a disk page */ |
2093 | extern ulint srv_buf_pool_reads; |
2094 | |
2095 | @@ -570,7 +570,7 @@ |
2096 | /** Status variables to be passed to MySQL */ |
2097 | typedef struct export_var_struct export_struc; |
2098 | |
2099 | -@@ -662,6 +668,16 @@ |
2100 | +@@ -666,6 +672,16 @@ |
2101 | /*=====================*/ |
2102 | void* arg); /*!< in: a dummy parameter required by |
2103 | os_thread_create */ |
2104 | |
2105 | === modified file 'patches/innodb_opt_lru_count.patch' |
2106 | --- patches/innodb_opt_lru_count.patch 2011-09-21 09:20:58 +0000 |
2107 | +++ patches/innodb_opt_lru_count.patch 2011-11-16 09:37:24 +0000 |
2108 | @@ -38,7 +38,7 @@ |
2109 | ut_d(bpage->in_page_hash = FALSE); |
2110 | |
2111 | /* relocate buf_pool->LRU */ |
2112 | -@@ -3283,8 +3283,8 @@ |
2113 | +@@ -3284,8 +3284,8 @@ |
2114 | bpage->in_zip_hash = FALSE; |
2115 | bpage->in_flush_list = FALSE; |
2116 | bpage->in_free_list = FALSE; |
2117 | @@ -48,7 +48,7 @@ |
2118 | |
2119 | ut_d(bpage->in_page_hash = TRUE); |
2120 | |
2121 | -@@ -3449,7 +3449,7 @@ |
2122 | +@@ -3450,7 +3450,7 @@ |
2123 | ibuf_merge_or_delete_for_page(NULL, space, offset, zip_size, TRUE); |
2124 | |
2125 | /* Flush pages from the end of the LRU list if necessary */ |
2126 | @@ -271,7 +271,7 @@ |
2127 | if (buf_debug_prints) { |
2128 | --- a/storage/innobase/include/buf0buf.h |
2129 | +++ b/storage/innobase/include/buf0buf.h |
2130 | -@@ -1442,11 +1442,11 @@ |
2131 | +@@ -1417,11 +1417,11 @@ |
2132 | |
2133 | UT_LIST_NODE_T(buf_page_t) LRU; |
2134 | /*!< node of the LRU list */ |
2135 | |
2136 | === modified file 'patches/innodb_overwrite_relay_log_info.patch' |
2137 | --- patches/innodb_overwrite_relay_log_info.patch 2011-09-21 09:20:58 +0000 |
2138 | +++ patches/innodb_overwrite_relay_log_info.patch 2011-11-16 09:37:24 +0000 |
2139 | @@ -55,7 +55,7 @@ |
2140 | static my_bool innobase_rollback_on_timeout = FALSE; |
2141 | static my_bool innobase_create_status_file = FALSE; |
2142 | static my_bool innobase_stats_on_metadata = TRUE; |
2143 | -@@ -2255,6 +2275,89 @@ |
2144 | +@@ -2282,6 +2302,89 @@ |
2145 | } |
2146 | #endif /* DBUG_OFF */ |
2147 | |
2148 | @@ -145,7 +145,7 @@ |
2149 | /* Check that values don't overflow on 32-bit systems. */ |
2150 | if (sizeof(ulint) == 4) { |
2151 | if (innobase_buffer_pool_size > UINT_MAX32) { |
2152 | -@@ -2553,6 +2656,76 @@ |
2153 | +@@ -2580,6 +2683,76 @@ |
2154 | goto mem_free_and_error; |
2155 | } |
2156 | |
2157 | @@ -222,7 +222,7 @@ |
2158 | innobase_old_blocks_pct = buf_LRU_old_ratio_update( |
2159 | innobase_old_blocks_pct, TRUE); |
2160 | |
2161 | -@@ -2667,6 +2840,25 @@ |
2162 | +@@ -2694,6 +2867,25 @@ |
2163 | trx_t* trx) /*!< in: transaction handle */ |
2164 | { |
2165 | if (trx_is_started(trx)) { |
2166 | @@ -248,7 +248,7 @@ |
2167 | |
2168 | trx_commit_for_mysql(trx); |
2169 | } |
2170 | -@@ -11015,6 +11207,12 @@ |
2171 | +@@ -11122,6 +11314,12 @@ |
2172 | "The common part for InnoDB table spaces.", |
2173 | NULL, NULL, NULL); |
2174 | |
2175 | @@ -261,7 +261,7 @@ |
2176 | static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite, |
2177 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
2178 | "Enable InnoDB doublewrite buffer (enabled by default). " |
2179 | -@@ -11486,6 +11684,7 @@ |
2180 | +@@ -11599,6 +11797,7 @@ |
2181 | MYSQL_SYSVAR(old_blocks_pct), |
2182 | MYSQL_SYSVAR(old_blocks_time), |
2183 | MYSQL_SYSVAR(open_files), |
2184 | |
2185 | === modified file 'patches/innodb_pass_corrupt_table.patch' |
2186 | --- patches/innodb_pass_corrupt_table.patch 2011-10-10 14:35:27 +0000 |
2187 | +++ patches/innodb_pass_corrupt_table.patch 2011-11-16 09:37:24 +0000 |
2188 | @@ -7,10 +7,10 @@ |
2189 | # should be done or reviewed by the maintainer! |
2190 | --- a/storage/innobase/btr/btr0btr.c |
2191 | +++ b/storage/innobase/btr/btr0btr.c |
2192 | -@@ -691,6 +691,12 @@ |
2193 | - root_page_no = dict_index_get_page(index); |
2194 | +@@ -692,6 +692,12 @@ |
2195 | |
2196 | - block = btr_block_get(space, zip_size, root_page_no, RW_X_LATCH, mtr); |
2197 | + block = btr_block_get(space, zip_size, root_page_no, RW_X_LATCH, |
2198 | + index, mtr); |
2199 | + |
2200 | + if (srv_pass_corrupt_table && !block) { |
2201 | + return(0); |
2202 | @@ -20,7 +20,7 @@ |
2203 | ut_a((ibool)!!page_is_comp(buf_block_get_frame(block)) |
2204 | == dict_table_is_comp(index->table)); |
2205 | #ifdef UNIV_BTR_DEBUG |
2206 | -@@ -977,6 +983,12 @@ |
2207 | +@@ -978,6 +984,12 @@ |
2208 | |
2209 | root = btr_root_get(index, &mtr); |
2210 | |
2211 | @@ -33,24 +33,24 @@ |
2212 | if (flag == BTR_N_LEAF_PAGES) { |
2213 | seg_header = root + PAGE_HEADER + PAGE_BTR_SEG_LEAF; |
2214 | |
2215 | -@@ -1433,6 +1445,13 @@ |
2216 | - mtr_start(&mtr); |
2217 | +@@ -1437,6 +1449,13 @@ |
2218 | |
2219 | - root = btr_page_get(space, zip_size, root_page_no, RW_X_LATCH, &mtr); |
2220 | + root = btr_page_get(space, zip_size, root_page_no, RW_X_LATCH, |
2221 | + NULL, &mtr); |
2222 | + |
2223 | + if (srv_pass_corrupt_table && !root) { |
2224 | + mtr_commit(&mtr); |
2225 | + return; |
2226 | + } |
2227 | + ut_a(root); |
2228 | -+ |
2229 | ++ |
2230 | #ifdef UNIV_BTR_DEBUG |
2231 | ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF |
2232 | + root, space)); |
2233 | -@@ -1455,6 +1474,12 @@ |
2234 | - mtr_start(&mtr); |
2235 | +@@ -1460,6 +1479,12 @@ |
2236 | |
2237 | - root = btr_page_get(space, zip_size, root_page_no, RW_X_LATCH, &mtr); |
2238 | + root = btr_page_get(space, zip_size, root_page_no, RW_X_LATCH, |
2239 | + NULL, &mtr); |
2240 | + |
2241 | + if (srv_pass_corrupt_table && !root) { |
2242 | + mtr_commit(&mtr); |
2243 | @@ -60,9 +60,9 @@ |
2244 | #ifdef UNIV_BTR_DEBUG |
2245 | ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP |
2246 | + root, space)); |
2247 | -@@ -1488,6 +1513,11 @@ |
2248 | - |
2249 | - block = btr_block_get(space, zip_size, root_page_no, RW_X_LATCH, mtr); |
2250 | +@@ -1493,6 +1518,11 @@ |
2251 | + block = btr_block_get(space, zip_size, root_page_no, RW_X_LATCH, |
2252 | + NULL, mtr); |
2253 | |
2254 | + if (srv_pass_corrupt_table && !block) { |
2255 | + return; |
2256 | @@ -74,57 +74,57 @@ |
2257 | header = buf_block_get_frame(block) + PAGE_HEADER + PAGE_BTR_SEG_TOP; |
2258 | --- a/storage/innobase/btr/btr0cur.c |
2259 | +++ b/storage/innobase/btr/btr0cur.c |
2260 | -@@ -250,6 +250,11 @@ |
2261 | - case BTR_MODIFY_LEAF: |
2262 | +@@ -251,6 +251,11 @@ |
2263 | mode = latch_mode == BTR_SEARCH_LEAF ? RW_S_LATCH : RW_X_LATCH; |
2264 | - get_block = btr_block_get(space, zip_size, page_no, mode, mtr); |
2265 | -+ |
2266 | -+ if (srv_pass_corrupt_table && !get_block) { |
2267 | -+ return; |
2268 | -+ } |
2269 | -+ ut_a(get_block); |
2270 | - #ifdef UNIV_BTR_DEBUG |
2271 | - ut_a(page_is_comp(get_block->frame) == page_is_comp(page)); |
2272 | - #endif /* UNIV_BTR_DEBUG */ |
2273 | -@@ -263,6 +268,11 @@ |
2274 | - get_block = btr_block_get(space, zip_size, |
2275 | - left_page_no, |
2276 | - RW_X_LATCH, mtr); |
2277 | -+ |
2278 | -+ if (srv_pass_corrupt_table && !get_block) { |
2279 | -+ return; |
2280 | -+ } |
2281 | -+ ut_a(get_block); |
2282 | - #ifdef UNIV_BTR_DEBUG |
2283 | - ut_a(page_is_comp(get_block->frame) |
2284 | - == page_is_comp(page)); |
2285 | -@@ -274,6 +284,11 @@ |
2286 | - |
2287 | - get_block = btr_block_get(space, zip_size, page_no, |
2288 | - RW_X_LATCH, mtr); |
2289 | -+ |
2290 | -+ if (srv_pass_corrupt_table && !get_block) { |
2291 | -+ return; |
2292 | -+ } |
2293 | -+ ut_a(get_block); |
2294 | - #ifdef UNIV_BTR_DEBUG |
2295 | - ut_a(page_is_comp(get_block->frame) == page_is_comp(page)); |
2296 | - #endif /* UNIV_BTR_DEBUG */ |
2297 | -@@ -285,6 +300,11 @@ |
2298 | - get_block = btr_block_get(space, zip_size, |
2299 | - right_page_no, |
2300 | - RW_X_LATCH, mtr); |
2301 | -+ |
2302 | -+ if (srv_pass_corrupt_table && !get_block) { |
2303 | -+ return; |
2304 | -+ } |
2305 | -+ ut_a(get_block); |
2306 | - #ifdef UNIV_BTR_DEBUG |
2307 | - ut_a(page_is_comp(get_block->frame) |
2308 | - == page_is_comp(page)); |
2309 | -@@ -306,6 +326,11 @@ |
2310 | - get_block = btr_block_get(space, zip_size, |
2311 | - left_page_no, mode, mtr); |
2312 | + get_block = btr_block_get( |
2313 | + space, zip_size, page_no, mode, cursor->index, mtr); |
2314 | ++ |
2315 | ++ if (srv_pass_corrupt_table && !get_block) { |
2316 | ++ return; |
2317 | ++ } |
2318 | ++ ut_a(get_block); |
2319 | + #ifdef UNIV_BTR_DEBUG |
2320 | + ut_a(page_is_comp(get_block->frame) == page_is_comp(page)); |
2321 | + #endif /* UNIV_BTR_DEBUG */ |
2322 | +@@ -264,6 +269,11 @@ |
2323 | + get_block = btr_block_get( |
2324 | + space, zip_size, left_page_no, |
2325 | + RW_X_LATCH, cursor->index, mtr); |
2326 | ++ |
2327 | ++ if (srv_pass_corrupt_table && !get_block) { |
2328 | ++ return; |
2329 | ++ } |
2330 | ++ ut_a(get_block); |
2331 | + #ifdef UNIV_BTR_DEBUG |
2332 | + ut_a(page_is_comp(get_block->frame) |
2333 | + == page_is_comp(page)); |
2334 | +@@ -276,6 +286,11 @@ |
2335 | + get_block = btr_block_get( |
2336 | + space, zip_size, page_no, |
2337 | + RW_X_LATCH, cursor->index, mtr); |
2338 | ++ |
2339 | ++ if (srv_pass_corrupt_table && !get_block) { |
2340 | ++ return; |
2341 | ++ } |
2342 | ++ ut_a(get_block); |
2343 | + #ifdef UNIV_BTR_DEBUG |
2344 | + ut_a(page_is_comp(get_block->frame) == page_is_comp(page)); |
2345 | + #endif /* UNIV_BTR_DEBUG */ |
2346 | +@@ -287,6 +302,11 @@ |
2347 | + get_block = btr_block_get( |
2348 | + space, zip_size, right_page_no, |
2349 | + RW_X_LATCH, cursor->index, mtr); |
2350 | ++ |
2351 | ++ if (srv_pass_corrupt_table && !get_block) { |
2352 | ++ return; |
2353 | ++ } |
2354 | ++ ut_a(get_block); |
2355 | + #ifdef UNIV_BTR_DEBUG |
2356 | + ut_a(page_is_comp(get_block->frame) |
2357 | + == page_is_comp(page)); |
2358 | +@@ -309,6 +329,11 @@ |
2359 | + space, zip_size, |
2360 | + left_page_no, mode, cursor->index, mtr); |
2361 | cursor->left_block = get_block; |
2362 | + |
2363 | + if (srv_pass_corrupt_table && !get_block) { |
2364 | @@ -134,10 +134,10 @@ |
2365 | #ifdef UNIV_BTR_DEBUG |
2366 | ut_a(page_is_comp(get_block->frame) |
2367 | == page_is_comp(page)); |
2368 | -@@ -316,6 +341,11 @@ |
2369 | - } |
2370 | +@@ -320,6 +345,11 @@ |
2371 | |
2372 | - get_block = btr_block_get(space, zip_size, page_no, mode, mtr); |
2373 | + get_block = btr_block_get( |
2374 | + space, zip_size, page_no, mode, cursor->index, mtr); |
2375 | + |
2376 | + if (srv_pass_corrupt_table && !get_block) { |
2377 | + return; |
2378 | @@ -146,7 +146,7 @@ |
2379 | #ifdef UNIV_BTR_DEBUG |
2380 | ut_a(page_is_comp(get_block->frame) == page_is_comp(page)); |
2381 | #endif /* UNIV_BTR_DEBUG */ |
2382 | -@@ -588,6 +618,19 @@ |
2383 | +@@ -592,6 +622,19 @@ |
2384 | file, line, mtr); |
2385 | |
2386 | if (block == NULL) { |
2387 | @@ -166,7 +166,7 @@ |
2388 | /* This must be a search to perform an insert/delete |
2389 | mark/ delete; try using the insert/delete buffer */ |
2390 | |
2391 | -@@ -662,6 +705,16 @@ |
2392 | +@@ -666,6 +709,16 @@ |
2393 | block->check_index_page_at_flush = TRUE; |
2394 | page = buf_block_get_frame(block); |
2395 | |
2396 | @@ -183,7 +183,7 @@ |
2397 | if (rw_latch != RW_NO_LATCH) { |
2398 | #ifdef UNIV_ZIP_DEBUG |
2399 | const page_zip_des_t* page_zip |
2400 | -@@ -866,6 +919,17 @@ |
2401 | +@@ -872,6 +925,17 @@ |
2402 | RW_NO_LATCH, NULL, BUF_GET, |
2403 | file, line, mtr); |
2404 | page = buf_block_get_frame(block); |
2405 | @@ -201,7 +201,7 @@ |
2406 | ut_ad(index->id == btr_page_get_index_id(page)); |
2407 | |
2408 | block->check_index_page_at_flush = TRUE; |
2409 | -@@ -986,6 +1050,14 @@ |
2410 | +@@ -992,6 +1056,14 @@ |
2411 | RW_NO_LATCH, NULL, BUF_GET, |
2412 | file, line, mtr); |
2413 | page = buf_block_get_frame(block); |
2414 | @@ -216,7 +216,7 @@ |
2415 | ut_ad(index->id == btr_page_get_index_id(page)); |
2416 | |
2417 | if (height == ULINT_UNDEFINED) { |
2418 | -@@ -1199,6 +1271,12 @@ |
2419 | +@@ -1205,6 +1277,12 @@ |
2420 | *big_rec = NULL; |
2421 | |
2422 | block = btr_cur_get_block(cursor); |
2423 | @@ -229,7 +229,7 @@ |
2424 | page = buf_block_get_frame(block); |
2425 | index = cursor->index; |
2426 | zip_size = buf_block_get_zip_size(block); |
2427 | -@@ -2988,6 +3066,11 @@ |
2428 | +@@ -2937,6 +3015,11 @@ |
2429 | |
2430 | block = btr_cur_get_block(cursor); |
2431 | |
2432 | @@ -241,7 +241,7 @@ |
2433 | ut_ad(page_is_leaf(buf_block_get_frame(block))); |
2434 | |
2435 | rec = btr_cur_get_rec(cursor); |
2436 | -@@ -3701,6 +3784,11 @@ |
2437 | +@@ -3650,6 +3733,11 @@ |
2438 | |
2439 | page = btr_cur_get_page(&cursor); |
2440 | |
2441 | @@ -277,9 +277,9 @@ |
2442 | index = btr_cur_get_index(btr_pcur_get_btr_cur(cursor)); |
2443 | |
2444 | page_cursor = btr_pcur_get_page_cur(cursor); |
2445 | -@@ -392,6 +398,15 @@ |
2446 | - next_block = btr_block_get(space, zip_size, next_page_no, |
2447 | - cursor->latch_mode, mtr); |
2448 | +@@ -395,6 +401,15 @@ |
2449 | + cursor->latch_mode, |
2450 | + btr_pcur_get_btr_cur(cursor)->index, mtr); |
2451 | next_page = buf_block_get_frame(next_block); |
2452 | + |
2453 | + if (srv_pass_corrupt_table && !next_page) { |
2454 | @@ -374,7 +374,7 @@ |
2455 | #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG |
2456 | bpage->file_page_was_freed = FALSE; |
2457 | #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
2458 | -@@ -3845,6 +3866,7 @@ |
2459 | +@@ -3899,6 +3920,7 @@ |
2460 | (ulong) bpage->offset); |
2461 | } |
2462 | |
2463 | @@ -382,7 +382,7 @@ |
2464 | /* From version 3.23.38 up we store the page checksum |
2465 | to the 4 first bytes of the page end lsn field */ |
2466 | |
2467 | -@@ -3886,6 +3908,23 @@ |
2468 | +@@ -3940,6 +3962,23 @@ |
2469 | REFMAN "forcing-innodb-recovery.html\n" |
2470 | "InnoDB: about forcing recovery.\n", stderr); |
2471 | |
2472 | @@ -404,17 +404,17 @@ |
2473 | + bpage->is_corrupt = TRUE; |
2474 | + } else |
2475 | if (srv_force_recovery < SRV_FORCE_IGNORE_CORRUPT) { |
2476 | - fputs("InnoDB: Ending processing because of" |
2477 | - " a corrupt database page.\n", |
2478 | -@@ -3893,6 +3932,7 @@ |
2479 | - exit(1); |
2480 | + /* If page space id is larger than TRX_SYS_SPACE |
2481 | + (0), we will attempt to mark the corresponding |
2482 | +@@ -3956,6 +3995,7 @@ |
2483 | + } |
2484 | } |
2485 | } |
2486 | + } /**/ |
2487 | |
2488 | if (recv_recovery_is_on()) { |
2489 | /* Pages must be uncompressed for crash recovery. */ |
2490 | -@@ -3902,8 +3942,11 @@ |
2491 | +@@ -3965,8 +4005,11 @@ |
2492 | |
2493 | if (uncompressed && !recv_no_ibuf_operations) { |
2494 | ibuf_merge_or_delete_for_page( |
2495 | @@ -445,10 +445,10 @@ |
2496 | /* The i/o is already completed when we arrive from |
2497 | --- a/storage/innobase/dict/dict0dict.c |
2498 | +++ b/storage/innobase/dict/dict0dict.c |
2499 | -@@ -54,6 +54,7 @@ |
2500 | - #include "row0merge.h" |
2501 | +@@ -55,6 +55,7 @@ |
2502 | #include "m_ctype.h" /* my_isspace() */ |
2503 | #include "ha_prototypes.h" /* innobase_strcasecmp(), innobase_casedn_str()*/ |
2504 | + #include "row0upd.h" |
2505 | +#include "srv0start.h" /* SRV_LOG_SPACE_FIRST_ID */ |
2506 | |
2507 | #include <ctype.h> |
2508 | @@ -471,7 +471,7 @@ |
2509 | goto next_loop; |
2510 | |
2511 | cached_foreign_tables = 0; |
2512 | -@@ -4366,6 +4367,12 @@ |
2513 | +@@ -4367,6 +4368,12 @@ |
2514 | heap = mem_heap_create(1000); |
2515 | |
2516 | while (index) { |
2517 | @@ -484,7 +484,7 @@ |
2518 | size = btr_get_size(index, BTR_TOTAL_SIZE); |
2519 | |
2520 | index->stat_index_size = size; |
2521 | -@@ -4513,6 +4520,12 @@ |
2522 | +@@ -4514,6 +4521,12 @@ |
2523 | heap = mem_heap_create(1000); |
2524 | |
2525 | while (index) { |
2526 | @@ -497,7 +497,7 @@ |
2527 | /*===========================================*/ |
2528 | { |
2529 | dict_table_t* sys_stats; |
2530 | -@@ -4705,6 +4718,13 @@ |
2531 | +@@ -4706,6 +4719,13 @@ |
2532 | || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO |
2533 | && dict_index_is_clust(index)))) { |
2534 | ulint size; |
2535 | @@ -511,9 +511,9 @@ |
2536 | size = btr_get_size(index, BTR_TOTAL_SIZE); |
2537 | |
2538 | index->stat_index_size = size; |
2539 | -@@ -5501,4 +5521,42 @@ |
2540 | - rw_lock_free(&dict_table_stats_latches[i]); |
2541 | - } |
2542 | +@@ -5685,4 +5705,42 @@ |
2543 | + |
2544 | + index->type |= DICT_CORRUPT; |
2545 | } |
2546 | + |
2547 | +/************************************************************************* |
2548 | @@ -787,7 +787,7 @@ |
2549 | if (descr != NULL) { |
2550 | --- a/storage/innobase/handler/ha_innodb.cc |
2551 | +++ b/storage/innobase/handler/ha_innodb.cc |
2552 | -@@ -3985,6 +3985,12 @@ |
2553 | +@@ -4012,6 +4012,12 @@ |
2554 | DBUG_RETURN(1); |
2555 | } |
2556 | |
2557 | @@ -800,7 +800,7 @@ |
2558 | /* Create buffers for packing the fields of a record. Why |
2559 | table->reclength did not work here? Obviously, because char |
2560 | fields when packed actually became 1 byte longer, when we also |
2561 | -@@ -4012,6 +4018,19 @@ |
2562 | +@@ -4039,6 +4045,19 @@ |
2563 | /* Get pointer to a table object in InnoDB dictionary cache */ |
2564 | ib_table = dict_table_get(norm_name, TRUE); |
2565 | |
2566 | @@ -820,7 +820,7 @@ |
2567 | if (NULL == ib_table) { |
2568 | if (is_part && retries < 10) { |
2569 | ++retries; |
2570 | -@@ -5161,6 +5180,10 @@ |
2571 | +@@ -5188,6 +5207,10 @@ |
2572 | |
2573 | ha_statistic_increment(&SSV::ha_write_count); |
2574 | |
2575 | @@ -831,7 +831,7 @@ |
2576 | if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) |
2577 | table->timestamp_field->set_time(); |
2578 | |
2579 | -@@ -5378,6 +5401,10 @@ |
2580 | +@@ -5405,6 +5428,10 @@ |
2581 | func_exit: |
2582 | innobase_active_small(); |
2583 | |
2584 | @@ -842,7 +842,7 @@ |
2585 | DBUG_RETURN(error_result); |
2586 | } |
2587 | |
2588 | -@@ -5554,6 +5581,10 @@ |
2589 | +@@ -5581,6 +5608,10 @@ |
2590 | |
2591 | ha_statistic_increment(&SSV::ha_update_count); |
2592 | |
2593 | @@ -853,7 +853,7 @@ |
2594 | if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) |
2595 | table->timestamp_field->set_time(); |
2596 | |
2597 | -@@ -5643,6 +5674,10 @@ |
2598 | +@@ -5670,6 +5701,10 @@ |
2599 | |
2600 | innobase_active_small(); |
2601 | |
2602 | @@ -864,7 +864,7 @@ |
2603 | DBUG_RETURN(error); |
2604 | } |
2605 | |
2606 | -@@ -5664,6 +5699,10 @@ |
2607 | +@@ -5691,6 +5726,10 @@ |
2608 | |
2609 | ha_statistic_increment(&SSV::ha_delete_count); |
2610 | |
2611 | @@ -875,7 +875,7 @@ |
2612 | if (!prebuilt->upd_node) { |
2613 | row_get_prebuilt_update_vector(prebuilt); |
2614 | } |
2615 | -@@ -5690,6 +5729,10 @@ |
2616 | +@@ -5717,6 +5756,10 @@ |
2617 | |
2618 | innobase_active_small(); |
2619 | |
2620 | @@ -886,7 +886,7 @@ |
2621 | DBUG_RETURN(error); |
2622 | } |
2623 | |
2624 | -@@ -5929,6 +5972,10 @@ |
2625 | +@@ -5956,6 +5999,10 @@ |
2626 | |
2627 | ha_statistic_increment(&SSV::ha_read_key_count); |
2628 | |
2629 | @@ -896,8 +896,8 @@ |
2630 | + |
2631 | index = prebuilt->index; |
2632 | |
2633 | - if (UNIV_UNLIKELY(index == NULL)) { |
2634 | -@@ -5994,6 +6041,10 @@ |
2635 | + if (UNIV_UNLIKELY(index == NULL) || dict_index_is_corrupted(index)) { |
2636 | +@@ -6023,6 +6070,10 @@ |
2637 | ret = DB_UNSUPPORTED; |
2638 | } |
2639 | |
2640 | @@ -908,7 +908,7 @@ |
2641 | switch (ret) { |
2642 | case DB_SUCCESS: |
2643 | error = 0; |
2644 | -@@ -6109,6 +6160,10 @@ |
2645 | +@@ -6138,6 +6189,10 @@ |
2646 | { |
2647 | DBUG_ENTER("change_active_index"); |
2648 | |
2649 | @@ -919,7 +919,7 @@ |
2650 | ut_ad(user_thd == ha_thd()); |
2651 | ut_a(prebuilt->trx == thd_to_trx(user_thd)); |
2652 | |
2653 | -@@ -6199,6 +6254,10 @@ |
2654 | +@@ -6251,6 +6306,10 @@ |
2655 | |
2656 | DBUG_ENTER("general_fetch"); |
2657 | |
2658 | @@ -930,7 +930,7 @@ |
2659 | ut_a(prebuilt->trx == thd_to_trx(user_thd)); |
2660 | |
2661 | innodb_srv_conc_enter_innodb(prebuilt->trx); |
2662 | -@@ -6208,6 +6267,10 @@ |
2663 | +@@ -6260,6 +6319,10 @@ |
2664 | |
2665 | innodb_srv_conc_exit_innodb(prebuilt->trx); |
2666 | |
2667 | @@ -941,7 +941,7 @@ |
2668 | switch (ret) { |
2669 | case DB_SUCCESS: |
2670 | error = 0; |
2671 | -@@ -7474,10 +7537,18 @@ |
2672 | +@@ -7526,10 +7589,18 @@ |
2673 | |
2674 | update_thd(ha_thd()); |
2675 | |
2676 | @@ -960,7 +960,7 @@ |
2677 | error = convert_error_code_to_mysql(error, prebuilt->table->flags, |
2678 | NULL); |
2679 | |
2680 | -@@ -7978,6 +8049,16 @@ |
2681 | +@@ -8034,6 +8105,16 @@ |
2682 | return(ranges + (double) rows / (double) total_rows * time_for_scan); |
2683 | } |
2684 | |
2685 | @@ -977,7 +977,7 @@ |
2686 | /*********************************************************************//** |
2687 | Calculates the key number used inside MySQL for an Innobase index. We will |
2688 | first check the "index translation table" for a match of the index to get |
2689 | -@@ -8155,7 +8236,7 @@ |
2690 | +@@ -8211,7 +8292,7 @@ |
2691 | ib_table = prebuilt->table; |
2692 | |
2693 | if (flag & HA_STATUS_TIME) { |
2694 | @@ -986,7 +986,7 @@ |
2695 | /* In sql_show we call with this flag: update |
2696 | then statistics so that they are up-to-date */ |
2697 | |
2698 | -@@ -8455,10 +8536,18 @@ |
2699 | +@@ -8511,10 +8592,18 @@ |
2700 | THD* thd, /*!< in: connection thread handle */ |
2701 | HA_CHECK_OPT* check_opt) /*!< in: currently ignored */ |
2702 | { |
2703 | @@ -1005,7 +1005,7 @@ |
2704 | return(0); |
2705 | } |
2706 | |
2707 | -@@ -8640,6 +8729,10 @@ |
2708 | +@@ -8747,6 +8836,10 @@ |
2709 | my_error(ER_QUERY_INTERRUPTED, MYF(0)); |
2710 | } |
2711 | |
2712 | @@ -1016,7 +1016,7 @@ |
2713 | DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT); |
2714 | } |
2715 | |
2716 | -@@ -9410,6 +9503,10 @@ |
2717 | +@@ -9517,6 +9610,10 @@ |
2718 | |
2719 | update_thd(thd); |
2720 | |
2721 | @@ -1027,7 +1027,7 @@ |
2722 | if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) { |
2723 | ut_print_timestamp(stderr); |
2724 | fprintf(stderr, |
2725 | -@@ -11829,6 +11926,26 @@ |
2726 | +@@ -11941,6 +12038,26 @@ |
2727 | "dump file (if present). Disabled by default.", |
2728 | NULL, NULL, FALSE); |
2729 | |
2730 | @@ -1054,7 +1054,7 @@ |
2731 | static struct st_mysql_sys_var* innobase_system_variables[]= { |
2732 | MYSQL_SYSVAR(additional_mem_pool_size), |
2733 | MYSQL_SYSVAR(autoextend_increment), |
2734 | -@@ -11918,6 +12035,7 @@ |
2735 | +@@ -12031,6 +12148,7 @@ |
2736 | MYSQL_SYSVAR(purge_threads), |
2737 | MYSQL_SYSVAR(purge_batch_size), |
2738 | MYSQL_SYSVAR(rollback_segments), |
2739 | @@ -1091,7 +1091,7 @@ |
2740 | #define BTR_MAX_NODE_LEVEL 50 /*!< Maximum B-tree page level |
2741 | (not really a hard limit). |
2742 | Used in debug assertions |
2743 | -@@ -55,7 +55,9 @@ |
2744 | +@@ -59,7 +59,9 @@ |
2745 | block = buf_page_get_gen(space, zip_size, page_no, mode, |
2746 | NULL, BUF_GET, file, line, mtr); |
2747 | |
2748 | @@ -1100,11 +1100,11 @@ |
2749 | + |
2750 | + if (block && mode != RW_NO_LATCH) { |
2751 | |
2752 | - buf_block_dbg_add_level(block, SYNC_TREE_NODE); |
2753 | - } |
2754 | + buf_block_dbg_add_level( |
2755 | + block, index != NULL && dict_index_is_ibuf(index) |
2756 | --- a/storage/innobase/include/buf0buf.h |
2757 | +++ b/storage/innobase/include/buf0buf.h |
2758 | -@@ -1041,7 +1041,7 @@ |
2759 | +@@ -1016,7 +1016,7 @@ |
2760 | const buf_block_t* block) /*!< in: pointer to the control block */ |
2761 | __attribute__((pure)); |
2762 | #else /* UNIV_DEBUG */ |
2763 | @@ -1113,7 +1113,7 @@ |
2764 | #endif /* UNIV_DEBUG */ |
2765 | /*********************************************************************//** |
2766 | Gets the space id of a block. |
2767 | -@@ -1488,6 +1488,7 @@ |
2768 | +@@ -1463,6 +1463,7 @@ |
2769 | 0 if the block was never accessed |
2770 | in the buffer pool */ |
2771 | /* @} */ |
2772 | @@ -1147,9 +1147,9 @@ |
2773 | switch (buf_block_get_state(block)) { |
2774 | --- a/storage/innobase/include/dict0dict.h |
2775 | +++ b/storage/innobase/include/dict0dict.h |
2776 | -@@ -1258,6 +1258,15 @@ |
2777 | - dict_close(void); |
2778 | - /*============*/ |
2779 | +@@ -1326,6 +1326,15 @@ |
2780 | + /*========================*/ |
2781 | + ulint space_id); /*!< in: space ID */ |
2782 | |
2783 | +/************************************************************************* |
2784 | +set is_corrupt flag by space_id*/ |
2785 | @@ -1165,7 +1165,7 @@ |
2786 | #endif |
2787 | --- a/storage/innobase/include/dict0mem.h |
2788 | +++ b/storage/innobase/include/dict0mem.h |
2789 | -@@ -666,6 +666,7 @@ |
2790 | +@@ -670,6 +670,7 @@ |
2791 | the AUTOINC lock on this table. */ |
2792 | /* @} */ |
2793 | /*----------------------*/ |
2794 | @@ -1220,7 +1220,7 @@ |
2795 | buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK); |
2796 | --- a/storage/innobase/include/page0page.h |
2797 | +++ b/storage/innobase/include/page0page.h |
2798 | -@@ -527,7 +527,7 @@ |
2799 | +@@ -497,7 +497,7 @@ |
2800 | page_is_leaf( |
2801 | /*=========*/ |
2802 | const page_t* page) /*!< in: page */ |
2803 | @@ -1254,7 +1254,7 @@ |
2804 | Decompress a page. This function should tolerate errors on the compressed |
2805 | --- a/storage/innobase/include/srv0srv.h |
2806 | +++ b/storage/innobase/include/srv0srv.h |
2807 | -@@ -241,6 +241,7 @@ |
2808 | +@@ -245,6 +245,7 @@ |
2809 | extern ulint srv_adaptive_flushing_method; |
2810 | |
2811 | extern ulint srv_expand_import; |
2812 | @@ -1277,7 +1277,7 @@ |
2813 | ut_ad(page_simple_validate_new((page_t*) page)); |
2814 | --- a/storage/innobase/row/row0ins.c |
2815 | +++ b/storage/innobase/row/row0ins.c |
2816 | -@@ -1335,6 +1335,12 @@ |
2817 | +@@ -1338,6 +1338,12 @@ |
2818 | const rec_t* rec = btr_pcur_get_rec(&pcur); |
2819 | const buf_block_t* block = btr_pcur_get_block(&pcur); |
2820 | |
2821 | @@ -1308,7 +1308,7 @@ |
2822 | |
2823 | --- a/storage/innobase/row/row0sel.c |
2824 | +++ b/storage/innobase/row/row0sel.c |
2825 | -@@ -3894,6 +3894,13 @@ |
2826 | +@@ -3912,6 +3912,13 @@ |
2827 | /* PHASE 4: Look for matching records in a loop */ |
2828 | |
2829 | rec = btr_pcur_get_rec(pcur); |
2830 | @@ -1322,7 +1322,7 @@ |
2831 | ut_ad(!!page_rec_is_comp(rec) == comp); |
2832 | #ifdef UNIV_SEARCH_DEBUG |
2833 | /* |
2834 | -@@ -3971,7 +3978,13 @@ |
2835 | +@@ -3989,7 +3996,13 @@ |
2836 | if (UNIV_UNLIKELY(next_offs >= UNIV_PAGE_SIZE - PAGE_DIR)) { |
2837 | |
2838 | wrong_offs: |
2839 | @@ -1337,7 +1337,7 @@ |
2840 | ut_print_timestamp(stderr); |
2841 | buf_page_print(page_align(rec), 0); |
2842 | fprintf(stderr, |
2843 | -@@ -4022,7 +4035,8 @@ |
2844 | +@@ -4040,7 +4053,8 @@ |
2845 | |
2846 | offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); |
2847 | |
2848 | |
2849 | === modified file 'patches/innodb_recovery_patches.patch' |
2850 | --- patches/innodb_recovery_patches.patch 2011-09-21 09:20:58 +0000 |
2851 | +++ patches/innodb_recovery_patches.patch 2011-11-16 09:37:24 +0000 |
2852 | @@ -115,7 +115,7 @@ |
2853 | static my_bool innobase_locks_unsafe_for_binlog = FALSE; |
2854 | static my_bool innobase_overwrite_relay_log_info = FALSE; |
2855 | static my_bool innobase_rollback_on_timeout = FALSE; |
2856 | -@@ -2583,6 +2584,8 @@ |
2857 | +@@ -2610,6 +2611,8 @@ |
2858 | |
2859 | srv_force_recovery = (ulint) innobase_force_recovery; |
2860 | |
2861 | @@ -124,7 +124,7 @@ |
2862 | srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; |
2863 | srv_use_checksums = (ibool) innobase_use_checksums; |
2864 | |
2865 | -@@ -11275,6 +11278,11 @@ |
2866 | +@@ -11382,6 +11385,11 @@ |
2867 | "The common part for InnoDB table spaces.", |
2868 | NULL, NULL, NULL); |
2869 | |
2870 | @@ -136,7 +136,7 @@ |
2871 | static MYSQL_SYSVAR_BOOL(recovery_update_relay_log, innobase_overwrite_relay_log_info, |
2872 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
2873 | "During InnoDB crash recovery on slave overwrite relay-log.info " |
2874 | -@@ -11758,6 +11766,7 @@ |
2875 | +@@ -11870,6 +11878,7 @@ |
2876 | MYSQL_SYSVAR(data_file_path), |
2877 | MYSQL_SYSVAR(data_home_dir), |
2878 | MYSQL_SYSVAR(doublewrite), |
2879 | |
2880 | === modified file 'patches/innodb_separate_doublewrite.patch' |
2881 | --- patches/innodb_separate_doublewrite.patch 2011-10-10 14:35:27 +0000 |
2882 | +++ patches/innodb_separate_doublewrite.patch 2011-11-16 09:37:24 +0000 |
2883 | @@ -7,7 +7,7 @@ |
2884 | # should be done or reviewed by the maintainer! |
2885 | --- a/storage/innobase/buf/buf0buf.c |
2886 | +++ b/storage/innobase/buf/buf0buf.c |
2887 | -@@ -3814,7 +3814,8 @@ |
2888 | +@@ -3868,7 +3868,8 @@ |
2889 | read_space_id = mach_read_from_4( |
2890 | frame + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); |
2891 | |
2892 | @@ -71,7 +71,7 @@ |
2893 | |
2894 | |
2895 | /** Following are six InnoDB system tables */ |
2896 | -@@ -811,7 +812,7 @@ |
2897 | +@@ -816,7 +817,7 @@ |
2898 | |
2899 | mtr_commit(&mtr); |
2900 | |
2901 | @@ -80,7 +80,7 @@ |
2902 | /* The system tablespace always exists. */ |
2903 | } else if (in_crash_recovery) { |
2904 | /* Check that the tablespace (the .ibd file) really |
2905 | -@@ -1682,7 +1683,7 @@ |
2906 | +@@ -1727,7 +1728,7 @@ |
2907 | space = mach_read_from_4(field); |
2908 | |
2909 | /* Check if the tablespace exists and has the right name */ |
2910 | @@ -89,7 +89,7 @@ |
2911 | flags = dict_sys_tables_get_flags(rec); |
2912 | |
2913 | if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) { |
2914 | -@@ -1835,7 +1836,7 @@ |
2915 | +@@ -1880,7 +1881,7 @@ |
2916 | goto err_exit; |
2917 | } |
2918 | |
2919 | @@ -341,7 +341,7 @@ |
2920 | |
2921 | /* The highest file format being used in the database. The value can be |
2922 | set by user, however, it will be adjusted to the newer file format if |
2923 | -@@ -2481,6 +2482,8 @@ |
2924 | +@@ -2508,6 +2509,8 @@ |
2925 | goto error; |
2926 | } |
2927 | |
2928 | @@ -350,7 +350,7 @@ |
2929 | srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table; |
2930 | |
2931 | /* -------------- Log files ---------------------------*/ |
2932 | -@@ -11651,6 +11654,11 @@ |
2933 | +@@ -11763,6 +11766,11 @@ |
2934 | "Path to individual files and their sizes.", |
2935 | NULL, NULL, NULL); |
2936 | |
2937 | @@ -362,7 +362,7 @@ |
2938 | static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode, |
2939 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
2940 | "The AUTOINC lock modes supported by InnoDB: " |
2941 | -@@ -11830,6 +11838,7 @@ |
2942 | +@@ -11942,6 +11950,7 @@ |
2943 | MYSQL_SYSVAR(commit_concurrency), |
2944 | MYSQL_SYSVAR(concurrency_tickets), |
2945 | MYSQL_SYSVAR(data_file_path), |
2946 | @@ -506,7 +506,7 @@ |
2947 | UNIV_INLINE |
2948 | --- a/storage/innobase/row/row0mysql.c |
2949 | +++ b/storage/innobase/row/row0mysql.c |
2950 | -@@ -3425,7 +3425,7 @@ |
2951 | +@@ -3436,7 +3436,7 @@ |
2952 | /* Do not drop possible .ibd tablespace if something went |
2953 | wrong: we do not want to delete valuable data of the user */ |
2954 | |
2955 | |
2956 | === modified file 'patches/innodb_show_lock_name.patch' |
2957 | --- patches/innodb_show_lock_name.patch 2011-09-21 09:20:58 +0000 |
2958 | +++ patches/innodb_show_lock_name.patch 2011-11-16 09:37:24 +0000 |
2959 | @@ -7,7 +7,7 @@ |
2960 | # should be done or reviewed by the maintainer! |
2961 | --- a/storage/innobase/handler/ha_innodb.cc |
2962 | +++ b/storage/innobase/handler/ha_innodb.cc |
2963 | -@@ -9594,9 +9594,8 @@ |
2964 | +@@ -9701,9 +9701,8 @@ |
2965 | rw_lock_wait_time += mutex->lspent_time; |
2966 | } |
2967 | #else /* UNIV_DEBUG */ |
2968 | @@ -19,7 +19,7 @@ |
2969 | buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu", |
2970 | (ulong) mutex->count_os_wait); |
2971 | |
2972 | -@@ -9611,10 +9610,8 @@ |
2973 | +@@ -9718,10 +9717,8 @@ |
2974 | |
2975 | if (block_mutex) { |
2976 | buf1len = (uint) my_snprintf(buf1, sizeof buf1, |
2977 | @@ -32,7 +32,7 @@ |
2978 | buf2len = (uint) my_snprintf(buf2, sizeof buf2, |
2979 | "os_waits=%lu", |
2980 | (ulong) block_mutex_oswait_count); |
2981 | -@@ -9643,9 +9640,8 @@ |
2982 | +@@ -9750,9 +9747,8 @@ |
2983 | continue; |
2984 | } |
2985 | |
2986 | @@ -44,7 +44,7 @@ |
2987 | buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu", |
2988 | (ulong) lock->count_os_wait); |
2989 | |
2990 | -@@ -9659,10 +9655,8 @@ |
2991 | +@@ -9766,10 +9762,8 @@ |
2992 | |
2993 | if (block_lock) { |
2994 | buf1len = (uint) my_snprintf(buf1, sizeof buf1, |
2995 | @@ -244,7 +244,7 @@ |
2996 | /******************************************************************//** |
2997 | NOTE! Please use the corresponding macro mutex_enter(), not directly |
2998 | this function! |
2999 | -@@ -733,9 +733,9 @@ |
3000 | +@@ -729,9 +729,9 @@ |
3001 | ulint line; /*!< Line where the mutex was locked */ |
3002 | ulint level; /*!< Level in the global latching order */ |
3003 | #endif /* UNIV_SYNC_DEBUG */ |
3004 | @@ -255,7 +255,7 @@ |
3005 | os_thread_id_t thread_id; /*!< The thread id of the thread |
3006 | which locked the mutex. */ |
3007 | ulint magic_n; /*!< MUTEX_MAGIC_N */ |
3008 | -@@ -750,9 +750,9 @@ |
3009 | +@@ -746,9 +746,9 @@ |
3010 | ulong count_os_yield; /*!< count of os_wait */ |
3011 | ulonglong lspent_time; /*!< mutex os_wait timer msec */ |
3012 | ulonglong lmax_spent_time;/*!< mutex os_wait timer msec */ |
3013 | @@ -268,7 +268,7 @@ |
3014 | instrumentation hook */ |
3015 | --- a/storage/innobase/include/sync0sync.ic |
3016 | +++ b/storage/innobase/include/sync0sync.ic |
3017 | -@@ -321,13 +321,13 @@ |
3018 | +@@ -320,13 +320,13 @@ |
3019 | mysql_pfs_key_t key, /*!< in: Performance Schema key */ |
3020 | mutex_t* mutex, /*!< in: pointer to memory */ |
3021 | # ifdef UNIV_DEBUG |
3022 | @@ -285,7 +285,7 @@ |
3023 | { |
3024 | mutex->pfs_psi = (PSI_server && PFS_IS_INSTRUMENTED(key)) |
3025 | ? PSI_server->init_mutex(key, mutex) |
3026 | -@@ -335,13 +335,13 @@ |
3027 | +@@ -334,13 +334,13 @@ |
3028 | |
3029 | mutex_create_func(mutex, |
3030 | # ifdef UNIV_DEBUG |
3031 | |
3032 | === modified file 'patches/innodb_show_status.patch' |
3033 | --- patches/innodb_show_status.patch 2011-09-21 09:20:58 +0000 |
3034 | +++ patches/innodb_show_status.patch 2011-11-16 09:37:24 +0000 |
3035 | @@ -7,7 +7,7 @@ |
3036 | # should be done or reviewed by the maintainer! |
3037 | --- a/storage/innobase/buf/buf0buf.c |
3038 | +++ b/storage/innobase/buf/buf0buf.c |
3039 | -@@ -4369,6 +4369,7 @@ |
3040 | +@@ -4426,6 +4426,7 @@ |
3041 | } |
3042 | |
3043 | total_info->pool_size += pool_info->pool_size; |
3044 | @@ -15,7 +15,7 @@ |
3045 | total_info->lru_len += pool_info->lru_len; |
3046 | total_info->old_lru_len += pool_info->old_lru_len; |
3047 | total_info->free_list_len += pool_info->free_list_len; |
3048 | -@@ -4434,6 +4435,8 @@ |
3049 | +@@ -4491,6 +4492,8 @@ |
3050 | |
3051 | pool_info->pool_size = buf_pool->curr_size; |
3052 | |
3053 | @@ -24,7 +24,7 @@ |
3054 | pool_info->lru_len = UT_LIST_GET_LEN(buf_pool->LRU); |
3055 | |
3056 | pool_info->old_lru_len = buf_pool->LRU_old_len; |
3057 | -@@ -4555,14 +4558,16 @@ |
3058 | +@@ -4612,14 +4615,16 @@ |
3059 | ut_ad(pool_info); |
3060 | |
3061 | fprintf(file, |
3062 | @@ -101,7 +101,7 @@ |
3063 | {"buffer_pool_pages_free", |
3064 | (char*) &export_vars.innodb_buffer_pool_pages_free, SHOW_LONG}, |
3065 | #ifdef UNIV_DEBUG |
3066 | -@@ -11087,6 +11089,16 @@ |
3067 | +@@ -11199,6 +11201,16 @@ |
3068 | "Force InnoDB to not use next-key locking, to use only row-level locking.", |
3069 | NULL, NULL, FALSE); |
3070 | |
3071 | @@ -118,7 +118,7 @@ |
3072 | #ifdef UNIV_LOG_ARCHIVE |
3073 | static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir, |
3074 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
3075 | -@@ -11274,7 +11286,7 @@ |
3076 | +@@ -11386,7 +11398,7 @@ |
3077 | |
3078 | static MYSQL_SYSVAR_STR(version, innodb_version_str, |
3079 | PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY, |
3080 | @@ -127,7 +127,7 @@ |
3081 | |
3082 | static MYSQL_SYSVAR_BOOL(use_sys_malloc, srv_use_sys_malloc, |
3083 | PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, |
3084 | -@@ -11373,6 +11385,8 @@ |
3085 | +@@ -11486,6 +11498,8 @@ |
3086 | MYSQL_SYSVAR(thread_concurrency), |
3087 | MYSQL_SYSVAR(thread_sleep_delay), |
3088 | MYSQL_SYSVAR(autoinc_lock_mode), |
3089 | @@ -178,9 +178,9 @@ |
3090 | Create a consistent cursor view for mysql to be used in cursors. In this |
3091 | --- a/storage/innobase/include/srv0srv.h |
3092 | +++ b/storage/innobase/include/srv0srv.h |
3093 | -@@ -142,6 +142,9 @@ |
3094 | - extern char srv_adaptive_flushing; |
3095 | - |
3096 | +@@ -146,6 +146,9 @@ |
3097 | + corrupted index and table */ |
3098 | + extern my_bool srv_load_corrupted; |
3099 | |
3100 | +extern ulint srv_show_locks_held; |
3101 | +extern ulint srv_show_verbose_locks; |
3102 | @@ -188,7 +188,7 @@ |
3103 | /* The sort order table of the MySQL latin1_swedish_ci character set |
3104 | collation */ |
3105 | extern const byte* srv_latin1_ordering; |
3106 | -@@ -324,6 +327,8 @@ |
3107 | +@@ -328,6 +331,8 @@ |
3108 | buffer pool to disk */ |
3109 | extern ulint srv_buf_pool_flushed; |
3110 | |
3111 | @@ -197,7 +197,7 @@ |
3112 | /** Number of buffer pool reads that led to the |
3113 | reading of a disk page */ |
3114 | extern ulint srv_buf_pool_reads; |
3115 | -@@ -703,6 +708,7 @@ |
3116 | +@@ -707,6 +712,7 @@ |
3117 | ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */ |
3118 | ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */ |
3119 | ulint innodb_buffer_pool_pages_flushed; /*!< srv_buf_pool_flushed */ |
3120 | |
3121 | === modified file 'patches/innodb_show_status_extend.patch' |
3122 | --- patches/innodb_show_status_extend.patch 2011-10-10 14:35:27 +0000 |
3123 | +++ patches/innodb_show_status_extend.patch 2011-11-16 09:37:24 +0000 |
3124 | @@ -240,7 +240,7 @@ |
3125 | /** The lock system */ |
3126 | --- a/storage/innobase/include/srv0srv.h |
3127 | +++ b/storage/innobase/include/srv0srv.h |
3128 | -@@ -735,6 +735,11 @@ |
3129 | +@@ -739,6 +739,11 @@ |
3130 | |
3131 | /** Status variables to be passed to MySQL */ |
3132 | struct export_var_struct{ |
3133 | @@ -252,7 +252,7 @@ |
3134 | ulint innodb_data_pending_reads; /*!< Pending reads */ |
3135 | ulint innodb_data_pending_writes; /*!< Pending writes */ |
3136 | ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */ |
3137 | -@@ -752,6 +757,9 @@ |
3138 | +@@ -756,6 +761,9 @@ |
3139 | #ifdef UNIV_DEBUG |
3140 | ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */ |
3141 | #endif /* UNIV_DEBUG */ |
3142 | @@ -262,7 +262,7 @@ |
3143 | ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */ |
3144 | ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */ |
3145 | ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */ |
3146 | -@@ -761,13 +769,43 @@ |
3147 | +@@ -765,13 +773,43 @@ |
3148 | ulint innodb_buffer_pool_read_ahead_rnd;/*!< srv_read_ahead_rnd */ |
3149 | ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */ |
3150 | ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/ |
3151 | @@ -306,7 +306,7 @@ |
3152 | ulint innodb_os_log_written; /*!< srv_os_log_written */ |
3153 | ulint innodb_os_log_fsyncs; /*!< fil_n_log_flushes */ |
3154 | ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */ |
3155 | -@@ -776,6 +814,8 @@ |
3156 | +@@ -780,6 +818,8 @@ |
3157 | ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */ |
3158 | ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read */ |
3159 | ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */ |
3160 | @@ -315,7 +315,7 @@ |
3161 | ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */ |
3162 | ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */ |
3163 | ib_int64_t innodb_row_lock_time; /*!< srv_n_lock_wait_time |
3164 | -@@ -785,11 +825,18 @@ |
3165 | +@@ -789,11 +829,18 @@ |
3166 | / srv_n_lock_wait_count */ |
3167 | ulint innodb_row_lock_time_max; /*!< srv_n_lock_max_wait_time |
3168 | / 1000 */ |
3169 | @@ -336,7 +336,7 @@ |
3170 | /** Thread slot in the thread table */ |
3171 | --- a/storage/innobase/include/sync0sync.h |
3172 | +++ b/storage/innobase/include/sync0sync.h |
3173 | -@@ -771,6 +771,10 @@ |
3174 | +@@ -767,6 +767,10 @@ |
3175 | |
3176 | #define SYNC_SPIN_ROUNDS srv_n_spin_wait_rounds |
3177 | |
3178 | |
3179 | === modified file 'patches/innodb_show_sys_tables.patch' |
3180 | --- patches/innodb_show_sys_tables.patch 2011-09-21 09:20:58 +0000 |
3181 | +++ patches/innodb_show_sys_tables.patch 2011-11-16 09:37:24 +0000 |
3182 | @@ -7,7 +7,7 @@ |
3183 | # should be done or reviewed by the maintainer! |
3184 | --- a/storage/innobase/dict/dict0load.c |
3185 | +++ b/storage/innobase/dict/dict0load.c |
3186 | -@@ -437,7 +437,7 @@ |
3187 | +@@ -442,7 +442,7 @@ |
3188 | |
3189 | } |
3190 | |
3191 | @@ -16,7 +16,7 @@ |
3192 | /********************************************************************//** |
3193 | This function parses a SYS_FOREIGN record and populate a dict_foreign_t |
3194 | structure with the information from the record. For detail information |
3195 | -@@ -513,9 +513,9 @@ |
3196 | +@@ -518,9 +518,9 @@ |
3197 | |
3198 | return(NULL); |
3199 | } |
3200 | @@ -28,7 +28,7 @@ |
3201 | /********************************************************************//** |
3202 | This function parses a SYS_FOREIGN_COLS record and extract necessary |
3203 | information from the record and return to caller. |
3204 | -@@ -579,7 +579,7 @@ |
3205 | +@@ -584,7 +584,7 @@ |
3206 | |
3207 | return(NULL); |
3208 | } |
3209 | @@ -39,7 +39,7 @@ |
3210 | Determine the flags of a table described in SYS_TABLES. |
3211 | --- a/storage/innobase/handler/ha_innodb.cc |
3212 | +++ b/storage/innobase/handler/ha_innodb.cc |
3213 | -@@ -11786,7 +11786,14 @@ |
3214 | +@@ -11899,7 +11899,14 @@ |
3215 | i_s_innodb_cmp, |
3216 | i_s_innodb_cmp_reset, |
3217 | i_s_innodb_cmpmem, |
3218 | |
3219 | === modified file 'patches/innodb_split_buf_pool_mutex.patch' |
3220 | --- patches/innodb_split_buf_pool_mutex.patch 2011-09-21 09:20:58 +0000 |
3221 | +++ patches/innodb_split_buf_pool_mutex.patch 2011-11-16 09:37:24 +0000 |
3222 | @@ -7,7 +7,7 @@ |
3223 | # should be done or reviewed by the maintainer! |
3224 | --- a/storage/innobase/btr/btr0cur.c |
3225 | +++ b/storage/innobase/btr/btr0cur.c |
3226 | -@@ -4142,7 +4142,8 @@ |
3227 | +@@ -4091,7 +4091,8 @@ |
3228 | |
3229 | mtr_commit(mtr); |
3230 | |
3231 | @@ -17,7 +17,7 @@ |
3232 | mutex_enter(&block->mutex); |
3233 | |
3234 | /* Only free the block if it is still allocated to |
3235 | -@@ -4153,16 +4154,21 @@ |
3236 | +@@ -4102,16 +4103,21 @@ |
3237 | && buf_block_get_space(block) == space |
3238 | && buf_block_get_page_no(block) == page_no) { |
3239 | |
3240 | @@ -45,7 +45,7 @@ |
3241 | |
3242 | --- a/storage/innobase/btr/btr0sea.c |
3243 | +++ b/storage/innobase/btr/btr0sea.c |
3244 | -@@ -1943,7 +1943,7 @@ |
3245 | +@@ -1944,7 +1944,7 @@ |
3246 | rec_offs_init(offsets_); |
3247 | |
3248 | rw_lock_x_lock(&btr_search_latch); |
3249 | @@ -54,7 +54,7 @@ |
3250 | |
3251 | cell_count = hash_get_n_cells(btr_search_sys->hash_index); |
3252 | |
3253 | -@@ -1951,11 +1951,11 @@ |
3254 | +@@ -1952,11 +1952,11 @@ |
3255 | /* We release btr_search_latch every once in a while to |
3256 | give other queries a chance to run. */ |
3257 | if ((i != 0) && ((i % chunk_size) == 0)) { |
3258 | @@ -68,7 +68,7 @@ |
3259 | } |
3260 | |
3261 | node = hash_get_nth_cell(btr_search_sys->hash_index, i)->node; |
3262 | -@@ -2066,11 +2066,11 @@ |
3263 | +@@ -2067,11 +2067,11 @@ |
3264 | /* We release btr_search_latch every once in a while to |
3265 | give other queries a chance to run. */ |
3266 | if (i != 0) { |
3267 | @@ -82,7 +82,7 @@ |
3268 | } |
3269 | |
3270 | if (!ha_validate(btr_search_sys->hash_index, i, end_index)) { |
3271 | -@@ -2078,7 +2078,7 @@ |
3272 | +@@ -2079,7 +2079,7 @@ |
3273 | } |
3274 | } |
3275 | |
3276 | @@ -283,7 +283,7 @@ |
3277 | { |
3278 | buf_page_t* bpage; |
3279 | const ulint size = BUF_BUDDY_LOW << i; |
3280 | -@@ -335,13 +362,20 @@ |
3281 | +@@ -334,13 +361,20 @@ |
3282 | ulint space; |
3283 | ulint page_no; |
3284 | |
3285 | @@ -305,7 +305,7 @@ |
3286 | /* We assume that all memory from buf_buddy_alloc() |
3287 | is used for compressed page frames. */ |
3288 | |
3289 | -@@ -375,6 +409,11 @@ |
3290 | +@@ -374,6 +408,11 @@ |
3291 | added to buf_pool->page_hash yet. Obviously, |
3292 | it cannot be relocated. */ |
3293 | |
3294 | @@ -317,7 +317,7 @@ |
3295 | return(FALSE); |
3296 | } |
3297 | |
3298 | -@@ -384,18 +423,27 @@ |
3299 | +@@ -383,18 +422,27 @@ |
3300 | For the sake of simplicity, give up. */ |
3301 | ut_ad(page_zip_get_size(&bpage->zip) < size); |
3302 | |
3303 | @@ -346,8 +346,8 @@ |
3304 | - if (buf_page_can_relocate(bpage)) { |
3305 | + if (mutex && buf_page_can_relocate(bpage)) { |
3306 | /* Relocate the compressed page. */ |
3307 | + ullint usec = ut_time_us(NULL); |
3308 | ut_a(bpage->zip.data == src); |
3309 | - memcpy(dst, src, size); |
3310 | @@ -409,10 +457,22 @@ |
3311 | buddy_stat->relocated_usec |
3312 | += ut_time_us(NULL) - usec; |
3313 | @@ -1249,10 +1249,10 @@ |
3314 | |
3315 | #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG |
3316 | ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); |
3317 | -@@ -3030,7 +3187,10 @@ |
3318 | +@@ -3031,7 +3188,10 @@ |
3319 | buf_page_t* hash_page; |
3320 | - buf_pool_t* buf_pool = buf_pool_get(space, offset); |
3321 | |
3322 | + ut_ad(buf_pool == buf_pool_get(space, offset)); |
3323 | - ut_ad(buf_pool_mutex_own(buf_pool)); |
3324 | + //ut_ad(buf_pool_mutex_own(buf_pool)); |
3325 | +#ifdef UNIV_SYNC_DEBUG |
3326 | @@ -1261,7 +1261,7 @@ |
3327 | ut_ad(mutex_own(&(block->mutex))); |
3328 | ut_a(buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE); |
3329 | |
3330 | -@@ -3059,11 +3219,14 @@ |
3331 | +@@ -3060,11 +3220,14 @@ |
3332 | if (UNIV_LIKELY(!hash_page)) { |
3333 | } else if (buf_pool_watch_is_sentinel(buf_pool, hash_page)) { |
3334 | /* Preserve the reference count. */ |
3335 | @@ -1277,7 +1277,7 @@ |
3336 | } else { |
3337 | fprintf(stderr, |
3338 | "InnoDB: Error: page %lu %lu already found" |
3339 | -@@ -3073,7 +3236,8 @@ |
3340 | +@@ -3074,7 +3237,8 @@ |
3341 | (const void*) hash_page, (const void*) block); |
3342 | #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG |
3343 | mutex_exit(&block->mutex); |
3344 | @@ -1287,7 +1287,7 @@ |
3345 | buf_print(); |
3346 | buf_LRU_print(); |
3347 | buf_validate(); |
3348 | -@@ -3156,7 +3320,9 @@ |
3349 | +@@ -3157,7 +3321,9 @@ |
3350 | |
3351 | fold = buf_page_address_fold(space, offset); |
3352 | |
3353 | @@ -1298,7 +1298,7 @@ |
3354 | |
3355 | watch_page = buf_page_hash_get_low(buf_pool, space, offset, fold); |
3356 | if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) { |
3357 | -@@ -3165,9 +3331,15 @@ |
3358 | +@@ -3166,9 +3332,15 @@ |
3359 | err_exit: |
3360 | if (block) { |
3361 | mutex_enter(&block->mutex); |
3362 | @@ -1315,16 +1315,16 @@ |
3363 | |
3364 | bpage = NULL; |
3365 | goto func_exit; |
3366 | -@@ -3190,6 +3362,8 @@ |
3367 | +@@ -3191,6 +3363,8 @@ |
3368 | |
3369 | - buf_page_init(space, offset, fold, block); |
3370 | + buf_page_init(buf_pool, space, offset, fold, block); |
3371 | |
3372 | + rw_lock_x_unlock(&buf_pool->page_hash_latch); |
3373 | + |
3374 | /* The block must be put to the LRU list, to the old blocks */ |
3375 | buf_LRU_add_block(bpage, TRUE/* to old blocks */); |
3376 | |
3377 | -@@ -3217,7 +3391,7 @@ |
3378 | +@@ -3218,7 +3392,7 @@ |
3379 | been added to buf_pool->LRU and |
3380 | buf_pool->page_hash. */ |
3381 | mutex_exit(&block->mutex); |
3382 | @@ -1333,7 +1333,7 @@ |
3383 | mutex_enter(&block->mutex); |
3384 | block->page.zip.data = data; |
3385 | |
3386 | -@@ -3230,13 +3404,14 @@ |
3387 | +@@ -3231,13 +3405,14 @@ |
3388 | buf_unzip_LRU_add_block(block, TRUE); |
3389 | } |
3390 | |
3391 | @@ -1349,7 +1349,7 @@ |
3392 | |
3393 | /* If buf_buddy_alloc() allocated storage from the LRU list, |
3394 | it released and reacquired buf_pool->mutex. Thus, we must |
3395 | -@@ -3252,7 +3427,10 @@ |
3396 | +@@ -3253,7 +3428,10 @@ |
3397 | |
3398 | /* The block was added by some other thread. */ |
3399 | watch_page = NULL; |
3400 | @@ -1361,7 +1361,7 @@ |
3401 | |
3402 | bpage = NULL; |
3403 | goto func_exit; |
3404 | -@@ -3300,20 +3478,26 @@ |
3405 | +@@ -3301,20 +3479,26 @@ |
3406 | HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold, |
3407 | bpage); |
3408 | |
3409 | @@ -1389,7 +1389,7 @@ |
3410 | |
3411 | if (mode == BUF_READ_IBUF_PAGES_ONLY) { |
3412 | |
3413 | -@@ -3355,7 +3539,9 @@ |
3414 | +@@ -3356,7 +3540,9 @@ |
3415 | |
3416 | fold = buf_page_address_fold(space, offset); |
3417 | |
3418 | @@ -1400,7 +1400,7 @@ |
3419 | |
3420 | block = (buf_block_t*) buf_page_hash_get_low( |
3421 | buf_pool, space, offset, fold); |
3422 | -@@ -3371,7 +3557,9 @@ |
3423 | +@@ -3372,7 +3558,9 @@ |
3424 | #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ |
3425 | |
3426 | /* Page can be found in buf_pool */ |
3427 | @@ -1411,15 +1411,15 @@ |
3428 | |
3429 | buf_block_free(free_block); |
3430 | |
3431 | -@@ -3393,6 +3581,7 @@ |
3432 | +@@ -3394,6 +3582,7 @@ |
3433 | mutex_enter(&block->mutex); |
3434 | |
3435 | - buf_page_init(space, offset, fold, block); |
3436 | + buf_page_init(buf_pool, space, offset, fold, block); |
3437 | + rw_lock_x_unlock(&buf_pool->page_hash_latch); |
3438 | |
3439 | /* The block must be put to the LRU list */ |
3440 | buf_LRU_add_block(&block->page, FALSE); |
3441 | -@@ -3419,7 +3608,7 @@ |
3442 | +@@ -3420,7 +3609,7 @@ |
3443 | the reacquisition of buf_pool->mutex. We also must |
3444 | defer this operation until after the block descriptor |
3445 | has been added to buf_pool->LRU and buf_pool->page_hash. */ |
3446 | @@ -1428,7 +1428,7 @@ |
3447 | mutex_enter(&block->mutex); |
3448 | block->page.zip.data = data; |
3449 | |
3450 | -@@ -3437,7 +3626,8 @@ |
3451 | +@@ -3438,7 +3627,8 @@ |
3452 | |
3453 | buf_page_set_accessed(&block->page, time_ms); |
3454 | |
3455 | @@ -1438,7 +1438,35 @@ |
3456 | |
3457 | mtr_memo_push(mtr, block, MTR_MEMO_BUF_FIX); |
3458 | |
3459 | -@@ -3488,6 +3678,8 @@ |
3460 | +@@ -3493,7 +3683,9 @@ |
3461 | + ibool ret = TRUE; |
3462 | + |
3463 | + /* First unfix and release lock on the bpage */ |
3464 | +- buf_pool_mutex_enter(buf_pool); |
3465 | ++ //buf_pool_mutex_enter(buf_pool); |
3466 | ++ mutex_enter(&buf_pool->LRU_list_mutex); |
3467 | ++ rw_lock_x_lock(&buf_pool->page_hash_latch); |
3468 | + mutex_enter(buf_page_get_mutex(bpage)); |
3469 | + ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_READ); |
3470 | + ut_ad(bpage->buf_fix_count == 0); |
3471 | +@@ -3514,11 +3706,15 @@ |
3472 | + ret = FALSE; |
3473 | + } |
3474 | + |
3475 | ++ buf_pool_mutex_enter(buf_pool); |
3476 | + ut_ad(buf_pool->n_pend_reads > 0); |
3477 | + buf_pool->n_pend_reads--; |
3478 | ++ buf_pool_mutex_exit(buf_pool); |
3479 | + |
3480 | + mutex_exit(buf_page_get_mutex(bpage)); |
3481 | +- buf_pool_mutex_exit(buf_pool); |
3482 | ++ //buf_pool_mutex_exit(buf_pool); |
3483 | ++ mutex_exit(&buf_pool->LRU_list_mutex); |
3484 | ++ rw_lock_x_unlock(&buf_pool->page_hash_latch); |
3485 | + |
3486 | + return(ret); |
3487 | + } |
3488 | +@@ -3536,6 +3732,8 @@ |
3489 | buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); |
3490 | const ibool uncompressed = (buf_page_get_state(bpage) |
3491 | == BUF_BLOCK_FILE_PAGE); |
3492 | @@ -1447,7 +1475,7 @@ |
3493 | |
3494 | ut_a(buf_page_in_file(bpage)); |
3495 | |
3496 | -@@ -3621,8 +3813,26 @@ |
3497 | +@@ -3678,8 +3876,26 @@ |
3498 | } |
3499 | } |
3500 | |
3501 | @@ -1475,7 +1503,7 @@ |
3502 | |
3503 | #ifdef UNIV_IBUF_COUNT_DEBUG |
3504 | if (io_type == BUF_IO_WRITE || uncompressed) { |
3505 | -@@ -3645,6 +3855,7 @@ |
3506 | +@@ -3702,6 +3918,7 @@ |
3507 | the x-latch to this OS thread: do not let this confuse you in |
3508 | debugging! */ |
3509 | |
3510 | @@ -1483,7 +1511,7 @@ |
3511 | ut_ad(buf_pool->n_pend_reads > 0); |
3512 | buf_pool->n_pend_reads--; |
3513 | buf_pool->stat.n_pages_read++; |
3514 | -@@ -3662,6 +3873,9 @@ |
3515 | +@@ -3719,6 +3936,9 @@ |
3516 | |
3517 | buf_flush_write_complete(bpage); |
3518 | |
3519 | @@ -1493,7 +1521,7 @@ |
3520 | if (uncompressed) { |
3521 | rw_lock_s_unlock_gen(&((buf_block_t*) bpage)->lock, |
3522 | BUF_IO_WRITE); |
3523 | -@@ -3684,8 +3898,8 @@ |
3524 | +@@ -3741,8 +3961,8 @@ |
3525 | } |
3526 | #endif /* UNIV_DEBUG */ |
3527 | |
3528 | @@ -1503,7 +1531,7 @@ |
3529 | } |
3530 | |
3531 | /*********************************************************************//** |
3532 | -@@ -3702,7 +3916,9 @@ |
3533 | +@@ -3759,7 +3979,9 @@ |
3534 | |
3535 | ut_ad(buf_pool); |
3536 | |
3537 | @@ -1514,7 +1542,7 @@ |
3538 | |
3539 | chunk = buf_pool->chunks; |
3540 | |
3541 | -@@ -3719,7 +3935,9 @@ |
3542 | +@@ -3776,7 +3998,9 @@ |
3543 | } |
3544 | } |
3545 | |
3546 | @@ -1525,7 +1553,7 @@ |
3547 | |
3548 | return(TRUE); |
3549 | } |
3550 | -@@ -3767,7 +3985,8 @@ |
3551 | +@@ -3824,7 +4048,8 @@ |
3552 | freed = buf_LRU_search_and_free_block(buf_pool, 100); |
3553 | } |
3554 | |
3555 | @@ -1535,7 +1563,7 @@ |
3556 | |
3557 | ut_ad(UT_LIST_GET_LEN(buf_pool->LRU) == 0); |
3558 | ut_ad(UT_LIST_GET_LEN(buf_pool->unzip_LRU) == 0); |
3559 | -@@ -3780,7 +3999,8 @@ |
3560 | +@@ -3837,7 +4062,8 @@ |
3561 | memset(&buf_pool->stat, 0x00, sizeof(buf_pool->stat)); |
3562 | buf_refresh_io_stats(buf_pool); |
3563 | |
3564 | @@ -1545,7 +1573,7 @@ |
3565 | } |
3566 | |
3567 | /*********************************************************************//** |
3568 | -@@ -3822,7 +4042,10 @@ |
3569 | +@@ -3879,7 +4105,10 @@ |
3570 | |
3571 | ut_ad(buf_pool); |
3572 | |
3573 | @@ -1557,7 +1585,7 @@ |
3574 | |
3575 | chunk = buf_pool->chunks; |
3576 | |
3577 | -@@ -3917,7 +4140,7 @@ |
3578 | +@@ -3974,7 +4203,7 @@ |
3579 | /* Check clean compressed-only blocks. */ |
3580 | |
3581 | for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b; |
3582 | @@ -1566,7 +1594,7 @@ |
3583 | ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE); |
3584 | switch (buf_page_get_io_fix(b)) { |
3585 | case BUF_IO_NONE: |
3586 | -@@ -3948,7 +4171,7 @@ |
3587 | +@@ -4005,7 +4234,7 @@ |
3588 | |
3589 | buf_flush_list_mutex_enter(buf_pool); |
3590 | for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b; |
3591 | @@ -1575,7 +1603,7 @@ |
3592 | ut_ad(b->in_flush_list); |
3593 | ut_a(b->oldest_modification); |
3594 | n_flush++; |
3595 | -@@ -4007,6 +4230,8 @@ |
3596 | +@@ -4064,6 +4293,8 @@ |
3597 | } |
3598 | |
3599 | ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == n_lru); |
3600 | @@ -1584,7 +1612,7 @@ |
3601 | if (UT_LIST_GET_LEN(buf_pool->free) != n_free) { |
3602 | fprintf(stderr, "Free list len %lu, free blocks %lu\n", |
3603 | (ulong) UT_LIST_GET_LEN(buf_pool->free), |
3604 | -@@ -4017,8 +4242,11 @@ |
3605 | +@@ -4074,8 +4305,11 @@ |
3606 | ut_a(buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE] == n_single_flush); |
3607 | ut_a(buf_pool->n_flush[BUF_FLUSH_LIST] == n_list_flush); |
3608 | ut_a(buf_pool->n_flush[BUF_FLUSH_LRU] == n_lru_flush); |
3609 | @@ -1597,7 +1625,7 @@ |
3610 | |
3611 | ut_a(buf_LRU_validate()); |
3612 | ut_a(buf_flush_validate(buf_pool)); |
3613 | -@@ -4074,7 +4302,9 @@ |
3614 | +@@ -4131,7 +4365,9 @@ |
3615 | index_ids = mem_alloc(size * sizeof *index_ids); |
3616 | counts = mem_alloc(sizeof(ulint) * size); |
3617 | |
3618 | @@ -1608,7 +1636,7 @@ |
3619 | buf_flush_list_mutex_enter(buf_pool); |
3620 | |
3621 | fprintf(stderr, |
3622 | -@@ -4143,7 +4373,9 @@ |
3623 | +@@ -4200,7 +4436,9 @@ |
3624 | } |
3625 | } |
3626 | |
3627 | @@ -1619,7 +1647,7 @@ |
3628 | |
3629 | for (i = 0; i < n_found; i++) { |
3630 | index = dict_index_get_if_in_cache(index_ids[i]); |
3631 | -@@ -4200,7 +4432,7 @@ |
3632 | +@@ -4257,7 +4495,7 @@ |
3633 | buf_chunk_t* chunk; |
3634 | ulint fixed_pages_number = 0; |
3635 | |
3636 | @@ -1628,7 +1656,7 @@ |
3637 | |
3638 | chunk = buf_pool->chunks; |
3639 | |
3640 | -@@ -4234,7 +4466,7 @@ |
3641 | +@@ -4291,7 +4529,7 @@ |
3642 | /* Traverse the lists of clean and dirty compressed-only blocks. */ |
3643 | |
3644 | for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b; |
3645 | @@ -1637,7 +1665,7 @@ |
3646 | ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE); |
3647 | ut_a(buf_page_get_io_fix(b) != BUF_IO_WRITE); |
3648 | |
3649 | -@@ -4246,7 +4478,7 @@ |
3650 | +@@ -4303,7 +4541,7 @@ |
3651 | |
3652 | buf_flush_list_mutex_enter(buf_pool); |
3653 | for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b; |
3654 | @@ -1646,7 +1674,7 @@ |
3655 | ut_ad(b->in_flush_list); |
3656 | |
3657 | switch (buf_page_get_state(b)) { |
3658 | -@@ -4272,7 +4504,7 @@ |
3659 | +@@ -4329,7 +4567,7 @@ |
3660 | |
3661 | buf_flush_list_mutex_exit(buf_pool); |
3662 | mutex_exit(&buf_pool->zip_mutex); |
3663 | @@ -1655,7 +1683,7 @@ |
3664 | |
3665 | return(fixed_pages_number); |
3666 | } |
3667 | -@@ -4430,6 +4662,8 @@ |
3668 | +@@ -4487,6 +4725,8 @@ |
3669 | /* Find appropriate pool_info to store stats for this buffer pool */ |
3670 | pool_info = &all_pool_info[pool_id]; |
3671 | |
3672 | @@ -1664,7 +1692,7 @@ |
3673 | buf_pool_mutex_enter(buf_pool); |
3674 | buf_flush_list_mutex_enter(buf_pool); |
3675 | |
3676 | -@@ -4545,6 +4779,8 @@ |
3677 | +@@ -4602,6 +4842,8 @@ |
3678 | pool_info->unzip_cur = buf_LRU_stat_cur.unzip; |
3679 | |
3680 | buf_refresh_io_stats(buf_pool); |
3681 | @@ -1673,7 +1701,7 @@ |
3682 | buf_pool_mutex_exit(buf_pool); |
3683 | } |
3684 | |
3685 | -@@ -4789,11 +5025,13 @@ |
3686 | +@@ -4846,11 +5088,13 @@ |
3687 | { |
3688 | ulint len; |
3689 | |
3690 | @@ -2953,8 +2981,17 @@ |
3691 | + buf_LRU_block_free_non_file_page(block, have_page_hash_mutex); |
3692 | } |
3693 | |
3694 | - /**********************************************************************//** |
3695 | -@@ -1909,7 +2063,8 @@ |
3696 | + /******************************************************************//** |
3697 | +@@ -1897,7 +2051,7 @@ |
3698 | + { |
3699 | + if (buf_LRU_block_remove_hashed_page(bpage, TRUE) |
3700 | + != BUF_BLOCK_ZIP_FREE) { |
3701 | +- buf_LRU_block_free_hashed_page((buf_block_t*) bpage); |
3702 | ++ buf_LRU_block_free_hashed_page((buf_block_t*) bpage, TRUE); |
3703 | + } |
3704 | + } |
3705 | + |
3706 | +@@ -1925,7 +2079,8 @@ |
3707 | } |
3708 | |
3709 | if (adjust) { |
3710 | @@ -2964,7 +3001,7 @@ |
3711 | |
3712 | if (ratio != buf_pool->LRU_old_ratio) { |
3713 | buf_pool->LRU_old_ratio = ratio; |
3714 | -@@ -1921,7 +2076,8 @@ |
3715 | +@@ -1937,7 +2092,8 @@ |
3716 | } |
3717 | } |
3718 | |
3719 | @@ -2974,7 +3011,7 @@ |
3720 | } else { |
3721 | buf_pool->LRU_old_ratio = ratio; |
3722 | } |
3723 | -@@ -2026,7 +2182,8 @@ |
3724 | +@@ -2042,7 +2198,8 @@ |
3725 | ulint new_len; |
3726 | |
3727 | ut_ad(buf_pool); |
3728 | @@ -2984,7 +3021,7 @@ |
3729 | |
3730 | if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) { |
3731 | |
3732 | -@@ -2087,16 +2244,22 @@ |
3733 | +@@ -2103,16 +2260,22 @@ |
3734 | |
3735 | ut_a(buf_pool->LRU_old_len == old_len); |
3736 | |
3737 | @@ -3009,7 +3046,7 @@ |
3738 | UT_LIST_VALIDATE(unzip_LRU, buf_block_t, buf_pool->unzip_LRU, |
3739 | ut_ad(ut_list_node_313->in_unzip_LRU_list |
3740 | && ut_list_node_313->page.in_LRU_list)); |
3741 | -@@ -2110,7 +2273,8 @@ |
3742 | +@@ -2126,7 +2289,8 @@ |
3743 | ut_a(buf_page_belongs_to_unzip_LRU(&block->page)); |
3744 | } |
3745 | |
3746 | @@ -3019,7 +3056,7 @@ |
3747 | } |
3748 | |
3749 | /**********************************************************************//** |
3750 | -@@ -2146,7 +2310,8 @@ |
3751 | +@@ -2162,7 +2326,8 @@ |
3752 | const buf_page_t* bpage; |
3753 | |
3754 | ut_ad(buf_pool); |
3755 | @@ -3029,7 +3066,7 @@ |
3756 | |
3757 | bpage = UT_LIST_GET_FIRST(buf_pool->LRU); |
3758 | |
3759 | -@@ -2203,7 +2368,8 @@ |
3760 | +@@ -2219,7 +2384,8 @@ |
3761 | bpage = UT_LIST_GET_NEXT(LRU, bpage); |
3762 | } |
3763 | |
3764 | @@ -3279,7 +3316,7 @@ |
3765 | Creates the buffer pool. |
3766 | @return own: buf_pool object, NULL if not enough memory or error */ |
3767 | UNIV_INTERN |
3768 | -@@ -889,6 +903,15 @@ |
3769 | +@@ -864,6 +878,15 @@ |
3770 | const buf_page_t* bpage) /*!< in: pointer to control block */ |
3771 | __attribute__((pure)); |
3772 | |
3773 | @@ -3295,7 +3332,7 @@ |
3774 | /*********************************************************************//** |
3775 | Get the flush type of a page. |
3776 | @return flush type */ |
3777 | -@@ -1370,7 +1393,7 @@ |
3778 | +@@ -1345,7 +1368,7 @@ |
3779 | All these are protected by buf_pool->mutex. */ |
3780 | /* @{ */ |
3781 | |
3782 | @@ -3304,7 +3341,7 @@ |
3783 | /*!< based on state, this is a |
3784 | list node, protected either by |
3785 | buf_pool->mutex or by |
3786 | -@@ -1398,6 +1421,10 @@ |
3787 | +@@ -1373,6 +1396,10 @@ |
3788 | BUF_BLOCK_REMOVE_HASH or |
3789 | BUF_BLOCK_READY_IN_USE. */ |
3790 | |
3791 | @@ -3315,7 +3352,7 @@ |
3792 | #ifdef UNIV_DEBUG |
3793 | ibool in_flush_list; /*!< TRUE if in buf_pool->flush_list; |
3794 | when buf_pool->flush_list_mutex is |
3795 | -@@ -1490,11 +1517,11 @@ |
3796 | +@@ -1465,11 +1492,11 @@ |
3797 | a block is in the unzip_LRU list |
3798 | if page.state == BUF_BLOCK_FILE_PAGE |
3799 | and page.zip.data != NULL */ |
3800 | @@ -3329,7 +3366,7 @@ |
3801 | mutex_t mutex; /*!< mutex protecting this block: |
3802 | state (also protected by the buffer |
3803 | pool mutex), io_fix, buf_fix_count, |
3804 | -@@ -1671,6 +1698,11 @@ |
3805 | +@@ -1646,6 +1673,11 @@ |
3806 | pool instance, protects compressed |
3807 | only pages (of type buf_page_t, not |
3808 | buf_block_t */ |
3809 | @@ -3341,7 +3378,7 @@ |
3810 | ulint instance_no; /*!< Array index of this buffer |
3811 | pool instance */ |
3812 | ulint old_pool_size; /*!< Old pool size in bytes */ |
3813 | -@@ -1824,8 +1856,8 @@ |
3814 | +@@ -1799,8 +1831,8 @@ |
3815 | /** Test if a buffer pool mutex is owned. */ |
3816 | #define buf_pool_mutex_own(b) mutex_own(&b->mutex) |
3817 | /** Acquire a buffer pool mutex. */ |
3818 | @@ -3529,7 +3566,7 @@ |
3819 | && (block->page.buf_fix_count == 0)) |
3820 | || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); |
3821 | #endif /* UNIV_SYNC_DEBUG */ |
3822 | -@@ -1013,7 +1044,11 @@ |
3823 | +@@ -1026,7 +1057,11 @@ |
3824 | buf_page_t* bpage; |
3825 | |
3826 | ut_ad(buf_pool); |
3827 | @@ -3542,7 +3579,7 @@ |
3828 | ut_ad(fold == buf_page_address_fold(space, offset)); |
3829 | |
3830 | /* Look for the page in the hash table */ |
3831 | -@@ -1098,11 +1133,13 @@ |
3832 | +@@ -1111,11 +1146,13 @@ |
3833 | const buf_page_t* bpage; |
3834 | buf_pool_t* buf_pool = buf_pool_get(space, offset); |
3835 | |
3836 | @@ -3558,7 +3595,7 @@ |
3837 | |
3838 | return(bpage != NULL); |
3839 | } |
3840 | -@@ -1230,4 +1267,38 @@ |
3841 | +@@ -1243,4 +1280,38 @@ |
3842 | buf_pool_mutex_exit(buf_pool); |
3843 | } |
3844 | } |
3845 | @@ -3643,7 +3680,7 @@ |
3846 | extern mysql_pfs_key_t cache_last_read_mutex_key; |
3847 | extern mysql_pfs_key_t dict_foreign_err_mutex_key; |
3848 | extern mysql_pfs_key_t dict_sys_mutex_key; |
3849 | -@@ -670,7 +674,7 @@ |
3850 | +@@ -667,7 +671,7 @@ |
3851 | #define SYNC_TRX_SYS_HEADER 290 |
3852 | #define SYNC_PURGE_QUEUE 200 |
3853 | #define SYNC_LOG 170 |
3854 | @@ -3652,7 +3689,7 @@ |
3855 | #define SYNC_RECV 168 |
3856 | #define SYNC_WORK_QUEUE 162 |
3857 | #define SYNC_SEARCH_SYS_CONF 161 /* for assigning btr_search_enabled */ |
3858 | -@@ -680,8 +684,13 @@ |
3859 | +@@ -677,8 +681,13 @@ |
3860 | SYNC_SEARCH_SYS, as memory allocation |
3861 | can call routines there! Otherwise |
3862 | the level is SYNC_MEM_HASH. */ |
3863 | @@ -3667,7 +3704,7 @@ |
3864 | #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */ |
3865 | #define SYNC_DOUBLEWRITE 140 |
3866 | #define SYNC_ANY_LATCH 135 |
3867 | -@@ -713,7 +722,7 @@ |
3868 | +@@ -709,7 +718,7 @@ |
3869 | os_fast_mutex; /*!< We use this OS mutex in place of lock_word |
3870 | when atomic operations are not enabled */ |
3871 | #endif |
3872 | @@ -3731,7 +3768,7 @@ |
3873 | } |
3874 | |
3875 | /******************************************************************//** |
3876 | -@@ -1239,7 +1249,12 @@ |
3877 | +@@ -1234,7 +1244,12 @@ |
3878 | ut_error; |
3879 | } |
3880 | break; |
3881 | @@ -3744,7 +3781,7 @@ |
3882 | case SYNC_BUF_POOL: |
3883 | /* We can have multiple mutexes of this type therefore we |
3884 | can only check whether the greater than condition holds. */ |
3885 | -@@ -1257,7 +1272,8 @@ |
3886 | +@@ -1252,7 +1267,8 @@ |
3887 | buffer block (block->mutex or buf_pool->zip_mutex). */ |
3888 | if (!sync_thread_levels_g(array, level, FALSE)) { |
3889 | ut_a(sync_thread_levels_g(array, level - 1, TRUE)); |
3890 | |
3891 | === modified file 'patches/innodb_stats.patch' |
3892 | --- patches/innodb_stats.patch 2011-09-21 09:20:58 +0000 |
3893 | +++ patches/innodb_stats.patch 2011-11-16 09:37:24 +0000 |
3894 | @@ -356,7 +356,7 @@ |
3895 | } |
3896 | |
3897 | return(table); |
3898 | -@@ -4343,6 +4343,295 @@ |
3899 | +@@ -4344,6 +4344,295 @@ |
3900 | } |
3901 | |
3902 | /*********************************************************************//** |
3903 | @@ -652,7 +652,7 @@ |
3904 | Calculates new estimates for table and index statistics. The statistics |
3905 | are used in query optimization. */ |
3906 | UNIV_INTERN |
3907 | -@@ -4350,10 +4639,11 @@ |
3908 | +@@ -4351,10 +4640,11 @@ |
3909 | dict_update_statistics( |
3910 | /*===================*/ |
3911 | dict_table_t* table, /*!< in/out: table */ |
3912 | @@ -665,7 +665,7 @@ |
3913 | { |
3914 | dict_index_t* index; |
3915 | ulint sum_of_index_sizes = 0; |
3916 | -@@ -4370,6 +4660,27 @@ |
3917 | +@@ -4371,6 +4661,27 @@ |
3918 | return; |
3919 | } |
3920 | |
3921 | @@ -693,7 +693,7 @@ |
3922 | /* Find out the sizes of the indexes and how many different values |
3923 | for the key they approximately have */ |
3924 | |
3925 | -@@ -4434,6 +4745,11 @@ |
3926 | +@@ -4435,6 +4746,11 @@ |
3927 | index = dict_table_get_next_index(index); |
3928 | } while (index); |
3929 | |
3930 | @@ -705,7 +705,7 @@ |
3931 | index = dict_table_get_first_index(table); |
3932 | |
3933 | table->stat_n_rows = index->stat_n_diff_key_vals[ |
3934 | -@@ -4451,6 +4767,78 @@ |
3935 | +@@ -4452,6 +4768,78 @@ |
3936 | dict_table_stats_unlock(table, RW_X_LATCH); |
3937 | } |
3938 | |
3939 | @@ -784,7 +784,7 @@ |
3940 | /**********************************************************************//** |
3941 | Prints info of a foreign key constraint. */ |
3942 | static |
3943 | -@@ -4528,7 +4916,8 @@ |
3944 | +@@ -4529,7 +4917,8 @@ |
3945 | |
3946 | ut_ad(mutex_own(&(dict_sys->mutex))); |
3947 | |
3948 | @@ -804,9 +804,9 @@ |
3949 | + "SYS_FOREIGN_COLS", |
3950 | + "SYS_STATS" |
3951 | }; |
3952 | - /****************************************************************//** |
3953 | - Compare the name of an index column. |
3954 | -@@ -343,12 +344,13 @@ |
3955 | + |
3956 | + /* If this flag is TRUE, then we will load the cluster index's (and tables') |
3957 | +@@ -348,12 +349,13 @@ |
3958 | } |
3959 | |
3960 | if ((status & DICT_TABLE_UPDATE_STATS) |
3961 | @@ -821,7 +821,7 @@ |
3962 | } |
3963 | |
3964 | return(NULL); |
3965 | -@@ -582,6 +584,75 @@ |
3966 | +@@ -587,6 +589,75 @@ |
3967 | //#endif /* FOREIGN_NOT_USED */ |
3968 | |
3969 | /********************************************************************//** |
3970 | @@ -907,7 +907,7 @@ |
3971 | |
3972 | |
3973 | static char* internal_innobase_data_file_path = NULL; |
3974 | -@@ -2441,6 +2442,8 @@ |
3975 | +@@ -2468,6 +2469,8 @@ |
3976 | goto error; |
3977 | } |
3978 | |
3979 | @@ -916,7 +916,7 @@ |
3980 | /* -------------- Log files ---------------------------*/ |
3981 | |
3982 | /* The default dir for log files is the datadir of MySQL */ |
3983 | -@@ -5230,6 +5233,10 @@ |
3984 | +@@ -5257,6 +5260,10 @@ |
3985 | |
3986 | error = row_insert_for_mysql((byte*) record, prebuilt); |
3987 | |
3988 | @@ -927,7 +927,7 @@ |
3989 | /* Handle duplicate key errors */ |
3990 | if (auto_inc_used) { |
3991 | ulint err; |
3992 | -@@ -5566,6 +5573,10 @@ |
3993 | +@@ -5593,6 +5600,10 @@ |
3994 | } |
3995 | } |
3996 | |
3997 | @@ -938,7 +938,7 @@ |
3998 | innodb_srv_conc_exit_innodb(trx); |
3999 | |
4000 | error = convert_error_code_to_mysql(error, |
4001 | -@@ -5619,6 +5630,10 @@ |
4002 | +@@ -5646,6 +5657,10 @@ |
4003 | |
4004 | error = row_update_for_mysql((byte*) record, prebuilt); |
4005 | |
4006 | @@ -949,7 +949,7 @@ |
4007 | innodb_srv_conc_exit_innodb(trx); |
4008 | |
4009 | error = convert_error_code_to_mysql( |
4010 | -@@ -5937,6 +5952,11 @@ |
4011 | +@@ -5966,6 +5981,11 @@ |
4012 | case DB_SUCCESS: |
4013 | error = 0; |
4014 | table->status = 0; |
4015 | @@ -961,7 +961,7 @@ |
4016 | break; |
4017 | case DB_RECORD_NOT_FOUND: |
4018 | error = HA_ERR_KEY_NOT_FOUND; |
4019 | -@@ -6146,6 +6166,11 @@ |
4020 | +@@ -6198,6 +6218,11 @@ |
4021 | case DB_SUCCESS: |
4022 | error = 0; |
4023 | table->status = 0; |
4024 | @@ -973,7 +973,7 @@ |
4025 | break; |
4026 | case DB_RECORD_NOT_FOUND: |
4027 | error = HA_ERR_END_OF_FILE; |
4028 | -@@ -8088,11 +8113,35 @@ |
4029 | +@@ -8144,11 +8169,35 @@ |
4030 | /* In sql_show we call with this flag: update |
4031 | then statistics so that they are up-to-date */ |
4032 | |
4033 | @@ -1010,7 +1010,7 @@ |
4034 | |
4035 | prebuilt->trx->op_info = "returning various info to MySQL"; |
4036 | } |
4037 | -@@ -8177,7 +8226,7 @@ |
4038 | +@@ -8233,7 +8282,7 @@ |
4039 | are asked by MySQL to avoid locking. Another reason to |
4040 | avoid the call is that it uses quite a lot of CPU. |
4041 | See Bug#38185. */ |
4042 | @@ -1019,7 +1019,7 @@ |
4043 | || !(flag & HA_STATUS_VARIABLE_EXTRA)) { |
4044 | /* We do not update delete_length if no |
4045 | locking is requested so the "old" value can |
4046 | -@@ -11391,6 +11440,26 @@ |
4047 | +@@ -11503,6 +11552,26 @@ |
4048 | "The number of index pages to sample when calculating statistics (default 8)", |
4049 | NULL, NULL, 8, 1, ~0ULL, 0); |
4050 | |
4051 | @@ -1046,7 +1046,7 @@ |
4052 | static MYSQL_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled, |
4053 | PLUGIN_VAR_OPCMDARG, |
4054 | "Enable InnoDB adaptive hash index (enabled by default). " |
4055 | -@@ -11722,6 +11791,9 @@ |
4056 | +@@ -11835,6 +11904,9 @@ |
4057 | MYSQL_SYSVAR(recovery_update_relay_log), |
4058 | MYSQL_SYSVAR(rollback_on_timeout), |
4059 | MYSQL_SYSVAR(stats_on_metadata), |
4060 | @@ -1056,7 +1056,7 @@ |
4061 | MYSQL_SYSVAR(stats_sample_pages), |
4062 | MYSQL_SYSVAR(adaptive_hash_index), |
4063 | MYSQL_SYSVAR(stats_method), |
4064 | -@@ -11793,7 +11865,10 @@ |
4065 | +@@ -11906,7 +11978,10 @@ |
4066 | i_s_innodb_sys_columns, |
4067 | i_s_innodb_sys_fields, |
4068 | i_s_innodb_sys_foreign, |
4069 | @@ -1682,8 +1682,8 @@ |
4070 | +#define DICT_HDR_XTRADB_MARK 256 /* Flag to distinguish expansion of XtraDB */ |
4071 | /*-------------------------------------------------------------*/ |
4072 | |
4073 | - /* The field number of the page number field in the sys_indexes table |
4074 | -@@ -144,11 +148,16 @@ |
4075 | + /* The field numbers in the SYS_TABLES clustered index */ |
4076 | +@@ -146,11 +150,16 @@ |
4077 | #define DICT_SYS_INDEXES_TYPE_FIELD 6 |
4078 | #define DICT_SYS_INDEXES_NAME_FIELD 4 |
4079 | |
4080 | @@ -1757,7 +1757,7 @@ |
4081 | #include "dict0crea.ic" |
4082 | --- a/storage/innobase/include/dict0dict.h |
4083 | +++ b/storage/innobase/include/dict0dict.h |
4084 | -@@ -1109,10 +1109,18 @@ |
4085 | +@@ -1126,10 +1126,18 @@ |
4086 | dict_update_statistics( |
4087 | /*===================*/ |
4088 | dict_table_t* table, /*!< in/out: table */ |
4089 | @@ -1777,7 +1777,7 @@ |
4090 | /********************************************************************//** |
4091 | Reserves the dictionary system mutex for MySQL. */ |
4092 | UNIV_INTERN |
4093 | -@@ -1227,6 +1235,7 @@ |
4094 | +@@ -1244,6 +1252,7 @@ |
4095 | dict_table_t* sys_columns; /*!< SYS_COLUMNS table */ |
4096 | dict_table_t* sys_indexes; /*!< SYS_INDEXES table */ |
4097 | dict_table_t* sys_fields; /*!< SYS_FIELDS table */ |
4098 | @@ -1854,7 +1854,7 @@ |
4099 | should be called after the indexes for a table have been created. |
4100 | --- a/storage/innobase/include/srv0srv.h |
4101 | +++ b/storage/innobase/include/srv0srv.h |
4102 | -@@ -212,6 +212,9 @@ |
4103 | +@@ -216,6 +216,9 @@ |
4104 | extern ibool srv_innodb_status; |
4105 | |
4106 | extern unsigned long long srv_stats_sample_pages; |
4107 | @@ -1908,7 +1908,7 @@ |
4108 | } else { |
4109 | --- a/storage/innobase/row/row0ins.c |
4110 | +++ b/storage/innobase/row/row0ins.c |
4111 | -@@ -2013,6 +2013,8 @@ |
4112 | +@@ -2015,6 +2015,8 @@ |
4113 | } |
4114 | |
4115 | #ifdef UNIV_DEBUG |
4116 | @@ -1930,7 +1930,7 @@ |
4117 | /* Drop the index definition and the B-tree. */ |
4118 | --- a/storage/innobase/row/row0mysql.c |
4119 | +++ b/storage/innobase/row/row0mysql.c |
4120 | -@@ -921,6 +921,9 @@ |
4121 | +@@ -922,6 +922,9 @@ |
4122 | |
4123 | table->stat_modified_counter = counter + 1; |
4124 | |
4125 | @@ -1940,7 +1940,7 @@ |
4126 | /* Calculate new statistics if 1 / 16 of table has been modified |
4127 | since the last time a statistics batch was run, or if |
4128 | stat_modified_counter > 2 000 000 000 (to avoid wrap-around). |
4129 | -@@ -931,7 +934,7 @@ |
4130 | +@@ -932,7 +935,7 @@ |
4131 | || ((ib_int64_t)counter > 16 + table->stat_n_rows / 16)) { |
4132 | |
4133 | dict_update_statistics(table, FALSE /* update even if stats |
4134 | @@ -1949,7 +1949,7 @@ |
4135 | } |
4136 | } |
4137 | |
4138 | -@@ -2076,6 +2079,71 @@ |
4139 | +@@ -2077,6 +2080,71 @@ |
4140 | } |
4141 | |
4142 | /*********************************************************************//** |
4143 | @@ -2021,7 +2021,7 @@ |
4144 | Scans a table create SQL string and adds to the data dictionary |
4145 | the foreign key constraints declared in the string. This function |
4146 | should be called after the indexes for a table have been created. |
4147 | -@@ -3000,7 +3068,7 @@ |
4148 | +@@ -3001,7 +3069,7 @@ |
4149 | dict_table_autoinc_initialize(table, 1); |
4150 | dict_table_autoinc_unlock(table); |
4151 | dict_update_statistics(table, FALSE /* update even if stats are |
4152 | @@ -2030,7 +2030,7 @@ |
4153 | |
4154 | trx_commit_for_mysql(trx); |
4155 | |
4156 | -@@ -3302,6 +3370,8 @@ |
4157 | +@@ -3312,6 +3380,8 @@ |
4158 | " IF (SQL % NOTFOUND) THEN\n" |
4159 | " found := 0;\n" |
4160 | " ELSE\n" |
4161 | @@ -2041,7 +2041,7 @@ |
4162 | " DELETE FROM SYS_INDEXES\n" |
4163 | --- a/storage/innobase/row/row0row.c |
4164 | +++ b/storage/innobase/row/row0row.c |
4165 | -@@ -373,6 +373,14 @@ |
4166 | +@@ -364,6 +364,14 @@ |
4167 | |
4168 | rec_len = rec_offs_n_fields(offsets); |
4169 | |
4170 | @@ -2056,7 +2056,7 @@ |
4171 | entry = dtuple_create(heap, rec_len); |
4172 | |
4173 | dtuple_set_n_fields_cmp(entry, |
4174 | -@@ -384,6 +392,14 @@ |
4175 | +@@ -375,6 +383,14 @@ |
4176 | for (i = 0; i < rec_len; i++) { |
4177 | |
4178 | dfield = dtuple_get_nth_field(entry, i); |
4179 | @@ -2119,12 +2119,12 @@ |
4180 | UNIV_INTERN ibool srv_use_checksums = TRUE; |
4181 | --- a/storage/innobase/trx/trx0rec.c |
4182 | +++ b/storage/innobase/trx/trx0rec.c |
4183 | -@@ -669,15 +669,27 @@ |
4184 | +@@ -669,14 +669,27 @@ |
4185 | /* Save to the undo log the old values of the columns to be updated. */ |
4186 | |
4187 | if (update) { |
4188 | + ulint extended = 0; |
4189 | - |
4190 | ++ |
4191 | if (trx_undo_left(undo_page, ptr) < 5) { |
4192 | |
4193 | return(0); |
4194 | @@ -2135,8 +2135,7 @@ |
4195 | + && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes)) { |
4196 | + for (i = 0; i < upd_get_n_fields(update); i++) { |
4197 | + ulint pos = upd_get_nth_field(update, i)->field_no; |
4198 | - |
4199 | -- for (i = 0; i < upd_get_n_fields(update); i++) { |
4200 | ++ |
4201 | + if (pos >= rec_offs_n_fields(offsets)) { |
4202 | + extended++; |
4203 | + } |
4204 | @@ -2144,7 +2143,8 @@ |
4205 | + } |
4206 | + |
4207 | + ptr += mach_write_compressed(ptr, upd_get_n_fields(update) - extended); |
4208 | -+ |
4209 | + |
4210 | +- for (i = 0; i < upd_get_n_fields(update); i++) { |
4211 | + for (i = 0; i < upd_get_n_fields(update) - extended; i++) { |
4212 | |
4213 | ulint pos = upd_get_nth_field(update, i)->field_no; |
4214 | |
4215 | === modified file 'patches/innodb_thread_concurrency_timer_based.patch' |
4216 | --- patches/innodb_thread_concurrency_timer_based.patch 2011-09-21 09:20:58 +0000 |
4217 | +++ patches/innodb_thread_concurrency_timer_based.patch 2011-11-16 09:37:24 +0000 |
4218 | @@ -15,7 +15,7 @@ |
4219 | static long long innobase_buffer_pool_size, innobase_log_file_size; |
4220 | |
4221 | /** Percentage of the buffer pool to reserve for 'old' blocks. |
4222 | -@@ -2550,6 +2551,9 @@ |
4223 | +@@ -2577,6 +2578,9 @@ |
4224 | srv_n_log_files = (ulint) innobase_log_files_in_group; |
4225 | srv_log_file_size = (ulint) innobase_log_file_size; |
4226 | |
4227 | @@ -25,7 +25,7 @@ |
4228 | #ifdef UNIV_LOG_ARCHIVE |
4229 | srv_log_archive_on = (ulint) innobase_log_archive; |
4230 | #endif /* UNIV_LOG_ARCHIVE */ |
4231 | -@@ -11481,6 +11485,12 @@ |
4232 | +@@ -11593,6 +11597,12 @@ |
4233 | "Maximum delay between polling for a spin lock (6 by default)", |
4234 | NULL, NULL, 6L, 0L, ~0L, 0); |
4235 | |
4236 | @@ -38,7 +38,7 @@ |
4237 | static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency, |
4238 | PLUGIN_VAR_RQCMDARG, |
4239 | "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.", |
4240 | -@@ -11698,6 +11708,7 @@ |
4241 | +@@ -11811,6 +11821,7 @@ |
4242 | MYSQL_SYSVAR(spin_wait_delay), |
4243 | MYSQL_SYSVAR(table_locks), |
4244 | MYSQL_SYSVAR(thread_concurrency), |
4245 | @@ -48,7 +48,7 @@ |
4246 | MYSQL_SYSVAR(show_verbose_locks), |
4247 | --- a/storage/innobase/include/srv0srv.h |
4248 | +++ b/storage/innobase/include/srv0srv.h |
4249 | -@@ -161,6 +161,8 @@ |
4250 | +@@ -165,6 +165,8 @@ |
4251 | extern ulint srv_mem_pool_size; |
4252 | extern ulint srv_lock_table_size; |
4253 | |
4254 | |
4255 | === modified file 'patches/memory_dynamic_rows.patch' |
4256 | --- patches/memory_dynamic_rows.patch 2011-09-03 15:15:31 +0000 |
4257 | +++ patches/memory_dynamic_rows.patch 2011-11-16 09:37:24 +0000 |
4258 | @@ -19,7 +19,7 @@ |
4259 | |
4260 | #define HP_MAX_LEVELS 4 /* 128^5 records is enough */ |
4261 | #define HP_PTRS_IN_NOD 128 |
4262 | -@@ -130,22 +140,58 @@ |
4263 | +@@ -131,22 +141,58 @@ |
4264 | uint (*get_key_length)(struct st_hp_keydef *keydef, const uchar *key); |
4265 | } HP_KEYDEF; |
4266 | |
4267 | @@ -83,9 +83,9 @@ |
4268 | uint open_count; |
4269 | - uchar *del_link; /* Link to next block with del. rec */ |
4270 | char * name; /* Name of "memory-file" */ |
4271 | + time_t create_time; |
4272 | THR_LOCK lock; |
4273 | - mysql_mutex_t intern_lock; /* Locking for use with _locking */ |
4274 | -@@ -154,6 +200,7 @@ |
4275 | +@@ -156,6 +202,7 @@ |
4276 | uint auto_key; |
4277 | uint auto_key_type; /* real type of the auto key segment */ |
4278 | ulonglong auto_increment; |
4279 | @@ -93,7 +93,7 @@ |
4280 | } HP_SHARE; |
4281 | |
4282 | struct st_hp_hash_info; |
4283 | -@@ -163,7 +210,7 @@ |
4284 | +@@ -165,7 +212,7 @@ |
4285 | HP_SHARE *s; |
4286 | uchar *current_ptr; |
4287 | struct st_hp_hash_info *current_hash_ptr; |
4288 | @@ -102,7 +102,7 @@ |
4289 | int lastinx,errkey; |
4290 | int mode; /* Mode of file (READONLY..) */ |
4291 | uint opt_flag,update; |
4292 | -@@ -176,6 +223,9 @@ |
4293 | +@@ -178,6 +225,9 @@ |
4294 | my_bool implicit_emptied; |
4295 | THR_LOCK_DATA lock; |
4296 | LIST open_list; |
4297 | @@ -112,7 +112,7 @@ |
4298 | } HP_INFO; |
4299 | |
4300 | |
4301 | -@@ -197,6 +247,14 @@ |
4302 | +@@ -199,6 +249,14 @@ |
4303 | open_count to 1. Is only looked at if not internal_table. |
4304 | */ |
4305 | my_bool pin_share; |
4306 | @@ -127,7 +127,7 @@ |
4307 | } HP_CREATE_INFO; |
4308 | |
4309 | /* Prototypes for heap-functions */ |
4310 | -@@ -213,9 +271,8 @@ |
4311 | +@@ -215,9 +273,8 @@ |
4312 | extern int heap_scan(register HP_INFO *info, uchar *record); |
4313 | extern int heap_delete(HP_INFO *info,const uchar *buff); |
4314 | extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag); |
4315 | @@ -318,7 +318,7 @@ |
4316 | } |
4317 | } |
4318 | |
4319 | -@@ -428,6 +435,13 @@ |
4320 | +@@ -429,6 +436,13 @@ |
4321 | return 0; |
4322 | } |
4323 | |
4324 | @@ -332,7 +332,7 @@ |
4325 | |
4326 | int ha_heap::extra(enum ha_extra_function operation) |
4327 | { |
4328 | -@@ -645,23 +659,70 @@ |
4329 | +@@ -646,23 +660,70 @@ |
4330 | heap_prepare_hp_create_info(TABLE *table_arg, bool internal_table, |
4331 | HP_CREATE_INFO *hp_create_info) |
4332 | { |
4333 | @@ -405,7 +405,7 @@ |
4334 | seg= reinterpret_cast<HA_KEYSEG*>(keydef + keys); |
4335 | for (key= 0; key < keys; key++) |
4336 | { |
4337 | -@@ -677,11 +738,11 @@ |
4338 | +@@ -678,11 +739,11 @@ |
4339 | case HA_KEY_ALG_UNDEF: |
4340 | case HA_KEY_ALG_HASH: |
4341 | keydef[key].algorithm= HA_KEY_ALG_HASH; |
4342 | @@ -419,7 +419,7 @@ |
4343 | break; |
4344 | default: |
4345 | DBUG_ASSERT(0); // cannot happen |
4346 | -@@ -706,6 +767,16 @@ |
4347 | +@@ -707,6 +768,16 @@ |
4348 | seg->length= (uint) key_part->length; |
4349 | seg->flag= key_part->key_part_flag; |
4350 | |
4351 | @@ -436,7 +436,7 @@ |
4352 | if (field->flags & (ENUM_FLAG | SET_FLAG)) |
4353 | seg->charset= &my_charset_bin; |
4354 | else |
4355 | -@@ -731,9 +802,75 @@ |
4356 | +@@ -732,9 +803,75 @@ |
4357 | auto_key= key+ 1; |
4358 | auto_key_type= field->key_type(); |
4359 | } |
4360 | @@ -513,7 +513,7 @@ |
4361 | if (table_arg->found_next_number_field) |
4362 | { |
4363 | keydef[share->next_number_index].flag|= HA_AUTO_KEY; |
4364 | -@@ -744,16 +881,19 @@ |
4365 | +@@ -745,16 +882,19 @@ |
4366 | hp_create_info->max_table_size=current_thd->variables.max_heap_table_size; |
4367 | hp_create_info->with_auto_increment= found_real_auto_increment; |
4368 | hp_create_info->internal_table= internal_table; |
4369 | @@ -539,7 +539,7 @@ |
4370 | return 0; |
4371 | } |
4372 | |
4373 | -@@ -773,6 +913,7 @@ |
4374 | +@@ -774,6 +914,7 @@ |
4375 | create_info->auto_increment_value - 1 : 0); |
4376 | error= heap_create(name, &hp_create_info, &internal_share, &created); |
4377 | my_free(hp_create_info.keydef); |
4378 | @@ -547,7 +547,7 @@ |
4379 | DBUG_ASSERT(file == 0); |
4380 | return (error); |
4381 | } |
4382 | -@@ -783,6 +924,13 @@ |
4383 | +@@ -784,6 +925,13 @@ |
4384 | table->file->info(HA_STATUS_AUTO); |
4385 | if (!(create_info->used_fields & HA_CREATE_USED_AUTO)) |
4386 | create_info->auto_increment_value= stats.auto_increment_value; |
4387 | @@ -964,7 +964,7 @@ |
4388 | /* Fix keys */ |
4389 | memcpy(share->keydef, keydef, (size_t) (sizeof(keydef[0]) * keys)); |
4390 | for (i= 0, keyinfo= share->keydef; i < keys; i++, keyinfo++) |
4391 | -@@ -177,15 +310,35 @@ |
4392 | +@@ -177,16 +310,36 @@ |
4393 | share->min_records= min_records; |
4394 | share->max_records= max_records; |
4395 | share->max_table_size= create_info->max_table_size; |
4396 | @@ -979,6 +979,7 @@ |
4397 | share->auto_key= create_info->auto_key; |
4398 | share->auto_key_type= create_info->auto_key_type; |
4399 | share->auto_increment= create_info->auto_increment; |
4400 | + share->create_time= (long) time((time_t*) 0); |
4401 | + |
4402 | + share->fixed_data_length= fixed_data_length; |
4403 | + share->fixed_column_count= fixed_column_count; |
4404 | @@ -1002,7 +1003,7 @@ |
4405 | /* Must be allocated separately for rename to work */ |
4406 | if (!(share->name= my_strdup(name,MYF(0)))) |
4407 | { |
4408 | -@@ -227,7 +380,7 @@ |
4409 | +@@ -228,7 +381,7 @@ |
4410 | param->search_flag, not_used); |
4411 | } |
4412 | |
4413 | @@ -1011,7 +1012,7 @@ |
4414 | ulong max_records) |
4415 | { |
4416 | uint i,recbuffer,records_in_block; |
4417 | -@@ -235,7 +388,12 @@ |
4418 | +@@ -236,7 +389,12 @@ |
4419 | max_records= max(min_records,max_records); |
4420 | if (!max_records) |
4421 | max_records= 1000; /* As good as quess as anything */ |
4422 | @@ -3944,7 +3945,7 @@ |
4423 | +PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4424 | +SHOW TABLE STATUS LIKE 't1'; |
4425 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4426 | -+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4427 | ++t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4428 | +DROP TABLE t1; |
4429 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4430 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4431 | @@ -3955,25 +3956,25 @@ |
4432 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4433 | +SHOW TABLE STATUS LIKE 't1'; |
4434 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4435 | -+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=34 |
4436 | ++t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=34 |
4437 | +DROP TABLE t1; |
4438 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4439 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=123 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4440 | +SHOW TABLE STATUS LIKE 't1'; |
4441 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4442 | -+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=123 |
4443 | ++t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=123 |
4444 | +DROP TABLE t1; |
4445 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4446 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4447 | +SHOW TABLE STATUS LIKE 't1'; |
4448 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4449 | -+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=1000 |
4450 | ++t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=1000 |
4451 | +DROP TABLE t1; |
4452 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4453 | +PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4454 | +SHOW TABLE STATUS LIKE 't1'; |
4455 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4456 | -+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4457 | ++t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4458 | +DROP TABLE t1; |
4459 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4460 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4461 | @@ -3984,19 +3985,19 @@ |
4462 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4463 | +SHOW TABLE STATUS LIKE 't1'; |
4464 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4465 | -+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=34 |
4466 | ++t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=34 |
4467 | +DROP TABLE t1; |
4468 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4469 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=121 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4470 | +SHOW TABLE STATUS LIKE 't1'; |
4471 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4472 | -+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=121 |
4473 | ++t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=121 |
4474 | +DROP TABLE t1; |
4475 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4476 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4477 | +SHOW TABLE STATUS LIKE 't1'; |
4478 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4479 | -+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=1000 |
4480 | ++t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=1000 |
4481 | +DROP TABLE t1; |
4482 | --- /dev/null |
4483 | +++ b/mysql-test/r/percona_heap_bug784464_32bit.result |
4484 | @@ -4005,13 +4006,13 @@ |
4485 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4486 | +SHOW TABLE STATUS LIKE 't1'; |
4487 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4488 | -+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=124 |
4489 | ++t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=124 |
4490 | +DROP TABLE t1; |
4491 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4492 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4493 | +SHOW TABLE STATUS LIKE 't1'; |
4494 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4495 | -+t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=122 |
4496 | ++t1 MEMORY 10 Dynamic 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=122 |
4497 | +DROP TABLE t1; |
4498 | --- /dev/null |
4499 | +++ b/mysql-test/r/percona_heap_bug784464_64bit.result |
4500 | @@ -4020,13 +4021,13 @@ |
4501 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4502 | +SHOW TABLE STATUS LIKE 't1'; |
4503 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4504 | -+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=124 |
4505 | ++t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=124 |
4506 | +DROP TABLE t1; |
4507 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4508 | +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4509 | +SHOW TABLE STATUS LIKE 't1'; |
4510 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4511 | -+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=122 |
4512 | ++t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC KEY_BLOCK_SIZE=122 |
4513 | +DROP TABLE t1; |
4514 | --- /dev/null |
4515 | +++ b/mysql-test/r/percona_heap_bug784468.result |
4516 | @@ -4034,17 +4035,17 @@ |
4517 | +CREATE TABLE t1 ( f1 VARCHAR(30)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4518 | +SHOW TABLE STATUS LIKE 't1'; |
4519 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4520 | -+t1 MEMORY 10 Fixed 0 32 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4521 | ++t1 MEMORY 10 Fixed 0 32 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4522 | +DROP TABLE t1; |
4523 | +CREATE TABLE t1 ( f1 VARCHAR(31)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4524 | +SHOW TABLE STATUS LIKE 't1'; |
4525 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4526 | -+t1 MEMORY 10 Fixed 0 33 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4527 | ++t1 MEMORY 10 Fixed 0 33 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4528 | +DROP TABLE t1; |
4529 | +CREATE TABLE t1 ( f1 VARCHAR(32)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4530 | +SHOW TABLE STATUS LIKE 't1'; |
4531 | +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment |
4532 | -+t1 MEMORY 10 Fixed 0 34 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4533 | ++t1 MEMORY 10 Fixed 0 34 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC |
4534 | +DROP TABLE t1; |
4535 | --- /dev/null |
4536 | +++ b/mysql-test/r/percona_heap_bug788544.result |
4537 | @@ -4996,7 +4997,7 @@ |
4538 | +DROP TABLE local_1_1; |
4539 | --- /dev/null |
4540 | +++ b/mysql-test/t/percona_heap_bug784464.test |
4541 | -@@ -0,0 +1,64 @@ |
4542 | +@@ -0,0 +1,66 @@ |
4543 | +# |
4544 | +# Bug #784464: Silent conversion from Dynamic to Fixed row_format for certain |
4545 | +# values of key_block_size. |
4546 | @@ -5005,59 +5006,61 @@ |
4547 | + |
4548 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4549 | + PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4550 | -+--replace_column 6 X 8 X |
4551 | ++--replace_column 6 X 8 X 12 X 13 X |
4552 | +SHOW TABLE STATUS LIKE 't1'; |
4553 | +DROP TABLE t1; |
4554 | + |
4555 | +--error ER_CANT_USE_OPTION_HERE |
4556 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4557 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4558 | ++--replace_column 12 X 13 X |
4559 | +SHOW TABLE STATUS LIKE 't1'; |
4560 | + |
4561 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4562 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4563 | -+--replace_column 6 X 8 X |
4564 | ++--replace_column 6 X 8 X 12 X 13 X |
4565 | +SHOW TABLE STATUS LIKE 't1'; |
4566 | +DROP TABLE t1; |
4567 | + |
4568 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4569 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=123 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4570 | -+--replace_column 6 X 8 X |
4571 | ++--replace_column 6 X 8 X 12 X 13 X |
4572 | +SHOW TABLE STATUS LIKE 't1'; |
4573 | +DROP TABLE t1; |
4574 | + |
4575 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4576 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4577 | -+--replace_column 6 X 8 X |
4578 | ++--replace_column 6 X 8 X 12 X 13 X |
4579 | +SHOW TABLE STATUS LIKE 't1'; |
4580 | +DROP TABLE t1; |
4581 | + |
4582 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4583 | + PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4584 | -+--replace_column 6 X 8 X |
4585 | ++--replace_column 6 X 8 X 12 X 13 X |
4586 | +SHOW TABLE STATUS LIKE 't1'; |
4587 | +DROP TABLE t1; |
4588 | + |
4589 | +--error ER_CANT_USE_OPTION_HERE |
4590 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4591 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4592 | ++--replace_column 12 X 13 X |
4593 | +SHOW TABLE STATUS LIKE 't1'; |
4594 | + |
4595 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4596 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4597 | -+--replace_column 6 X 8 X |
4598 | ++--replace_column 6 X 8 X 12 X 13 X |
4599 | +SHOW TABLE STATUS LIKE 't1'; |
4600 | +DROP TABLE t1; |
4601 | + |
4602 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4603 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=121 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4604 | -+--replace_column 6 X 8 X |
4605 | ++--replace_column 6 X 8 X 12 X 13 X |
4606 | +SHOW TABLE STATUS LIKE 't1'; |
4607 | +DROP TABLE t1; |
4608 | + |
4609 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4610 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4611 | -+--replace_column 6 X 8 X |
4612 | ++--replace_column 6 X 8 X 12 X 13 X |
4613 | +SHOW TABLE STATUS LIKE 't1'; |
4614 | +DROP TABLE t1; |
4615 | + |
4616 | @@ -5070,13 +5073,13 @@ |
4617 | + |
4618 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4619 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4620 | -+--replace_column 6 X 8 X |
4621 | ++--replace_column 6 X 8 X 12 X 13 X |
4622 | +SHOW TABLE STATUS LIKE 't1'; |
4623 | +DROP TABLE t1; |
4624 | + |
4625 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4626 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4627 | -+--replace_column 6 X 8 X |
4628 | ++--replace_column 6 X 8 X 12 X 13 X |
4629 | +SHOW TABLE STATUS LIKE 't1'; |
4630 | +DROP TABLE t1; |
4631 | --- /dev/null |
4632 | @@ -5088,13 +5091,13 @@ |
4633 | + |
4634 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32), |
4635 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4636 | -+--replace_column 6 X 8 X |
4637 | ++--replace_column 6 X 8 X 12 X 13 X |
4638 | +SHOW TABLE STATUS LIKE 't1'; |
4639 | +DROP TABLE t1; |
4640 | + |
4641 | +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96), |
4642 | + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4643 | -+--replace_column 6 X 8 X |
4644 | ++--replace_column 6 X 8 X 12 X 13 X |
4645 | +SHOW TABLE STATUS LIKE 't1'; |
4646 | +DROP TABLE t1; |
4647 | --- /dev/null |
4648 | @@ -5105,17 +5108,17 @@ |
4649 | +# |
4650 | + |
4651 | +CREATE TABLE t1 ( f1 VARCHAR(30)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4652 | -+--replace_column 8 X |
4653 | ++--replace_column 8 X 12 X 13 X |
4654 | +SHOW TABLE STATUS LIKE 't1'; |
4655 | +DROP TABLE t1; |
4656 | + |
4657 | +CREATE TABLE t1 ( f1 VARCHAR(31)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4658 | -+--replace_column 8 X |
4659 | ++--replace_column 8 X 12 X 13 X |
4660 | +SHOW TABLE STATUS LIKE 't1'; |
4661 | +DROP TABLE t1; |
4662 | + |
4663 | +CREATE TABLE t1 ( f1 VARCHAR(32)) ENGINE=HEAP ROW_FORMAT=DYNAMIC; |
4664 | -+--replace_column 8 X |
4665 | ++--replace_column 8 X 12 X 13 X |
4666 | +SHOW TABLE STATUS LIKE 't1'; |
4667 | +DROP TABLE t1; |
4668 | + |
4669 | |
4670 | === modified file 'patches/mysql-test.diff' |
4671 | --- patches/mysql-test.diff 2011-10-10 14:35:27 +0000 |
4672 | +++ patches/mysql-test.diff 2011-11-16 09:37:24 +0000 |
4673 | @@ -1004,31 +1004,6 @@ |
4674 | +++ b/mysql-test/suite/sys_vars/t/optimizer_fix_basic.test |
4675 | @@ -0,0 +1 @@ |
4676 | +SELECT @@global.optimizer_fix; |
4677 | ---- a/mysql-test/suite/sys_vars/t/plugin_dir_basic.test |
4678 | -+++ b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test |
4679 | -@@ -6,17 +6,17 @@ |
4680 | - # on windows it's <basedir>/lib/plugin |
4681 | - # on unix it's <basedir>/lib/mysql/plugin |
4682 | - # |
4683 | ----replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / |
4684 | -+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR MYSQL_LIBDIR64 MYSQL_LIBDIR /mysql/ / |
4685 | - select @@global.plugin_dir; |
4686 | - --error ER_INCORRECT_GLOBAL_LOCAL_VAR |
4687 | - select @@session.plugin_dir; |
4688 | ----replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / |
4689 | -+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR MYSQL_LIBDIR64 MYSQL_LIBDIR /mysql/ / |
4690 | - show global variables like 'plugin_dir'; |
4691 | ----replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / |
4692 | -+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR MYSQL_LIBDIR64 MYSQL_LIBDIR /mysql/ / |
4693 | - show session variables like 'plugin_dir'; |
4694 | ----replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / |
4695 | -+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR MYSQL_LIBDIR64 MYSQL_LIBDIR /mysql/ / |
4696 | - select * from information_schema.global_variables where variable_name='plugin_dir'; |
4697 | ----replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / |
4698 | -+--replace_result $MYSQL_LIBDIR MYSQL_LIBDIR MYSQL_LIBDIR64 MYSQL_LIBDIR /mysql/ / |
4699 | - select * from information_schema.session_variables where variable_name='plugin_dir'; |
4700 | - |
4701 | - # |
4702 | --- /dev/null |
4703 | +++ b/mysql-test/suite/sys_vars/t/query_cache_strip_comments_basic.test |
4704 | @@ -0,0 +1 @@ |
4705 | @@ -1085,7 +1060,7 @@ |
4706 | drop table t2; |
4707 | --- a/mysql-test/suite/sys_vars/r/all_vars.result |
4708 | +++ b/mysql-test/suite/sys_vars/r/all_vars.result |
4709 | -@@ -1,16 +1,20 @@ |
4710 | +@@ -1,15 +1,19 @@ |
4711 | create table t1 (test_name text); |
4712 | create table t2 (variable_name text); |
4713 | load data infile "MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1; |
4714 | @@ -1106,9 +1081,8 @@ |
4715 | +INNODB_FAKE_CHANGES |
4716 | +INNODB_KILL_IDLE_TRANSACTION |
4717 | +INNODB_KILL_IDLE_TRANSACTION |
4718 | - INNODB_LARGE_PREFIX |
4719 | - INNODB_LARGE_PREFIX |
4720 | drop table t1; |
4721 | + drop table t2; |
4722 | --- /dev/null |
4723 | +++ b/mysql-test/include/percona_server_variables.inc |
4724 | @@ -0,0 +1,3 @@ |
4725 | @@ -1117,7 +1091,7 @@ |
4726 | +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; |
4727 | --- /dev/null |
4728 | +++ b/mysql-test/r/percona_server_variables_debug.result |
4729 | -@@ -0,0 +1,379 @@ |
4730 | +@@ -0,0 +1,380 @@ |
4731 | +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; |
4732 | +Variable_name |
4733 | +AUTOCOMMIT |
4734 | @@ -1232,6 +1206,7 @@ |
4735 | +INNODB_FLUSH_LOG_AT_TRX_COMMIT |
4736 | +INNODB_FLUSH_METHOD |
4737 | +INNODB_FLUSH_NEIGHBOR_PAGES |
4738 | ++INNODB_FORCE_LOAD_CORRUPTED |
4739 | +INNODB_FORCE_RECOVERY |
4740 | +INNODB_IBUF_ACCEL_RATE |
4741 | +INNODB_IBUF_ACTIVE_CONTRACT |
4742 | @@ -1499,7 +1474,7 @@ |
4743 | +WARNING_COUNT |
4744 | --- /dev/null |
4745 | +++ b/mysql-test/r/percona_server_variables_release.result |
4746 | -@@ -0,0 +1,375 @@ |
4747 | +@@ -0,0 +1,376 @@ |
4748 | +SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; |
4749 | +Variable_name |
4750 | +AUTOCOMMIT |
4751 | @@ -1611,6 +1586,7 @@ |
4752 | +INNODB_FLUSH_LOG_AT_TRX_COMMIT |
4753 | +INNODB_FLUSH_METHOD |
4754 | +INNODB_FLUSH_NEIGHBOR_PAGES |
4755 | ++INNODB_FORCE_LOAD_CORRUPTED |
4756 | +INNODB_FORCE_RECOVERY |
4757 | +INNODB_IBUF_ACCEL_RATE |
4758 | +INNODB_IBUF_ACTIVE_CONTRACT |
4759 | |
4760 | === modified file 'patches/percona_support.patch' |
4761 | --- patches/percona_support.patch 2011-08-09 20:52:20 +0000 |
4762 | +++ patches/percona_support.patch 2011-11-16 09:37:24 +0000 |
4763 | @@ -7,7 +7,7 @@ |
4764 | # should be done or reviewed by the maintainer! |
4765 | --- a/scripts/mysql_install_db.sh |
4766 | +++ b/scripts/mysql_install_db.sh |
4767 | -@@ -476,6 +476,9 @@ |
4768 | +@@ -481,6 +481,9 @@ |
4769 | echo |
4770 | echo "Please report any problems with the $scriptdir/mysqlbug script!" |
4771 | echo |
4772 | |
4773 | === modified file 'patches/response_time_distribution.patch' |
4774 | --- patches/response_time_distribution.patch 2011-10-07 21:14:32 +0000 |
4775 | +++ patches/response_time_distribution.patch 2011-11-16 09:37:24 +0000 |
4776 | @@ -3501,7 +3501,7 @@ |
4777 | %token QUICK |
4778 | %token RANGE_SYM /* SQL-2003-R */ |
4779 | %token READS_SYM /* SQL-2003-R */ |
4780 | -@@ -11095,6 +11096,15 @@ |
4781 | +@@ -11099,6 +11100,15 @@ |
4782 | { |
4783 | Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; |
4784 | } |
4785 | @@ -3517,7 +3517,7 @@ |
4786 | | CREATE PROCEDURE_SYM sp_name |
4787 | { |
4788 | LEX *lex= Lex; |
4789 | -@@ -11334,6 +11344,12 @@ |
4790 | +@@ -11338,6 +11348,12 @@ |
4791 | Lex->type|= REFRESH_SLAVE; |
4792 | Lex->reset_slave_info.all= false; |
4793 | } |
4794 | @@ -3530,7 +3530,7 @@ |
4795 | | MASTER_SYM |
4796 | { Lex->type|= REFRESH_MASTER; } |
4797 | | DES_KEY_FILE |
4798 | -@@ -12641,6 +12657,7 @@ |
4799 | +@@ -12645,6 +12661,7 @@ |
4800 | | PROXY_SYM {} |
4801 | | QUARTER_SYM {} |
4802 | | QUERY_SYM {} |
4803 | |
4804 | === modified file 'patches/show_slave_status_nolock.patch' |
4805 | --- patches/show_slave_status_nolock.patch 2011-10-03 01:19:24 +0000 |
4806 | +++ patches/show_slave_status_nolock.patch 2011-11-16 09:37:24 +0000 |
4807 | @@ -105,7 +105,7 @@ |
4808 | %token STDDEV_SAMP_SYM /* SQL-2003-N */ |
4809 | %token STD_SYM |
4810 | %token STOP_SYM |
4811 | -@@ -11101,6 +11102,11 @@ |
4812 | +@@ -11105,6 +11106,11 @@ |
4813 | { |
4814 | Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; |
4815 | } |
4816 | |
4817 | === modified file 'patches/show_temp.patch' |
4818 | --- patches/show_temp.patch 2011-09-21 09:20:58 +0000 |
4819 | +++ patches/show_temp.patch 2011-11-16 09:37:24 +0000 |
4820 | @@ -88,7 +88,7 @@ |
4821 | case SQLCOM_SHOW_TRIGGERS: |
4822 | case SQLCOM_SHOW_TABLE_STATUS: |
4823 | case SQLCOM_SHOW_OPEN_TABLES: |
4824 | -@@ -4846,6 +4852,8 @@ |
4825 | +@@ -4852,6 +4858,8 @@ |
4826 | |
4827 | case SCH_TABLE_NAMES: |
4828 | case SCH_TABLES: |
4829 | @@ -387,7 +387,7 @@ |
4830 | OPEN_TRIGGER_ONLY|OPTIMIZE_I_S_TABLE}, |
4831 | --- a/sql/sql_yacc.yy |
4832 | +++ b/sql/sql_yacc.yy |
4833 | -@@ -10888,6 +10888,15 @@ |
4834 | +@@ -10892,6 +10892,15 @@ |
4835 | if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES)) |
4836 | MYSQL_YYABORT; |
4837 | } |
4838 | |
4839 | === modified file 'patches/slow_extended.patch' |
4840 | --- patches/slow_extended.patch 2011-10-10 14:35:27 +0000 |
4841 | +++ patches/slow_extended.patch 2011-11-16 09:37:24 +0000 |
4842 | @@ -135,7 +135,7 @@ |
4843 | /* |
4844 | --- a/sql/filesort.cc |
4845 | +++ b/sql/filesort.cc |
4846 | -@@ -195,6 +195,7 @@ |
4847 | +@@ -193,6 +193,7 @@ |
4848 | { |
4849 | status_var_increment(thd->status_var.filesort_scan_count); |
4850 | } |
4851 | @@ -143,15 +143,15 @@ |
4852 | #ifdef CAN_TRUST_RANGE |
4853 | if (select && select->quick && select->quick->records > 0L) |
4854 | { |
4855 | -@@ -260,6 +261,7 @@ |
4856 | - } |
4857 | - else |
4858 | - { |
4859 | +@@ -261,6 +262,7 @@ |
4860 | + /* filesort cannot handle zero-length records during merge. */ |
4861 | + DBUG_ASSERT(param.sort_length != 0); |
4862 | + |
4863 | + thd->query_plan_flags|= QPLAN_FILESORT_DISK; |
4864 | if (table_sort.buffpek && table_sort.buffpek_len < maxbuffer) |
4865 | { |
4866 | my_free(table_sort.buffpek); |
4867 | -@@ -1219,6 +1221,7 @@ |
4868 | +@@ -1209,6 +1211,7 @@ |
4869 | DBUG_ENTER("merge_buffers"); |
4870 | |
4871 | status_var_increment(current_thd->status_var.filesort_merge_passes); |
4872 | @@ -852,7 +852,7 @@ |
4873 | /* |
4874 | Reset warning count for each query that uses tables |
4875 | A better approach would be to reset this for any commands |
4876 | -@@ -5297,6 +5390,21 @@ |
4877 | +@@ -5303,6 +5396,21 @@ |
4878 | thd->rand_used= 0; |
4879 | thd->sent_row_count= thd->examined_row_count= 0; |
4880 | |
4881 | |
4882 | === modified file 'patches/sql_no_fcache.patch' |
4883 | --- patches/sql_no_fcache.patch 2011-10-07 21:14:32 +0000 |
4884 | +++ patches/sql_no_fcache.patch 2011-11-16 09:37:24 +0000 |
4885 | @@ -378,7 +378,7 @@ |
4886 | %token SQL_SMALL_RESULT |
4887 | %token SQL_SYM /* SQL-2003-R */ |
4888 | %token SQL_THREAD |
4889 | -@@ -7353,6 +7354,10 @@ |
4890 | +@@ -7357,6 +7358,10 @@ |
4891 | Lex->select_lex.sql_cache= SELECT_LEX::SQL_NO_CACHE; |
4892 | } |
4893 | } |
4894 | |
4895 | === modified file 'patches/subunit.patch' |
4896 | --- patches/subunit.patch 2011-10-07 21:14:32 +0000 |
4897 | +++ patches/subunit.patch 2011-11-16 09:37:24 +0000 |
4898 | @@ -189,7 +189,7 @@ |
4899 | |
4900 | require "lib/mtr_process.pl"; |
4901 | require "lib/mtr_io.pl"; |
4902 | -@@ -624,6 +625,7 @@ |
4903 | +@@ -629,6 +630,7 @@ |
4904 | |
4905 | # Report test status |
4906 | mtr_report_test($result); |
4907 | |
4908 | === modified file 'patches/userstat.patch' |
4909 | --- patches/userstat.patch 2011-10-10 14:35:27 +0000 |
4910 | +++ patches/userstat.patch 2011-11-16 09:37:24 +0000 |
4911 | @@ -61,7 +61,7 @@ |
4912 | +Rename variable USERSTAT_RUNNING => USERSTAT |
4913 | --- a/sql/handler.cc |
4914 | +++ b/sql/handler.cc |
4915 | -@@ -1244,6 +1244,8 @@ |
4916 | +@@ -1245,6 +1245,8 @@ |
4917 | goto end; |
4918 | } |
4919 | DBUG_EXECUTE_IF("crash_commit_after", DBUG_SUICIDE();); |
4920 | @@ -70,7 +70,7 @@ |
4921 | RUN_HOOK(transaction, after_commit, (thd, FALSE)); |
4922 | end: |
4923 | if (rw_trans && mdl_request.ticket) |
4924 | -@@ -1398,6 +1400,8 @@ |
4925 | +@@ -1399,6 +1401,8 @@ |
4926 | /* Always cleanup. Even if nht==0. There may be savepoints. */ |
4927 | if (is_real_trans) |
4928 | thd->transaction.cleanup(); |
4929 | @@ -79,7 +79,7 @@ |
4930 | if (all) |
4931 | thd->transaction_rollback_request= FALSE; |
4932 | |
4933 | -@@ -1802,6 +1806,7 @@ |
4934 | +@@ -1803,6 +1807,7 @@ |
4935 | ha_info->reset(); /* keep it conveniently zero-filled */ |
4936 | } |
4937 | trans->ha_list= sv->ha_list; |
4938 | @@ -87,7 +87,7 @@ |
4939 | DBUG_RETURN(error); |
4940 | } |
4941 | |
4942 | -@@ -2178,6 +2183,8 @@ |
4943 | +@@ -2179,6 +2184,8 @@ |
4944 | dup_ref=ref+ALIGN_SIZE(ref_length); |
4945 | cached_table_flags= table_flags(); |
4946 | } |
4947 | @@ -96,7 +96,7 @@ |
4948 | DBUG_RETURN(error); |
4949 | } |
4950 | |
4951 | -@@ -3631,6 +3638,127 @@ |
4952 | +@@ -3638,6 +3645,127 @@ |
4953 | return; |
4954 | } |
4955 | |
4956 | @@ -1818,7 +1818,7 @@ |
4957 | my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER"); |
4958 | DBUG_RETURN(TRUE); |
4959 | } |
4960 | -@@ -4821,6 +4842,7 @@ |
4961 | +@@ -4827,6 +4848,7 @@ |
4962 | case ACL_INTERNAL_ACCESS_DENIED: |
4963 | if (! no_errors) |
4964 | { |
4965 | @@ -1826,7 +1826,7 @@ |
4966 | my_error(ER_DBACCESS_DENIED_ERROR, MYF(0), |
4967 | sctx->priv_user, sctx->priv_host, db); |
4968 | } |
4969 | -@@ -4871,6 +4893,7 @@ |
4970 | +@@ -4877,6 +4899,7 @@ |
4971 | DBUG_PRINT("error",("No possible access")); |
4972 | if (!no_errors) |
4973 | { |
4974 | @@ -1834,7 +1834,7 @@ |
4975 | if (thd->password == 2) |
4976 | my_error(ER_ACCESS_DENIED_NO_PASSWORD_ERROR, MYF(0), |
4977 | sctx->priv_user, |
4978 | -@@ -4987,6 +5010,7 @@ |
4979 | +@@ -4993,6 +5016,7 @@ |
4980 | |
4981 | if (!thd->col_access && check_grant_db(thd, dst_db_name)) |
4982 | { |
4983 | @@ -1842,7 +1842,7 @@ |
4984 | my_error(ER_DBACCESS_DENIED_ERROR, MYF(0), |
4985 | thd->security_ctx->priv_user, |
4986 | thd->security_ctx->priv_host, |
4987 | -@@ -5257,6 +5281,7 @@ |
4988 | +@@ -5263,6 +5287,7 @@ |
4989 | if ((thd->security_ctx->master_access & want_access)) |
4990 | return 0; |
4991 | get_privilege_desc(command, sizeof(command), want_access); |
4992 | @@ -1850,7 +1850,7 @@ |
4993 | my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command); |
4994 | return 1; |
4995 | #else |
4996 | -@@ -5638,6 +5663,32 @@ |
4997 | +@@ -5644,6 +5669,32 @@ |
4998 | lex_start(thd); |
4999 | mysql_reset_thd_for_next_command(thd); |
5000 |
Includes patch that has not passed review and does not have any testing (modification to flush neighbors), so cannot merge as-is.