Merge lp:~tsarev/percona-server/5.5.17-porting into lp:percona-server/5.5

Proposed by Oleg Tsarev
Status: Superseded
Proposed branch: lp:~tsarev/percona-server/5.5.17-porting
Merge into: lp:percona-server/5.5
Diff against target: 5464 lines (+864/-714)
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 (+13/-13)
patches/innodb_fix_misc.patch (+22/-22)
patches/innodb_io_patches.patch (+197/-20)
patches/innodb_kill_idle_transaction.patch (+5/-5)
patches/innodb_lru_dump_restore.patch (+8/-8)
patches/innodb_opt_lru_count.patch (+10/-10)
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 (+134/-97)
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 (+7/-31)
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
Reviewer Review Type Date Requested Status
Stewart Smith (community) Needs Fixing
Review via email: mp+80995@code.launchpad.net

This proposal has been superseded by a proposal from 2011-11-14.

Description of the change

Porting to 5.5.17
Failes in Jenkins not related to my changes (Jenkins slave failures & Sporadic failures on slaves related to limited resources of virtual machines).
http://jenkins.percona.com/view/Percona%20Server%205.5/job/percona-server-5.5-param/176/

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) wrote :

Includes patch that has not passed review and does not have any testing (modification to flush neighbors), so cannot merge as-is.

review: Needs Fixing
Revision history for this message
Oleg Tsarev (tsarev) wrote :

So, looks like this is Yasufumi changes.
Need reassign to him.

Revision history for this message
Stewart Smith (stewart) wrote :

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

Revision history for this message
Stewart Smith (stewart) wrote :

(setting to Work In Progress) as we need clean port.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2011-10-11 06:44:44 +0000
3+++ Makefile 2011-11-02 10:38:52 +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-02 10:38:52 +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+@@ -12230,6 +12235,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-02 10:38:52 +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+@@ -12016,7 +12016,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-02 10:38:52 +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+@@ -12313,6 +12313,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-02 10:38:52 +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+@@ -12187,6 +12205,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-02 10:38:52 +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-02 10:38:52 +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+@@ -11791,6 +11793,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+@@ -11860,6 +11867,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-02 10:38:52 +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-02 10:38:52 +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+@@ -11798,6 +11806,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+@@ -11872,6 +11885,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-02 10:38:52 +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-02 10:38:52 +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+@@ -11681,6 +11681,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-02 10:38:52 +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+@@ -12446,6 +12490,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-02 10:38:52 +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+@@ -12090,6 +12101,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-02 10:38:52 +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+@@ -12096,6 +12168,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@@ -412,7 +412,7 @@
1558 dest_offset = nth_file * group->file_size;
1559
1560 #ifdef UNIV_DEBUG
1561-@@ -1794,9 +1799,7 @@
1562+@@ -1796,9 +1801,7 @@
1563 ulint i;
1564
1565 ut_ad(mutex_own(&(log_sys->mutex)));
1566@@ -423,7 +423,7 @@
1567
1568 buf = group->checkpoint_buf;
1569
1570-@@ -1810,6 +1813,7 @@
1571+@@ -1812,6 +1815,7 @@
1572 mach_write_to_4(buf + LOG_CHECKPOINT_LOG_BUF_SIZE, log_sys->buf_size);
1573
1574 #ifdef UNIV_LOG_ARCHIVE
1575@@ -431,7 +431,7 @@
1576 if (log_sys->archiving_state == LOG_ARCH_OFF) {
1577 archived_lsn = IB_ULONGLONG_MAX;
1578 } else {
1579-@@ -1823,7 +1827,9 @@
1580+@@ -1825,7 +1829,9 @@
1581
1582 mach_write_to_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN, archived_lsn);
1583 #else /* UNIV_LOG_ARCHIVE */
1584
1585=== modified file 'patches/innodb_fix_misc.patch'
1586--- patches/innodb_fix_misc.patch 2011-10-10 14:35:27 +0000
1587+++ patches/innodb_fix_misc.patch 2011-11-02 10:38:52 +0000
1588@@ -68,7 +68,7 @@
1589 block_mutex = buf_page_get_mutex_enter((buf_page_t*)block);
1590 ut_a(block_mutex);
1591 }
1592-@@ -3471,11 +3513,28 @@
1593+@@ -3472,11 +3514,28 @@
1594
1595 fold = buf_page_address_fold(space, offset);
1596
1597@@ -97,7 +97,7 @@
1598 if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) {
1599 /* The page is already in the buffer pool. */
1600 watch_page = NULL;
1601-@@ -3606,6 +3665,7 @@
1602+@@ -3607,6 +3666,7 @@
1603 bpage->state = BUF_BLOCK_ZIP_PAGE;
1604 bpage->space = space;
1605 bpage->offset = offset;
1606@@ -105,7 +105,7 @@
1607
1608 #ifdef UNIV_DEBUG
1609 bpage->in_page_hash = FALSE;
1610-@@ -3690,6 +3750,7 @@
1611+@@ -3691,6 +3751,7 @@
1612
1613 fold = buf_page_address_fold(space, offset);
1614
1615@@ -113,7 +113,7 @@
1616 //buf_pool_mutex_enter(buf_pool);
1617 mutex_enter(&buf_pool->LRU_list_mutex);
1618 rw_lock_x_lock(&buf_pool->page_hash_latch);
1619-@@ -3697,6 +3758,21 @@
1620+@@ -3698,6 +3759,21 @@
1621 block = (buf_block_t*) buf_page_hash_get_low(
1622 buf_pool, space, offset, fold);
1623
1624@@ -135,7 +135,7 @@
1625 if (block
1626 && buf_page_in_file(&block->page)
1627 && !buf_pool_watch_is_sentinel(buf_pool, &block->page)) {
1628-@@ -3988,8 +4064,11 @@
1629+@@ -4051,8 +4127,11 @@
1630 }
1631
1632 if (io_type == BUF_IO_WRITE
1633@@ -452,7 +452,7 @@
1634 ut_a(ret);
1635 --- a/storage/innobase/handler/ha_innodb.cc
1636 +++ b/storage/innobase/handler/ha_innodb.cc
1637-@@ -12029,6 +12029,12 @@
1638+@@ -12167,6 +12167,12 @@
1639 "except for the deletion.",
1640 NULL, NULL, 0, &corrupt_table_action_typelib);
1641
1642@@ -465,7 +465,7 @@
1643 static struct st_mysql_sys_var* innobase_system_variables[]= {
1644 MYSQL_SYSVAR(page_size),
1645 MYSQL_SYSVAR(log_block_size),
1646-@@ -12122,6 +12128,7 @@
1647+@@ -12261,6 +12267,7 @@
1648 MYSQL_SYSVAR(purge_batch_size),
1649 MYSQL_SYSVAR(rollback_segments),
1650 MYSQL_SYSVAR(corrupt_table_action),
1651@@ -473,7 +473,7 @@
1652 NULL
1653 };
1654
1655-@@ -12131,7 +12138,7 @@
1656+@@ -12270,7 +12277,7 @@
1657 &innobase_storage_engine,
1658 innobase_hton_name,
1659 plugin_author,
1660@@ -484,7 +484,7 @@
1661 NULL, /* Plugin Deinit */
1662 --- a/storage/innobase/include/buf0buf.h
1663 +++ b/storage/innobase/include/buf0buf.h
1664-@@ -1493,6 +1493,7 @@
1665+@@ -1468,6 +1468,7 @@
1666 0 if the block was never accessed
1667 in the buffer pool */
1668 /* @} */
1669@@ -612,7 +612,7 @@
1670
1671 --- a/storage/innobase/include/srv0srv.h
1672 +++ b/storage/innobase/include/srv0srv.h
1673-@@ -245,6 +245,8 @@
1674+@@ -249,6 +249,8 @@
1675 extern ulint srv_pass_corrupt_table;
1676
1677 extern ulint srv_dict_size_limit;
1678@@ -623,17 +623,17 @@
1679 extern ulint srv_n_rows_inserted;
1680 --- a/storage/innobase/include/sync0sync.h
1681 +++ b/storage/innobase/include/sync0sync.h
1682-@@ -693,6 +693,7 @@
1683+@@ -690,6 +690,7 @@
1684 #define SYNC_BUF_POOL 150 /* Buffer pool mutex */
1685 #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */
1686 #define SYNC_DOUBLEWRITE 140
1687 +#define SYNC_OUTER_ANY_LATCH 136
1688 #define SYNC_ANY_LATCH 135
1689- #define SYNC_THR_LOCAL 133
1690 #define SYNC_MEM_HASH 131
1691+ #define SYNC_MEM_POOL 130
1692 --- a/storage/innobase/include/univ.i
1693 +++ b/storage/innobase/include/univ.i
1694-@@ -52,6 +52,11 @@
1695+@@ -53,6 +53,11 @@
1696 #define INNODB_VERSION_MINOR 1
1697 #define INNODB_VERSION_BUGFIX 8
1698
1699@@ -645,7 +645,7 @@
1700 /* The following is the InnoDB version as shown in
1701 SELECT plugin_version FROM information_schema.plugins;
1702 calculated in make_version_string() in sql/sql_show.cc like this:
1703-@@ -64,7 +69,8 @@
1704+@@ -65,7 +70,8 @@
1705 #define INNODB_VERSION_STR \
1706 IB_TO_STR(INNODB_VERSION_MAJOR) "." \
1707 IB_TO_STR(INNODB_VERSION_MINOR) "." \
1708@@ -764,7 +764,7 @@
1709
1710 /** Provide optional 4.x backwards compatibility for 5.0 and above */
1711 UNIV_INTERN ibool row_rollback_on_timeout = FALSE;
1712-@@ -1191,6 +1192,13 @@
1713+@@ -1192,6 +1193,13 @@
1714
1715 thr = que_fork_get_first_thr(prebuilt->ins_graph);
1716
1717@@ -778,7 +778,7 @@
1718 if (prebuilt->sql_stat_start) {
1719 node->state = INS_NODE_SET_IX_LOCK;
1720 prebuilt->sql_stat_start = FALSE;
1721-@@ -2575,10 +2583,29 @@
1722+@@ -2576,10 +2584,29 @@
1723
1724 err = DB_ERROR;
1725 } else {
1726@@ -808,7 +808,7 @@
1727 }
1728 }
1729
1730-@@ -2927,6 +2954,19 @@
1731+@@ -2928,6 +2955,19 @@
1732 table->space = space;
1733 index = dict_table_get_first_index(table);
1734 do {
1735@@ -830,7 +830,7 @@
1736 } while (index);
1737 --- a/storage/innobase/row/row0sel.c
1738 +++ b/storage/innobase/row/row0sel.c
1739-@@ -3407,6 +3407,7 @@
1740+@@ -3418,6 +3418,7 @@
1741 ulint offsets_[REC_OFFS_NORMAL_SIZE];
1742 ulint* offsets = offsets_;
1743 ibool table_lock_waited = FALSE;
1744@@ -838,7 +838,7 @@
1745
1746 rec_offs_init(offsets_);
1747
1748-@@ -3778,6 +3779,17 @@
1749+@@ -3796,6 +3797,17 @@
1750
1751 /* Do some start-of-statement preparations */
1752
1753@@ -856,7 +856,7 @@
1754 if (!prebuilt->sql_stat_start) {
1755 /* No need to set an intention lock or assign a read view */
1756
1757-@@ -3788,6 +3800,18 @@
1758+@@ -3806,6 +3818,18 @@
1759 " perform a consistent read\n"
1760 "InnoDB: but the read view is not assigned!\n",
1761 stderr);
1762@@ -899,9 +899,9 @@
1763 }
1764 --- a/storage/innobase/sync/sync0sync.c
1765 +++ b/storage/innobase/sync/sync0sync.c
1766-@@ -1225,6 +1225,7 @@
1767+@@ -1219,6 +1219,7 @@
1768+ case SYNC_LOG:
1769 case SYNC_LOG_FLUSH_ORDER:
1770- case SYNC_THR_LOCAL:
1771 case SYNC_ANY_LATCH:
1772 + case SYNC_OUTER_ANY_LATCH:
1773 case SYNC_FILE_FORMAT_TAG:
1774
1775=== modified file 'patches/innodb_io_patches.patch'
1776--- patches/innodb_io_patches.patch 2011-09-21 09:20:58 +0000
1777+++ patches/innodb_io_patches.patch 2011-11-02 10:38:52 +0000
1778@@ -34,7 +34,11 @@
1779
1780 /* We know that the writes have been flushed to disk now
1781 and in recovery we will find them in the doublewrite buffer
1782-@@ -1378,7 +1378,7 @@
1783+@@ -1375,10 +1375,11 @@
1784+ ulint high;
1785+ ulint count = 0;
1786+ buf_pool_t* buf_pool = buf_pool_get(space, offset);
1787++ ibool is_forward_scan;
1788
1789 ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
1790
1791@@ -43,6 +47,104 @@
1792 /* If there is little space, it is better not to flush
1793 any block except from the end of the LRU list */
1794
1795+@@ -1405,7 +1406,30 @@
1796+ high = fil_space_get_size(space);
1797+ }
1798+
1799+- for (i = low; i < high; i++) {
1800++ if (srv_flush_neighbor_pages == 2) {
1801++ if (offset > low) {
1802++ is_forward_scan = FALSE; /* start form backward */
1803++ } else {
1804++ is_forward_scan = TRUE;
1805++ }
1806++ } else {
1807++ is_forward_scan = TRUE;
1808++ }
1809++
1810++scan:
1811++ if (srv_flush_neighbor_pages == 2) {
1812++ if (is_forward_scan) {
1813++ i = offset;
1814++ } else {
1815++ ut_a(offset > low);
1816++ i = offset - 1;
1817++ }
1818++ } else {
1819++ i = low;
1820++ }
1821++
1822++ for (;is_forward_scan ? (i < high) : (i >= low);
1823++ is_forward_scan ? (i++) : (i--)) {
1824+
1825+ buf_page_t* bpage;
1826+
1827+@@ -1417,7 +1441,7 @@
1828+ are flushing has not been flushed yet then
1829+ we'll try to flush the victim that we
1830+ selected originally. */
1831+- if (i <= offset) {
1832++ if (is_forward_scan && i <= offset) {
1833+ i = offset;
1834+ } else {
1835+ break;
1836+@@ -1434,6 +1458,10 @@
1837+ if (!bpage) {
1838+
1839+ buf_pool_mutex_exit(buf_pool);
1840++ /* not contiguous */
1841++ if (srv_flush_neighbor_pages == 2) {
1842++ break;
1843++ }
1844+ continue;
1845+ }
1846+
1847+@@ -1464,12 +1492,25 @@
1848+ ut_ad(!mutex_own(block_mutex));
1849+ ut_ad(!buf_pool_mutex_own(buf_pool));
1850+ count++;
1851++ /* contiguous */
1852+ continue;
1853+ } else {
1854+ mutex_exit(block_mutex);
1855+ }
1856+ }
1857+ buf_pool_mutex_exit(buf_pool);
1858++
1859++ /* not contiguous */
1860++ if (srv_flush_neighbor_pages == 2) {
1861++ break;
1862++ }
1863++ }
1864++
1865++ if (!is_forward_scan) {
1866++ /* backward scan was done. */
1867++ ut_a(srv_flush_neighbor_pages == 2);
1868++ is_forward_scan = TRUE;
1869++ goto scan;
1870+ }
1871+
1872+ return(count);
1873+@@ -1940,6 +1981,19 @@
1874+
1875+ buf_pool = buf_pool_from_array(i);
1876+
1877++ if (lsn_limit != IB_ULONGLONG_MAX) {
1878++ buf_page_t* bpage;
1879++
1880++ buf_flush_list_mutex_enter(buf_pool);
1881++ bpage = UT_LIST_GET_LAST(buf_pool->flush_list);
1882++ if (!bpage || bpage->oldest_modification >= lsn_limit) {
1883++ buf_flush_list_mutex_exit(buf_pool);
1884++ continue;
1885++ } else {
1886++ buf_flush_list_mutex_exit(buf_pool);
1887++ }
1888++ }
1889++
1890+ if (!buf_flush_start(buf_pool, BUF_FLUSH_LIST)) {
1891+ /* We have two choices here. If lsn_limit was
1892+ specified then skipping an instance of buffer
1893 --- a/storage/innobase/buf/buf0rea.c
1894 +++ b/storage/innobase/buf/buf0rea.c
1895 @@ -427,6 +427,10 @@
1896@@ -165,7 +267,7 @@
1897 /********************************************************************//**
1898 Obtain the InnoDB transaction of a MySQL thread.
1899 @return reference to transaction pointer */
1900-@@ -2444,6 +2461,9 @@
1901+@@ -2471,6 +2488,9 @@
1902 srv_n_read_io_threads = (ulint) innobase_read_io_threads;
1903 srv_n_write_io_threads = (ulint) innobase_write_io_threads;
1904
1905@@ -175,7 +277,7 @@
1906 srv_force_recovery = (ulint) innobase_force_recovery;
1907
1908 srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
1909-@@ -11026,7 +11046,7 @@
1910+@@ -11133,7 +11153,7 @@
1911 PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
1912 "Purge threads can be either 0 or 1.",
1913 NULL, NULL,
1914@@ -184,7 +286,7 @@
1915 0, /* Minimum value */
1916 1, 0); /* Maximum value */
1917
1918-@@ -11068,12 +11088,18 @@
1919+@@ -11175,12 +11195,18 @@
1920 innodb_file_format_max_validate,
1921 innodb_file_format_max_update, "Antelope");
1922
1923@@ -209,7 +311,7 @@
1924
1925 static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method,
1926 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
1927-@@ -11173,7 +11199,7 @@
1928+@@ -11285,7 +11311,7 @@
1929 static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size,
1930 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
1931 "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
1932@@ -218,7 +320,7 @@
1933
1934 static MYSQL_SYSVAR_LONG(buffer_pool_instances, innobase_buffer_pool_instances,
1935 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
1936-@@ -11330,6 +11356,95 @@
1937+@@ -11442,6 +11468,121 @@
1938 "trigger a readahead.",
1939 NULL, NULL, 56, 0, 64, 0);
1940
1941@@ -242,10 +344,36 @@
1942 + "Control soft limit of checkpoint age. (0 : not control)",
1943 + NULL, NULL, 0, 0, ~0UL, 0);
1944 +
1945-+static MYSQL_SYSVAR_ULONG(flush_neighbor_pages, srv_flush_neighbor_pages,
1946++static
1947++void
1948++innodb_flush_neighbor_pages_update(
1949++ THD* thd,
1950++ struct st_mysql_sys_var* var,
1951++ void* var_ptr,
1952++ const void* save)
1953++{
1954++ *(long *)var_ptr= (*(long *)save) % 3;
1955++}
1956++const char *flush_neighbor_pages_names[]=
1957++{
1958++ "none", /* 0 */
1959++ "area",
1960++ "contiguous", /* 2 */
1961++ /* For compatibility of the older patch */
1962++ "0", /* 3 ("none" + 3) */
1963++ "1",
1964++ "2", /* 5 ("contiguous" + 3) */
1965++ NullS
1966++};
1967++TYPELIB flush_neighbor_pages_typelib=
1968++{
1969++ array_elements(flush_neighbor_pages_names) - 1, "flush_neighbor_pages_typelib",
1970++ flush_neighbor_pages_names, NULL
1971++};
1972++static MYSQL_SYSVAR_ENUM(flush_neighbor_pages, srv_flush_neighbor_pages,
1973 + PLUGIN_VAR_RQCMDARG,
1974-+ "Enable/Disable flushing also neighbor pages. 0:disable 1:enable",
1975-+ NULL, NULL, 1, 0, 1, 0);
1976++ "Control flushing also neighbor pages (none, [area], contiguous).",
1977++ NULL, innodb_flush_neighbor_pages_update, 1, &flush_neighbor_pages_typelib);
1978 +
1979 +static
1980 +void
1981@@ -314,7 +442,7 @@
1982 static struct st_mysql_sys_var* innobase_system_variables[]= {
1983 MYSQL_SYSVAR(additional_mem_pool_size),
1984 MYSQL_SYSVAR(autoextend_increment),
1985-@@ -11350,6 +11465,7 @@
1986+@@ -11462,6 +11603,7 @@
1987 MYSQL_SYSVAR(file_format_check),
1988 MYSQL_SYSVAR(file_format_max),
1989 MYSQL_SYSVAR(flush_log_at_trx_commit),
1990@@ -322,7 +450,7 @@
1991 MYSQL_SYSVAR(flush_method),
1992 MYSQL_SYSVAR(force_recovery),
1993 MYSQL_SYSVAR(large_prefix),
1994-@@ -11388,6 +11504,13 @@
1995+@@ -11501,6 +11643,13 @@
1996 MYSQL_SYSVAR(show_verbose_locks),
1997 MYSQL_SYSVAR(show_locks_held),
1998 MYSQL_SYSVAR(version),
1999@@ -474,8 +602,8 @@
2000 +extern char srv_use_global_flush_log_at_trx_commit;
2001 extern char srv_adaptive_flushing;
2002
2003-
2004-@@ -217,6 +218,16 @@
2005+ /* If this flag is TRUE, then we will load the indexes' (and tables') metadata
2006+@@ -221,6 +222,16 @@
2007 extern ulong srv_max_purge_lag;
2008
2009 extern ulong srv_replication_delay;
2010@@ -492,7 +620,7 @@
2011 /*-------------------------------------------*/
2012
2013 extern ulint srv_n_rows_inserted;
2014-@@ -395,8 +406,9 @@
2015+@@ -399,8 +410,9 @@
2016 when writing data files, but do flush
2017 after writing to log files */
2018 SRV_UNIX_NOSYNC, /*!< do not flush after writing */
2019@@ -612,20 +740,43 @@
2020 log_sys->flushed_to_disk_lsn = log_sys->write_lsn;
2021 }
2022
2023-@@ -2120,10 +2151,10 @@
2024+@@ -1654,11 +1685,13 @@
2025+
2026+ recv_apply_hashed_log_recs(TRUE);
2027+ }
2028+-
2029++retry:
2030+ n_pages = buf_flush_list(ULINT_MAX, new_oldest);
2031+
2032+- if (sync) {
2033+- buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST);
2034++ if (sync && n_pages != 0) {
2035++ //buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST);
2036++ os_thread_sleep(100000);
2037++ goto retry;
2038+ }
2039+
2040+ if (n_pages == ULINT_UNDEFINED) {
2041+@@ -2119,13 +2152,15 @@
2042+ /* A flush is urgent: we have to do a synchronous preflush */
2043
2044 sync = TRUE;
2045- advance = 2 * (age - log->max_modified_age_sync);
2046+- advance = 2 * (age - log->max_modified_age_sync);
2047 - } else if (age > log->max_modified_age_async) {
2048++ advance = (age - log->max_modified_age_sync); /* no need *2. sync=TRUE is enough as brake */
2049 + } else if (age > log_max_modified_age_async()) {
2050
2051 /* A flush is not urgent: we do an asynchronous preflush */
2052 - advance = age - log->max_modified_age_async;
2053 + advance = age - log_max_modified_age_async();
2054++ log->check_flush_or_checkpoint = FALSE;
2055 } else {
2056 advance = 0;
2057++ log->check_flush_or_checkpoint = FALSE;
2058 }
2059-@@ -2137,7 +2168,7 @@
2060+
2061+ checkpoint_age = log->lsn - log->last_checkpoint_lsn;
2062+@@ -2137,21 +2172,21 @@
2063
2064 do_checkpoint = TRUE;
2065
2066@@ -634,7 +785,33 @@
2067 /* A checkpoint is not urgent: do it asynchronously */
2068
2069 do_checkpoint = TRUE;
2070-@@ -2607,7 +2638,7 @@
2071+
2072+- log->check_flush_or_checkpoint = FALSE;
2073++ //log->check_flush_or_checkpoint = FALSE;
2074+ } else {
2075+- log->check_flush_or_checkpoint = FALSE;
2076++ //log->check_flush_or_checkpoint = FALSE;
2077+ }
2078+
2079+ mutex_exit(&(log->mutex));
2080+
2081+ if (advance) {
2082+ ib_uint64_t new_oldest = oldest_lsn + advance;
2083+-
2084++retry:
2085+ success = log_preflush_pool_modified_pages(new_oldest, sync);
2086+
2087+ /* If the flush succeeded, this thread has done its part
2088+@@ -2166,7 +2201,7 @@
2089+ log->check_flush_or_checkpoint = TRUE;
2090+
2091+ mutex_exit(&(log->mutex));
2092+- goto loop;
2093++ goto retry;
2094+ }
2095+ }
2096+
2097+@@ -2607,7 +2642,7 @@
2098
2099 mutex_exit(&(log_sys->mutex));
2100
2101@@ -643,7 +820,7 @@
2102
2103 mutex_enter(&(log_sys->mutex));
2104
2105-@@ -3349,6 +3380,17 @@
2106+@@ -3349,6 +3384,17 @@
2107 log_sys->flushed_to_disk_lsn,
2108 log_sys->last_checkpoint_lsn);
2109
2110@@ -862,7 +1039,7 @@
2111 +#define PCT_IBUF_IO(pct) ((ulint) (srv_io_capacity * srv_ibuf_accel_rate * ((double) pct / 10000.0)))
2112 +
2113 +UNIV_INTERN ulint srv_checkpoint_age_target = 0;
2114-+UNIV_INTERN ulint srv_flush_neighbor_pages = 1; /* 0:disable 1:enable */
2115++UNIV_INTERN ulint srv_flush_neighbor_pages = 1; /* 0:disable 1:enable 2:contiguous */
2116 +
2117 +UNIV_INTERN ulint srv_enable_unsafe_group_commit = 0; /* 0:disable 1:enable */
2118 +UNIV_INTERN ulint srv_read_ahead = 3; /* 1: random 2: linear 3: Both */
2119
2120=== modified file 'patches/innodb_kill_idle_transaction.patch'
2121--- patches/innodb_kill_idle_transaction.patch 2011-10-10 14:35:27 +0000
2122+++ patches/innodb_kill_idle_transaction.patch 2011-11-02 10:38:52 +0000
2123@@ -87,7 +87,7 @@
2124 Implementation of Drop_table_error_handler::handle_condition().
2125 --- a/storage/innobase/handler/ha_innodb.cc
2126 +++ b/storage/innobase/handler/ha_innodb.cc
2127-@@ -2833,6 +2833,10 @@
2128+@@ -2860,6 +2860,10 @@
2129
2130 innobase_commit_concurrency_init_default();
2131
2132@@ -98,7 +98,7 @@
2133 #ifdef HAVE_PSI_INTERFACE
2134 /* Register keys with MySQL performance schema */
2135 if (PSI_server) {
2136-@@ -11579,6 +11583,48 @@
2137+@@ -11686,6 +11690,48 @@
2138 return(false);
2139 }
2140
2141@@ -147,7 +147,7 @@
2142 static SHOW_VAR innodb_status_variables_export[]= {
2143 {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC},
2144 {NullS, NullS, SHOW_LONG}
2145-@@ -11865,6 +11911,15 @@
2146+@@ -11977,6 +12023,15 @@
2147 "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket",
2148 NULL, NULL, 500L, 1L, ~0L, 0);
2149
2150@@ -163,7 +163,7 @@
2151 static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,
2152 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR,
2153 "Number of file I/O threads in InnoDB.",
2154-@@ -12167,6 +12222,7 @@
2155+@@ -12305,6 +12360,7 @@
2156 MYSQL_SYSVAR(fast_checksum),
2157 MYSQL_SYSVAR(commit_concurrency),
2158 MYSQL_SYSVAR(concurrency_tickets),
2159@@ -173,7 +173,7 @@
2160 MYSQL_SYSVAR(data_home_dir),
2161 --- a/storage/innobase/include/srv0srv.h
2162 +++ b/storage/innobase/include/srv0srv.h
2163-@@ -292,6 +292,7 @@
2164+@@ -296,6 +296,7 @@
2165 extern ulint srv_activity_count;
2166 extern ulint srv_fatal_semaphore_wait_threshold;
2167 extern ulint srv_dml_needed_delay;
2168
2169=== modified file 'patches/innodb_lru_dump_restore.patch'
2170--- patches/innodb_lru_dump_restore.patch 2011-10-03 01:19:24 +0000
2171+++ patches/innodb_lru_dump_restore.patch 2011-11-02 10:38:52 +0000
2172@@ -7,7 +7,7 @@
2173 # should be done or reviewed by the maintainer!
2174 --- a/storage/innobase/buf/buf0lru.c
2175 +++ b/storage/innobase/buf/buf0lru.c
2176-@@ -2167,6 +2167,289 @@
2177+@@ -2183,6 +2183,289 @@
2178 memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur);
2179 }
2180
2181@@ -392,7 +392,7 @@
2182 /** Possible values for system variable "innodb_stats_method". The values
2183 are defined the same as its corresponding MyISAM system variable
2184 "myisam_stats_method"(see "myisam_stats_method_names"), for better usability */
2185-@@ -2625,6 +2627,8 @@
2186+@@ -2652,6 +2654,8 @@
2187 srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
2188 srv_use_checksums = (ibool) innobase_use_checksums;
2189
2190@@ -401,7 +401,7 @@
2191 #ifdef HAVE_LARGE_PAGES
2192 if ((os_use_large_pages = (ibool) my_use_large_pages))
2193 os_large_page_size = (ulint) opt_large_page_size;
2194-@@ -11804,6 +11808,19 @@
2195+@@ -11942,6 +11946,19 @@
2196 "Limit the allocated memory for dictionary cache. (0: unlimited)",
2197 NULL, NULL, 0, 0, LONG_MAX, 0);
2198
2199@@ -421,7 +421,7 @@
2200 static struct st_mysql_sys_var* innobase_system_variables[]= {
2201 MYSQL_SYSVAR(additional_mem_pool_size),
2202 MYSQL_SYSVAR(autoextend_increment),
2203-@@ -11887,6 +11904,8 @@
2204+@@ -12026,6 +12043,8 @@
2205 MYSQL_SYSVAR(random_read_ahead),
2206 MYSQL_SYSVAR(read_ahead_threshold),
2207 MYSQL_SYSVAR(io_capacity),
2208@@ -496,8 +496,8 @@
2209 +buf_LRU_file_restore(void);
2210 +/*======================*/
2211
2212- #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
2213- /**********************************************************************//**
2214+ /******************************************************************//**
2215+ Remove one page from LRU list and put it to free list */
2216 --- a/storage/innobase/include/buf0rea.h
2217 +++ b/storage/innobase/include/buf0rea.h
2218 @@ -31,6 +31,37 @@
2219@@ -557,7 +557,7 @@
2220 handler for completed requests. The aio array of pending requests is divided
2221 --- a/storage/innobase/include/srv0srv.h
2222 +++ b/storage/innobase/include/srv0srv.h
2223-@@ -357,6 +357,12 @@
2224+@@ -361,6 +361,12 @@
2225 reading of a disk page */
2226 extern ulint srv_buf_pool_reads;
2227
2228@@ -570,7 +570,7 @@
2229 /** Status variables to be passed to MySQL */
2230 typedef struct export_var_struct export_struc;
2231
2232-@@ -662,6 +668,16 @@
2233+@@ -666,6 +672,16 @@
2234 /*=====================*/
2235 void* arg); /*!< in: a dummy parameter required by
2236 os_thread_create */
2237
2238=== modified file 'patches/innodb_opt_lru_count.patch'
2239--- patches/innodb_opt_lru_count.patch 2011-09-21 09:20:58 +0000
2240+++ patches/innodb_opt_lru_count.patch 2011-11-02 10:38:52 +0000
2241@@ -38,7 +38,7 @@
2242 ut_d(bpage->in_page_hash = FALSE);
2243
2244 /* relocate buf_pool->LRU */
2245-@@ -3283,8 +3283,8 @@
2246+@@ -3284,8 +3284,8 @@
2247 bpage->in_zip_hash = FALSE;
2248 bpage->in_flush_list = FALSE;
2249 bpage->in_free_list = FALSE;
2250@@ -48,7 +48,7 @@
2251
2252 ut_d(bpage->in_page_hash = TRUE);
2253
2254-@@ -3449,7 +3449,7 @@
2255+@@ -3450,7 +3450,7 @@
2256 ibuf_merge_or_delete_for_page(NULL, space, offset, zip_size, TRUE);
2257
2258 /* Flush pages from the end of the LRU list if necessary */
2259@@ -94,7 +94,7 @@
2260
2261 return(FALSE);
2262 }
2263-@@ -1985,8 +1988,14 @@
2264+@@ -2039,8 +2042,14 @@
2265 buf_page_t* bpage;
2266 ulint n_replaceable;
2267 ulint distance = 0;
2268@@ -110,7 +110,7 @@
2269
2270 n_replaceable = UT_LIST_GET_LEN(buf_pool->free);
2271
2272-@@ -1997,7 +2006,13 @@
2273+@@ -2051,7 +2060,13 @@
2274 + BUF_FLUSH_EXTRA_MARGIN(buf_pool))
2275 && (distance < BUF_LRU_FREE_SEARCH_LEN(buf_pool))) {
2276
2277@@ -125,7 +125,7 @@
2278
2279 mutex_enter(block_mutex);
2280
2281-@@ -2012,11 +2027,18 @@
2282+@@ -2066,11 +2081,18 @@
2283 bpage = UT_LIST_GET_PREV(LRU, bpage);
2284 }
2285
2286@@ -145,7 +145,7 @@
2287 }
2288
2289 return(BUF_FLUSH_FREE_BLOCK_MARGIN(buf_pool)
2290-@@ -2034,7 +2056,8 @@
2291+@@ -2088,7 +2110,8 @@
2292 void
2293 buf_flush_free_margin(
2294 /*==================*/
2295@@ -155,7 +155,7 @@
2296 {
2297 ulint n_to_flush;
2298
2299-@@ -2045,7 +2068,7 @@
2300+@@ -2099,7 +2122,7 @@
2301
2302 n_flushed = buf_flush_LRU(buf_pool, n_to_flush);
2303
2304@@ -164,7 +164,7 @@
2305 /* There was an LRU type flush batch already running;
2306 let us wait for it to end */
2307
2308-@@ -2058,8 +2081,9 @@
2309+@@ -2112,8 +2135,9 @@
2310 Flushes pages from the end of all the LRU lists. */
2311 UNIV_INTERN
2312 void
2313@@ -175,7 +175,7 @@
2314 {
2315 ulint i;
2316
2317-@@ -2068,7 +2092,7 @@
2318+@@ -2122,7 +2146,7 @@
2319
2320 buf_pool = buf_pool_from_array(i);
2321
2322@@ -271,7 +271,7 @@
2323 if (buf_debug_prints) {
2324 --- a/storage/innobase/include/buf0buf.h
2325 +++ b/storage/innobase/include/buf0buf.h
2326-@@ -1442,11 +1442,11 @@
2327+@@ -1417,11 +1417,11 @@
2328
2329 UT_LIST_NODE_T(buf_page_t) LRU;
2330 /*!< node of the LRU list */
2331
2332=== modified file 'patches/innodb_overwrite_relay_log_info.patch'
2333--- patches/innodb_overwrite_relay_log_info.patch 2011-09-21 09:20:58 +0000
2334+++ patches/innodb_overwrite_relay_log_info.patch 2011-11-02 10:38:52 +0000
2335@@ -55,7 +55,7 @@
2336 static my_bool innobase_rollback_on_timeout = FALSE;
2337 static my_bool innobase_create_status_file = FALSE;
2338 static my_bool innobase_stats_on_metadata = TRUE;
2339-@@ -2255,6 +2275,89 @@
2340+@@ -2282,6 +2302,89 @@
2341 }
2342 #endif /* DBUG_OFF */
2343
2344@@ -145,7 +145,7 @@
2345 /* Check that values don't overflow on 32-bit systems. */
2346 if (sizeof(ulint) == 4) {
2347 if (innobase_buffer_pool_size > UINT_MAX32) {
2348-@@ -2553,6 +2656,76 @@
2349+@@ -2580,6 +2683,76 @@
2350 goto mem_free_and_error;
2351 }
2352
2353@@ -222,7 +222,7 @@
2354 innobase_old_blocks_pct = buf_LRU_old_ratio_update(
2355 innobase_old_blocks_pct, TRUE);
2356
2357-@@ -2667,6 +2840,25 @@
2358+@@ -2694,6 +2867,25 @@
2359 trx_t* trx) /*!< in: transaction handle */
2360 {
2361 if (trx_is_started(trx)) {
2362@@ -248,7 +248,7 @@
2363
2364 trx_commit_for_mysql(trx);
2365 }
2366-@@ -11015,6 +11207,12 @@
2367+@@ -11122,6 +11314,12 @@
2368 "The common part for InnoDB table spaces.",
2369 NULL, NULL, NULL);
2370
2371@@ -261,7 +261,7 @@
2372 static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
2373 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
2374 "Enable InnoDB doublewrite buffer (enabled by default). "
2375-@@ -11486,6 +11684,7 @@
2376+@@ -11625,6 +11823,7 @@
2377 MYSQL_SYSVAR(old_blocks_pct),
2378 MYSQL_SYSVAR(old_blocks_time),
2379 MYSQL_SYSVAR(open_files),
2380
2381=== modified file 'patches/innodb_pass_corrupt_table.patch'
2382--- patches/innodb_pass_corrupt_table.patch 2011-10-10 14:35:27 +0000
2383+++ patches/innodb_pass_corrupt_table.patch 2011-11-02 10:38:52 +0000
2384@@ -7,10 +7,10 @@
2385 # should be done or reviewed by the maintainer!
2386 --- a/storage/innobase/btr/btr0btr.c
2387 +++ b/storage/innobase/btr/btr0btr.c
2388-@@ -691,6 +691,12 @@
2389- root_page_no = dict_index_get_page(index);
2390+@@ -692,6 +692,12 @@
2391
2392- block = btr_block_get(space, zip_size, root_page_no, RW_X_LATCH, mtr);
2393+ block = btr_block_get(space, zip_size, root_page_no, RW_X_LATCH,
2394+ index, mtr);
2395 +
2396 + if (srv_pass_corrupt_table && !block) {
2397 + return(0);
2398@@ -20,7 +20,7 @@
2399 ut_a((ibool)!!page_is_comp(buf_block_get_frame(block))
2400 == dict_table_is_comp(index->table));
2401 #ifdef UNIV_BTR_DEBUG
2402-@@ -977,6 +983,12 @@
2403+@@ -978,6 +984,12 @@
2404
2405 root = btr_root_get(index, &mtr);
2406
2407@@ -33,24 +33,24 @@
2408 if (flag == BTR_N_LEAF_PAGES) {
2409 seg_header = root + PAGE_HEADER + PAGE_BTR_SEG_LEAF;
2410
2411-@@ -1433,6 +1445,13 @@
2412- mtr_start(&mtr);
2413+@@ -1437,6 +1449,13 @@
2414
2415- root = btr_page_get(space, zip_size, root_page_no, RW_X_LATCH, &mtr);
2416+ root = btr_page_get(space, zip_size, root_page_no, RW_X_LATCH,
2417+ NULL, &mtr);
2418 +
2419 + if (srv_pass_corrupt_table && !root) {
2420 + mtr_commit(&mtr);
2421 + return;
2422 + }
2423 + ut_a(root);
2424-+
2425++
2426 #ifdef UNIV_BTR_DEBUG
2427 ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
2428 + root, space));
2429-@@ -1455,6 +1474,12 @@
2430- mtr_start(&mtr);
2431+@@ -1460,6 +1479,12 @@
2432
2433- root = btr_page_get(space, zip_size, root_page_no, RW_X_LATCH, &mtr);
2434+ root = btr_page_get(space, zip_size, root_page_no, RW_X_LATCH,
2435+ NULL, &mtr);
2436 +
2437 + if (srv_pass_corrupt_table && !root) {
2438 + mtr_commit(&mtr);
2439@@ -60,9 +60,9 @@
2440 #ifdef UNIV_BTR_DEBUG
2441 ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP
2442 + root, space));
2443-@@ -1488,6 +1513,11 @@
2444-
2445- block = btr_block_get(space, zip_size, root_page_no, RW_X_LATCH, mtr);
2446+@@ -1493,6 +1518,11 @@
2447+ block = btr_block_get(space, zip_size, root_page_no, RW_X_LATCH,
2448+ NULL, mtr);
2449
2450 + if (srv_pass_corrupt_table && !block) {
2451 + return;
2452@@ -74,57 +74,57 @@
2453 header = buf_block_get_frame(block) + PAGE_HEADER + PAGE_BTR_SEG_TOP;
2454 --- a/storage/innobase/btr/btr0cur.c
2455 +++ b/storage/innobase/btr/btr0cur.c
2456-@@ -250,6 +250,11 @@
2457- case BTR_MODIFY_LEAF:
2458+@@ -251,6 +251,11 @@
2459 mode = latch_mode == BTR_SEARCH_LEAF ? RW_S_LATCH : RW_X_LATCH;
2460- get_block = btr_block_get(space, zip_size, page_no, mode, mtr);
2461-+
2462-+ if (srv_pass_corrupt_table && !get_block) {
2463-+ return;
2464-+ }
2465-+ ut_a(get_block);
2466- #ifdef UNIV_BTR_DEBUG
2467- ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
2468- #endif /* UNIV_BTR_DEBUG */
2469-@@ -263,6 +268,11 @@
2470- get_block = btr_block_get(space, zip_size,
2471- left_page_no,
2472- RW_X_LATCH, mtr);
2473-+
2474-+ if (srv_pass_corrupt_table && !get_block) {
2475-+ return;
2476-+ }
2477-+ ut_a(get_block);
2478- #ifdef UNIV_BTR_DEBUG
2479- ut_a(page_is_comp(get_block->frame)
2480- == page_is_comp(page));
2481-@@ -274,6 +284,11 @@
2482-
2483- get_block = btr_block_get(space, zip_size, page_no,
2484- RW_X_LATCH, mtr);
2485-+
2486-+ if (srv_pass_corrupt_table && !get_block) {
2487-+ return;
2488-+ }
2489-+ ut_a(get_block);
2490- #ifdef UNIV_BTR_DEBUG
2491- ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
2492- #endif /* UNIV_BTR_DEBUG */
2493-@@ -285,6 +300,11 @@
2494- get_block = btr_block_get(space, zip_size,
2495- right_page_no,
2496- RW_X_LATCH, mtr);
2497-+
2498-+ if (srv_pass_corrupt_table && !get_block) {
2499-+ return;
2500-+ }
2501-+ ut_a(get_block);
2502- #ifdef UNIV_BTR_DEBUG
2503- ut_a(page_is_comp(get_block->frame)
2504- == page_is_comp(page));
2505-@@ -306,6 +326,11 @@
2506- get_block = btr_block_get(space, zip_size,
2507- left_page_no, mode, mtr);
2508+ get_block = btr_block_get(
2509+ space, zip_size, page_no, mode, cursor->index, mtr);
2510++
2511++ if (srv_pass_corrupt_table && !get_block) {
2512++ return;
2513++ }
2514++ ut_a(get_block);
2515+ #ifdef UNIV_BTR_DEBUG
2516+ ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
2517+ #endif /* UNIV_BTR_DEBUG */
2518+@@ -264,6 +269,11 @@
2519+ get_block = btr_block_get(
2520+ space, zip_size, left_page_no,
2521+ RW_X_LATCH, cursor->index, mtr);
2522++
2523++ if (srv_pass_corrupt_table && !get_block) {
2524++ return;
2525++ }
2526++ ut_a(get_block);
2527+ #ifdef UNIV_BTR_DEBUG
2528+ ut_a(page_is_comp(get_block->frame)
2529+ == page_is_comp(page));
2530+@@ -276,6 +286,11 @@
2531+ get_block = btr_block_get(
2532+ space, zip_size, page_no,
2533+ RW_X_LATCH, cursor->index, mtr);
2534++
2535++ if (srv_pass_corrupt_table && !get_block) {
2536++ return;
2537++ }
2538++ ut_a(get_block);
2539+ #ifdef UNIV_BTR_DEBUG
2540+ ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
2541+ #endif /* UNIV_BTR_DEBUG */
2542+@@ -287,6 +302,11 @@
2543+ get_block = btr_block_get(
2544+ space, zip_size, right_page_no,
2545+ RW_X_LATCH, cursor->index, mtr);
2546++
2547++ if (srv_pass_corrupt_table && !get_block) {
2548++ return;
2549++ }
2550++ ut_a(get_block);
2551+ #ifdef UNIV_BTR_DEBUG
2552+ ut_a(page_is_comp(get_block->frame)
2553+ == page_is_comp(page));
2554+@@ -309,6 +329,11 @@
2555+ space, zip_size,
2556+ left_page_no, mode, cursor->index, mtr);
2557 cursor->left_block = get_block;
2558 +
2559 + if (srv_pass_corrupt_table && !get_block) {
2560@@ -134,10 +134,10 @@
2561 #ifdef UNIV_BTR_DEBUG
2562 ut_a(page_is_comp(get_block->frame)
2563 == page_is_comp(page));
2564-@@ -316,6 +341,11 @@
2565- }
2566+@@ -320,6 +345,11 @@
2567
2568- get_block = btr_block_get(space, zip_size, page_no, mode, mtr);
2569+ get_block = btr_block_get(
2570+ space, zip_size, page_no, mode, cursor->index, mtr);
2571 +
2572 + if (srv_pass_corrupt_table && !get_block) {
2573 + return;
2574@@ -146,7 +146,7 @@
2575 #ifdef UNIV_BTR_DEBUG
2576 ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
2577 #endif /* UNIV_BTR_DEBUG */
2578-@@ -588,6 +618,19 @@
2579+@@ -592,6 +622,19 @@
2580 file, line, mtr);
2581
2582 if (block == NULL) {
2583@@ -166,7 +166,7 @@
2584 /* This must be a search to perform an insert/delete
2585 mark/ delete; try using the insert/delete buffer */
2586
2587-@@ -662,6 +705,16 @@
2588+@@ -666,6 +709,16 @@
2589 block->check_index_page_at_flush = TRUE;
2590 page = buf_block_get_frame(block);
2591
2592@@ -183,7 +183,7 @@
2593 if (rw_latch != RW_NO_LATCH) {
2594 #ifdef UNIV_ZIP_DEBUG
2595 const page_zip_des_t* page_zip
2596-@@ -866,6 +919,17 @@
2597+@@ -872,6 +925,17 @@
2598 RW_NO_LATCH, NULL, BUF_GET,
2599 file, line, mtr);
2600 page = buf_block_get_frame(block);
2601@@ -201,7 +201,7 @@
2602 ut_ad(index->id == btr_page_get_index_id(page));
2603
2604 block->check_index_page_at_flush = TRUE;
2605-@@ -986,6 +1050,14 @@
2606+@@ -992,6 +1056,14 @@
2607 RW_NO_LATCH, NULL, BUF_GET,
2608 file, line, mtr);
2609 page = buf_block_get_frame(block);
2610@@ -216,7 +216,7 @@
2611 ut_ad(index->id == btr_page_get_index_id(page));
2612
2613 if (height == ULINT_UNDEFINED) {
2614-@@ -1199,6 +1271,12 @@
2615+@@ -1205,6 +1277,12 @@
2616 *big_rec = NULL;
2617
2618 block = btr_cur_get_block(cursor);
2619@@ -229,7 +229,7 @@
2620 page = buf_block_get_frame(block);
2621 index = cursor->index;
2622 zip_size = buf_block_get_zip_size(block);
2623-@@ -2988,6 +3066,11 @@
2624+@@ -2937,6 +3015,11 @@
2625
2626 block = btr_cur_get_block(cursor);
2627
2628@@ -241,7 +241,7 @@
2629 ut_ad(page_is_leaf(buf_block_get_frame(block)));
2630
2631 rec = btr_cur_get_rec(cursor);
2632-@@ -3701,6 +3784,11 @@
2633+@@ -3650,6 +3733,11 @@
2634
2635 page = btr_cur_get_page(&cursor);
2636
2637@@ -277,9 +277,9 @@
2638 index = btr_cur_get_index(btr_pcur_get_btr_cur(cursor));
2639
2640 page_cursor = btr_pcur_get_page_cur(cursor);
2641-@@ -392,6 +398,15 @@
2642- next_block = btr_block_get(space, zip_size, next_page_no,
2643- cursor->latch_mode, mtr);
2644+@@ -395,6 +401,15 @@
2645+ cursor->latch_mode,
2646+ btr_pcur_get_btr_cur(cursor)->index, mtr);
2647 next_page = buf_block_get_frame(next_block);
2648 +
2649 + if (srv_pass_corrupt_table && !next_page) {
2650@@ -374,7 +374,7 @@
2651 #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
2652 bpage->file_page_was_freed = FALSE;
2653 #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
2654-@@ -3845,6 +3866,7 @@
2655+@@ -3899,6 +3920,7 @@
2656 (ulong) bpage->offset);
2657 }
2658
2659@@ -382,7 +382,7 @@
2660 /* From version 3.23.38 up we store the page checksum
2661 to the 4 first bytes of the page end lsn field */
2662
2663-@@ -3886,6 +3908,23 @@
2664+@@ -3940,6 +3962,23 @@
2665 REFMAN "forcing-innodb-recovery.html\n"
2666 "InnoDB: about forcing recovery.\n", stderr);
2667
2668@@ -404,17 +404,17 @@
2669 + bpage->is_corrupt = TRUE;
2670 + } else
2671 if (srv_force_recovery < SRV_FORCE_IGNORE_CORRUPT) {
2672- fputs("InnoDB: Ending processing because of"
2673- " a corrupt database page.\n",
2674-@@ -3893,6 +3932,7 @@
2675- exit(1);
2676+ /* If page space id is larger than TRX_SYS_SPACE
2677+ (0), we will attempt to mark the corresponding
2678+@@ -3956,6 +3995,7 @@
2679+ }
2680 }
2681 }
2682 + } /**/
2683
2684 if (recv_recovery_is_on()) {
2685 /* Pages must be uncompressed for crash recovery. */
2686-@@ -3902,8 +3942,11 @@
2687+@@ -3965,8 +4005,11 @@
2688
2689 if (uncompressed && !recv_no_ibuf_operations) {
2690 ibuf_merge_or_delete_for_page(
2691@@ -445,10 +445,10 @@
2692 /* The i/o is already completed when we arrive from
2693 --- a/storage/innobase/dict/dict0dict.c
2694 +++ b/storage/innobase/dict/dict0dict.c
2695-@@ -54,6 +54,7 @@
2696- #include "row0merge.h"
2697+@@ -55,6 +55,7 @@
2698 #include "m_ctype.h" /* my_isspace() */
2699 #include "ha_prototypes.h" /* innobase_strcasecmp(), innobase_casedn_str()*/
2700+ #include "row0upd.h"
2701 +#include "srv0start.h" /* SRV_LOG_SPACE_FIRST_ID */
2702
2703 #include <ctype.h>
2704@@ -471,7 +471,7 @@
2705 goto next_loop;
2706
2707 cached_foreign_tables = 0;
2708-@@ -4366,6 +4367,12 @@
2709+@@ -4367,6 +4368,12 @@
2710 heap = mem_heap_create(1000);
2711
2712 while (index) {
2713@@ -484,7 +484,7 @@
2714 size = btr_get_size(index, BTR_TOTAL_SIZE);
2715
2716 index->stat_index_size = size;
2717-@@ -4513,6 +4520,12 @@
2718+@@ -4514,6 +4521,12 @@
2719 heap = mem_heap_create(1000);
2720
2721 while (index) {
2722@@ -497,7 +497,7 @@
2723 /*===========================================*/
2724 {
2725 dict_table_t* sys_stats;
2726-@@ -4705,6 +4718,13 @@
2727+@@ -4706,6 +4719,13 @@
2728 || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO
2729 && dict_index_is_clust(index)))) {
2730 ulint size;
2731@@ -511,9 +511,9 @@
2732 size = btr_get_size(index, BTR_TOTAL_SIZE);
2733
2734 index->stat_index_size = size;
2735-@@ -5501,4 +5521,42 @@
2736- rw_lock_free(&dict_table_stats_latches[i]);
2737- }
2738+@@ -5685,4 +5705,42 @@
2739+
2740+ index->type |= DICT_CORRUPT;
2741 }
2742 +
2743 +/*************************************************************************
2744@@ -787,7 +787,7 @@
2745 if (descr != NULL) {
2746 --- a/storage/innobase/handler/ha_innodb.cc
2747 +++ b/storage/innobase/handler/ha_innodb.cc
2748-@@ -3985,6 +3985,12 @@
2749+@@ -4012,6 +4012,12 @@
2750 DBUG_RETURN(1);
2751 }
2752
2753@@ -800,7 +800,7 @@
2754 /* Create buffers for packing the fields of a record. Why
2755 table->reclength did not work here? Obviously, because char
2756 fields when packed actually became 1 byte longer, when we also
2757-@@ -4012,6 +4018,19 @@
2758+@@ -4039,6 +4045,19 @@
2759 /* Get pointer to a table object in InnoDB dictionary cache */
2760 ib_table = dict_table_get(norm_name, TRUE);
2761
2762@@ -820,7 +820,7 @@
2763 if (NULL == ib_table) {
2764 if (is_part && retries < 10) {
2765 ++retries;
2766-@@ -5161,6 +5180,10 @@
2767+@@ -5188,6 +5207,10 @@
2768
2769 ha_statistic_increment(&SSV::ha_write_count);
2770
2771@@ -831,7 +831,7 @@
2772 if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
2773 table->timestamp_field->set_time();
2774
2775-@@ -5378,6 +5401,10 @@
2776+@@ -5405,6 +5428,10 @@
2777 func_exit:
2778 innobase_active_small();
2779
2780@@ -842,7 +842,7 @@
2781 DBUG_RETURN(error_result);
2782 }
2783
2784-@@ -5554,6 +5581,10 @@
2785+@@ -5581,6 +5608,10 @@
2786
2787 ha_statistic_increment(&SSV::ha_update_count);
2788
2789@@ -853,7 +853,7 @@
2790 if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
2791 table->timestamp_field->set_time();
2792
2793-@@ -5643,6 +5674,10 @@
2794+@@ -5670,6 +5701,10 @@
2795
2796 innobase_active_small();
2797
2798@@ -864,7 +864,7 @@
2799 DBUG_RETURN(error);
2800 }
2801
2802-@@ -5664,6 +5699,10 @@
2803+@@ -5691,6 +5726,10 @@
2804
2805 ha_statistic_increment(&SSV::ha_delete_count);
2806
2807@@ -875,7 +875,7 @@
2808 if (!prebuilt->upd_node) {
2809 row_get_prebuilt_update_vector(prebuilt);
2810 }
2811-@@ -5690,6 +5729,10 @@
2812+@@ -5717,6 +5756,10 @@
2813
2814 innobase_active_small();
2815
2816@@ -886,7 +886,7 @@
2817 DBUG_RETURN(error);
2818 }
2819
2820-@@ -5929,6 +5972,10 @@
2821+@@ -5956,6 +5999,10 @@
2822
2823 ha_statistic_increment(&SSV::ha_read_key_count);
2824
2825@@ -896,8 +896,8 @@
2826 +
2827 index = prebuilt->index;
2828
2829- if (UNIV_UNLIKELY(index == NULL)) {
2830-@@ -5994,6 +6041,10 @@
2831+ if (UNIV_UNLIKELY(index == NULL) || dict_index_is_corrupted(index)) {
2832+@@ -6023,6 +6070,10 @@
2833 ret = DB_UNSUPPORTED;
2834 }
2835
2836@@ -908,7 +908,7 @@
2837 switch (ret) {
2838 case DB_SUCCESS:
2839 error = 0;
2840-@@ -6109,6 +6160,10 @@
2841+@@ -6138,6 +6189,10 @@
2842 {
2843 DBUG_ENTER("change_active_index");
2844
2845@@ -919,7 +919,7 @@
2846 ut_ad(user_thd == ha_thd());
2847 ut_a(prebuilt->trx == thd_to_trx(user_thd));
2848
2849-@@ -6199,6 +6254,10 @@
2850+@@ -6251,6 +6306,10 @@
2851
2852 DBUG_ENTER("general_fetch");
2853
2854@@ -930,7 +930,7 @@
2855 ut_a(prebuilt->trx == thd_to_trx(user_thd));
2856
2857 innodb_srv_conc_enter_innodb(prebuilt->trx);
2858-@@ -6208,6 +6267,10 @@
2859+@@ -6260,6 +6319,10 @@
2860
2861 innodb_srv_conc_exit_innodb(prebuilt->trx);
2862
2863@@ -941,7 +941,7 @@
2864 switch (ret) {
2865 case DB_SUCCESS:
2866 error = 0;
2867-@@ -7474,10 +7537,18 @@
2868+@@ -7526,10 +7589,18 @@
2869
2870 update_thd(ha_thd());
2871
2872@@ -960,7 +960,7 @@
2873 error = convert_error_code_to_mysql(error, prebuilt->table->flags,
2874 NULL);
2875
2876-@@ -7978,6 +8049,16 @@
2877+@@ -8034,6 +8105,16 @@
2878 return(ranges + (double) rows / (double) total_rows * time_for_scan);
2879 }
2880
2881@@ -977,7 +977,7 @@
2882 /*********************************************************************//**
2883 Calculates the key number used inside MySQL for an Innobase index. We will
2884 first check the "index translation table" for a match of the index to get
2885-@@ -8155,7 +8236,7 @@
2886+@@ -8211,7 +8292,7 @@
2887 ib_table = prebuilt->table;
2888
2889 if (flag & HA_STATUS_TIME) {
2890@@ -986,7 +986,7 @@
2891 /* In sql_show we call with this flag: update
2892 then statistics so that they are up-to-date */
2893
2894-@@ -8455,10 +8536,18 @@
2895+@@ -8511,10 +8592,18 @@
2896 THD* thd, /*!< in: connection thread handle */
2897 HA_CHECK_OPT* check_opt) /*!< in: currently ignored */
2898 {
2899@@ -1005,7 +1005,7 @@
2900 return(0);
2901 }
2902
2903-@@ -8640,6 +8729,10 @@
2904+@@ -8747,6 +8836,10 @@
2905 my_error(ER_QUERY_INTERRUPTED, MYF(0));
2906 }
2907
2908@@ -1016,7 +1016,7 @@
2909 DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT);
2910 }
2911
2912-@@ -9410,6 +9503,10 @@
2913+@@ -9517,6 +9610,10 @@
2914
2915 update_thd(thd);
2916
2917@@ -1027,7 +1027,7 @@
2918 if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) {
2919 ut_print_timestamp(stderr);
2920 fprintf(stderr,
2921-@@ -11829,6 +11926,26 @@
2922+@@ -11967,6 +12064,26 @@
2923 "dump file (if present). Disabled by default.",
2924 NULL, NULL, FALSE);
2925
2926@@ -1054,7 +1054,7 @@
2927 static struct st_mysql_sys_var* innobase_system_variables[]= {
2928 MYSQL_SYSVAR(additional_mem_pool_size),
2929 MYSQL_SYSVAR(autoextend_increment),
2930-@@ -11918,6 +12035,7 @@
2931+@@ -12057,6 +12174,7 @@
2932 MYSQL_SYSVAR(purge_threads),
2933 MYSQL_SYSVAR(purge_batch_size),
2934 MYSQL_SYSVAR(rollback_segments),
2935@@ -1091,7 +1091,7 @@
2936 #define BTR_MAX_NODE_LEVEL 50 /*!< Maximum B-tree page level
2937 (not really a hard limit).
2938 Used in debug assertions
2939-@@ -55,7 +55,9 @@
2940+@@ -59,7 +59,9 @@
2941 block = buf_page_get_gen(space, zip_size, page_no, mode,
2942 NULL, BUF_GET, file, line, mtr);
2943
2944@@ -1100,11 +1100,11 @@
2945 +
2946 + if (block && mode != RW_NO_LATCH) {
2947
2948- buf_block_dbg_add_level(block, SYNC_TREE_NODE);
2949- }
2950+ buf_block_dbg_add_level(
2951+ block, index != NULL && dict_index_is_ibuf(index)
2952 --- a/storage/innobase/include/buf0buf.h
2953 +++ b/storage/innobase/include/buf0buf.h
2954-@@ -1041,7 +1041,7 @@
2955+@@ -1016,7 +1016,7 @@
2956 const buf_block_t* block) /*!< in: pointer to the control block */
2957 __attribute__((pure));
2958 #else /* UNIV_DEBUG */
2959@@ -1113,7 +1113,7 @@
2960 #endif /* UNIV_DEBUG */
2961 /*********************************************************************//**
2962 Gets the space id of a block.
2963-@@ -1488,6 +1488,7 @@
2964+@@ -1463,6 +1463,7 @@
2965 0 if the block was never accessed
2966 in the buffer pool */
2967 /* @} */
2968@@ -1147,9 +1147,9 @@
2969 switch (buf_block_get_state(block)) {
2970 --- a/storage/innobase/include/dict0dict.h
2971 +++ b/storage/innobase/include/dict0dict.h
2972-@@ -1258,6 +1258,15 @@
2973- dict_close(void);
2974- /*============*/
2975+@@ -1326,6 +1326,15 @@
2976+ /*========================*/
2977+ ulint space_id); /*!< in: space ID */
2978
2979 +/*************************************************************************
2980 +set is_corrupt flag by space_id*/
2981@@ -1165,7 +1165,7 @@
2982 #endif
2983 --- a/storage/innobase/include/dict0mem.h
2984 +++ b/storage/innobase/include/dict0mem.h
2985-@@ -666,6 +666,7 @@
2986+@@ -670,6 +670,7 @@
2987 the AUTOINC lock on this table. */
2988 /* @} */
2989 /*----------------------*/
2990@@ -1220,7 +1220,7 @@
2991 buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK);
2992 --- a/storage/innobase/include/page0page.h
2993 +++ b/storage/innobase/include/page0page.h
2994-@@ -527,7 +527,7 @@
2995+@@ -497,7 +497,7 @@
2996 page_is_leaf(
2997 /*=========*/
2998 const page_t* page) /*!< in: page */
2999@@ -1254,7 +1254,7 @@
3000 Decompress a page. This function should tolerate errors on the compressed
3001 --- a/storage/innobase/include/srv0srv.h
3002 +++ b/storage/innobase/include/srv0srv.h
3003-@@ -241,6 +241,7 @@
3004+@@ -245,6 +245,7 @@
3005 extern ulint srv_adaptive_flushing_method;
3006
3007 extern ulint srv_expand_import;
3008@@ -1277,7 +1277,7 @@
3009 ut_ad(page_simple_validate_new((page_t*) page));
3010 --- a/storage/innobase/row/row0ins.c
3011 +++ b/storage/innobase/row/row0ins.c
3012-@@ -1335,6 +1335,12 @@
3013+@@ -1338,6 +1338,12 @@
3014 const rec_t* rec = btr_pcur_get_rec(&pcur);
3015 const buf_block_t* block = btr_pcur_get_block(&pcur);
3016
3017@@ -1308,7 +1308,7 @@
3018
3019 --- a/storage/innobase/row/row0sel.c
3020 +++ b/storage/innobase/row/row0sel.c
3021-@@ -3894,6 +3894,13 @@
3022+@@ -3912,6 +3912,13 @@
3023 /* PHASE 4: Look for matching records in a loop */
3024
3025 rec = btr_pcur_get_rec(pcur);
3026@@ -1322,7 +1322,7 @@
3027 ut_ad(!!page_rec_is_comp(rec) == comp);
3028 #ifdef UNIV_SEARCH_DEBUG
3029 /*
3030-@@ -3971,7 +3978,13 @@
3031+@@ -3989,7 +3996,13 @@
3032 if (UNIV_UNLIKELY(next_offs >= UNIV_PAGE_SIZE - PAGE_DIR)) {
3033
3034 wrong_offs:
3035@@ -1337,7 +1337,7 @@
3036 ut_print_timestamp(stderr);
3037 buf_page_print(page_align(rec), 0);
3038 fprintf(stderr,
3039-@@ -4022,7 +4035,8 @@
3040+@@ -4040,7 +4053,8 @@
3041
3042 offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap);
3043
3044
3045=== modified file 'patches/innodb_recovery_patches.patch'
3046--- patches/innodb_recovery_patches.patch 2011-09-21 09:20:58 +0000
3047+++ patches/innodb_recovery_patches.patch 2011-11-02 10:38:52 +0000
3048@@ -115,7 +115,7 @@
3049 static my_bool innobase_locks_unsafe_for_binlog = FALSE;
3050 static my_bool innobase_overwrite_relay_log_info = FALSE;
3051 static my_bool innobase_rollback_on_timeout = FALSE;
3052-@@ -2583,6 +2584,8 @@
3053+@@ -2610,6 +2611,8 @@
3054
3055 srv_force_recovery = (ulint) innobase_force_recovery;
3056
3057@@ -124,7 +124,7 @@
3058 srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
3059 srv_use_checksums = (ibool) innobase_use_checksums;
3060
3061-@@ -11275,6 +11278,11 @@
3062+@@ -11382,6 +11385,11 @@
3063 "The common part for InnoDB table spaces.",
3064 NULL, NULL, NULL);
3065
3066@@ -136,7 +136,7 @@
3067 static MYSQL_SYSVAR_BOOL(recovery_update_relay_log, innobase_overwrite_relay_log_info,
3068 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
3069 "During InnoDB crash recovery on slave overwrite relay-log.info "
3070-@@ -11758,6 +11766,7 @@
3071+@@ -11896,6 +11904,7 @@
3072 MYSQL_SYSVAR(data_file_path),
3073 MYSQL_SYSVAR(data_home_dir),
3074 MYSQL_SYSVAR(doublewrite),
3075
3076=== modified file 'patches/innodb_separate_doublewrite.patch'
3077--- patches/innodb_separate_doublewrite.patch 2011-10-10 14:35:27 +0000
3078+++ patches/innodb_separate_doublewrite.patch 2011-11-02 10:38:52 +0000
3079@@ -7,7 +7,7 @@
3080 # should be done or reviewed by the maintainer!
3081 --- a/storage/innobase/buf/buf0buf.c
3082 +++ b/storage/innobase/buf/buf0buf.c
3083-@@ -3814,7 +3814,8 @@
3084+@@ -3868,7 +3868,8 @@
3085 read_space_id = mach_read_from_4(
3086 frame + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
3087
3088@@ -71,7 +71,7 @@
3089
3090
3091 /** Following are six InnoDB system tables */
3092-@@ -811,7 +812,7 @@
3093+@@ -816,7 +817,7 @@
3094
3095 mtr_commit(&mtr);
3096
3097@@ -80,7 +80,7 @@
3098 /* The system tablespace always exists. */
3099 } else if (in_crash_recovery) {
3100 /* Check that the tablespace (the .ibd file) really
3101-@@ -1682,7 +1683,7 @@
3102+@@ -1727,7 +1728,7 @@
3103 space = mach_read_from_4(field);
3104
3105 /* Check if the tablespace exists and has the right name */
3106@@ -89,7 +89,7 @@
3107 flags = dict_sys_tables_get_flags(rec);
3108
3109 if (UNIV_UNLIKELY(flags == ULINT_UNDEFINED)) {
3110-@@ -1835,7 +1836,7 @@
3111+@@ -1880,7 +1881,7 @@
3112 goto err_exit;
3113 }
3114
3115@@ -341,7 +341,7 @@
3116
3117 /* The highest file format being used in the database. The value can be
3118 set by user, however, it will be adjusted to the newer file format if
3119-@@ -2481,6 +2482,8 @@
3120+@@ -2508,6 +2509,8 @@
3121 goto error;
3122 }
3123
3124@@ -350,7 +350,7 @@
3125 srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table;
3126
3127 /* -------------- Log files ---------------------------*/
3128-@@ -11651,6 +11654,11 @@
3129+@@ -11763,6 +11766,11 @@
3130 "Path to individual files and their sizes.",
3131 NULL, NULL, NULL);
3132
3133@@ -362,7 +362,7 @@
3134 static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
3135 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
3136 "The AUTOINC lock modes supported by InnoDB: "
3137-@@ -11830,6 +11838,7 @@
3138+@@ -11968,6 +11976,7 @@
3139 MYSQL_SYSVAR(commit_concurrency),
3140 MYSQL_SYSVAR(concurrency_tickets),
3141 MYSQL_SYSVAR(data_file_path),
3142@@ -506,7 +506,7 @@
3143 UNIV_INLINE
3144 --- a/storage/innobase/row/row0mysql.c
3145 +++ b/storage/innobase/row/row0mysql.c
3146-@@ -3425,7 +3425,7 @@
3147+@@ -3436,7 +3436,7 @@
3148 /* Do not drop possible .ibd tablespace if something went
3149 wrong: we do not want to delete valuable data of the user */
3150
3151
3152=== modified file 'patches/innodb_show_lock_name.patch'
3153--- patches/innodb_show_lock_name.patch 2011-09-21 09:20:58 +0000
3154+++ patches/innodb_show_lock_name.patch 2011-11-02 10:38:52 +0000
3155@@ -7,7 +7,7 @@
3156 # should be done or reviewed by the maintainer!
3157 --- a/storage/innobase/handler/ha_innodb.cc
3158 +++ b/storage/innobase/handler/ha_innodb.cc
3159-@@ -9594,9 +9594,8 @@
3160+@@ -9701,9 +9701,8 @@
3161 rw_lock_wait_time += mutex->lspent_time;
3162 }
3163 #else /* UNIV_DEBUG */
3164@@ -19,7 +19,7 @@
3165 buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu",
3166 (ulong) mutex->count_os_wait);
3167
3168-@@ -9611,10 +9610,8 @@
3169+@@ -9718,10 +9717,8 @@
3170
3171 if (block_mutex) {
3172 buf1len = (uint) my_snprintf(buf1, sizeof buf1,
3173@@ -32,7 +32,7 @@
3174 buf2len = (uint) my_snprintf(buf2, sizeof buf2,
3175 "os_waits=%lu",
3176 (ulong) block_mutex_oswait_count);
3177-@@ -9643,9 +9640,8 @@
3178+@@ -9750,9 +9747,8 @@
3179 continue;
3180 }
3181
3182@@ -44,7 +44,7 @@
3183 buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu",
3184 (ulong) lock->count_os_wait);
3185
3186-@@ -9659,10 +9655,8 @@
3187+@@ -9766,10 +9762,8 @@
3188
3189 if (block_lock) {
3190 buf1len = (uint) my_snprintf(buf1, sizeof buf1,
3191@@ -244,7 +244,7 @@
3192 /******************************************************************//**
3193 NOTE! Please use the corresponding macro mutex_enter(), not directly
3194 this function!
3195-@@ -733,9 +733,9 @@
3196+@@ -729,9 +729,9 @@
3197 ulint line; /*!< Line where the mutex was locked */
3198 ulint level; /*!< Level in the global latching order */
3199 #endif /* UNIV_SYNC_DEBUG */
3200@@ -255,7 +255,7 @@
3201 os_thread_id_t thread_id; /*!< The thread id of the thread
3202 which locked the mutex. */
3203 ulint magic_n; /*!< MUTEX_MAGIC_N */
3204-@@ -750,9 +750,9 @@
3205+@@ -746,9 +746,9 @@
3206 ulong count_os_yield; /*!< count of os_wait */
3207 ulonglong lspent_time; /*!< mutex os_wait timer msec */
3208 ulonglong lmax_spent_time;/*!< mutex os_wait timer msec */
3209@@ -268,7 +268,7 @@
3210 instrumentation hook */
3211 --- a/storage/innobase/include/sync0sync.ic
3212 +++ b/storage/innobase/include/sync0sync.ic
3213-@@ -321,13 +321,13 @@
3214+@@ -320,13 +320,13 @@
3215 mysql_pfs_key_t key, /*!< in: Performance Schema key */
3216 mutex_t* mutex, /*!< in: pointer to memory */
3217 # ifdef UNIV_DEBUG
3218@@ -285,7 +285,7 @@
3219 {
3220 mutex->pfs_psi = (PSI_server && PFS_IS_INSTRUMENTED(key))
3221 ? PSI_server->init_mutex(key, mutex)
3222-@@ -335,13 +335,13 @@
3223+@@ -334,13 +334,13 @@
3224
3225 mutex_create_func(mutex,
3226 # ifdef UNIV_DEBUG
3227
3228=== modified file 'patches/innodb_show_status.patch'
3229--- patches/innodb_show_status.patch 2011-09-21 09:20:58 +0000
3230+++ patches/innodb_show_status.patch 2011-11-02 10:38:52 +0000
3231@@ -7,7 +7,7 @@
3232 # should be done or reviewed by the maintainer!
3233 --- a/storage/innobase/buf/buf0buf.c
3234 +++ b/storage/innobase/buf/buf0buf.c
3235-@@ -4369,6 +4369,7 @@
3236+@@ -4426,6 +4426,7 @@
3237 }
3238
3239 total_info->pool_size += pool_info->pool_size;
3240@@ -15,7 +15,7 @@
3241 total_info->lru_len += pool_info->lru_len;
3242 total_info->old_lru_len += pool_info->old_lru_len;
3243 total_info->free_list_len += pool_info->free_list_len;
3244-@@ -4434,6 +4435,8 @@
3245+@@ -4491,6 +4492,8 @@
3246
3247 pool_info->pool_size = buf_pool->curr_size;
3248
3249@@ -24,7 +24,7 @@
3250 pool_info->lru_len = UT_LIST_GET_LEN(buf_pool->LRU);
3251
3252 pool_info->old_lru_len = buf_pool->LRU_old_len;
3253-@@ -4555,14 +4558,16 @@
3254+@@ -4612,14 +4615,16 @@
3255 ut_ad(pool_info);
3256
3257 fprintf(file,
3258@@ -101,7 +101,7 @@
3259 {"buffer_pool_pages_free",
3260 (char*) &export_vars.innodb_buffer_pool_pages_free, SHOW_LONG},
3261 #ifdef UNIV_DEBUG
3262-@@ -11087,6 +11089,16 @@
3263+@@ -11199,6 +11201,16 @@
3264 "Force InnoDB to not use next-key locking, to use only row-level locking.",
3265 NULL, NULL, FALSE);
3266
3267@@ -118,7 +118,7 @@
3268 #ifdef UNIV_LOG_ARCHIVE
3269 static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir,
3270 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
3271-@@ -11274,7 +11286,7 @@
3272+@@ -11386,7 +11398,7 @@
3273
3274 static MYSQL_SYSVAR_STR(version, innodb_version_str,
3275 PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY,
3276@@ -127,7 +127,7 @@
3277
3278 static MYSQL_SYSVAR_BOOL(use_sys_malloc, srv_use_sys_malloc,
3279 PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
3280-@@ -11373,6 +11385,8 @@
3281+@@ -11486,6 +11498,8 @@
3282 MYSQL_SYSVAR(thread_concurrency),
3283 MYSQL_SYSVAR(thread_sleep_delay),
3284 MYSQL_SYSVAR(autoinc_lock_mode),
3285@@ -178,9 +178,9 @@
3286 Create a consistent cursor view for mysql to be used in cursors. In this
3287 --- a/storage/innobase/include/srv0srv.h
3288 +++ b/storage/innobase/include/srv0srv.h
3289-@@ -142,6 +142,9 @@
3290- extern char srv_adaptive_flushing;
3291-
3292+@@ -146,6 +146,9 @@
3293+ corrupted index and table */
3294+ extern my_bool srv_load_corrupted;
3295
3296 +extern ulint srv_show_locks_held;
3297 +extern ulint srv_show_verbose_locks;
3298@@ -188,7 +188,7 @@
3299 /* The sort order table of the MySQL latin1_swedish_ci character set
3300 collation */
3301 extern const byte* srv_latin1_ordering;
3302-@@ -324,6 +327,8 @@
3303+@@ -328,6 +331,8 @@
3304 buffer pool to disk */
3305 extern ulint srv_buf_pool_flushed;
3306
3307@@ -197,7 +197,7 @@
3308 /** Number of buffer pool reads that led to the
3309 reading of a disk page */
3310 extern ulint srv_buf_pool_reads;
3311-@@ -703,6 +708,7 @@
3312+@@ -707,6 +712,7 @@
3313 ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */
3314 ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */
3315 ulint innodb_buffer_pool_pages_flushed; /*!< srv_buf_pool_flushed */
3316
3317=== modified file 'patches/innodb_show_status_extend.patch'
3318--- patches/innodb_show_status_extend.patch 2011-10-10 14:35:27 +0000
3319+++ patches/innodb_show_status_extend.patch 2011-11-02 10:38:52 +0000
3320@@ -240,7 +240,7 @@
3321 /** The lock system */
3322 --- a/storage/innobase/include/srv0srv.h
3323 +++ b/storage/innobase/include/srv0srv.h
3324-@@ -735,6 +735,11 @@
3325+@@ -739,6 +739,11 @@
3326
3327 /** Status variables to be passed to MySQL */
3328 struct export_var_struct{
3329@@ -252,7 +252,7 @@
3330 ulint innodb_data_pending_reads; /*!< Pending reads */
3331 ulint innodb_data_pending_writes; /*!< Pending writes */
3332 ulint innodb_data_pending_fsyncs; /*!< Pending fsyncs */
3333-@@ -752,6 +757,9 @@
3334+@@ -756,6 +761,9 @@
3335 #ifdef UNIV_DEBUG
3336 ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */
3337 #endif /* UNIV_DEBUG */
3338@@ -262,7 +262,7 @@
3339 ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */
3340 ulint innodb_buffer_pool_reads; /*!< srv_buf_pool_reads */
3341 ulint innodb_buffer_pool_wait_free; /*!< srv_buf_pool_wait_free */
3342-@@ -761,13 +769,43 @@
3343+@@ -765,13 +773,43 @@
3344 ulint innodb_buffer_pool_read_ahead_rnd;/*!< srv_read_ahead_rnd */
3345 ulint innodb_buffer_pool_read_ahead; /*!< srv_read_ahead */
3346 ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/
3347@@ -306,7 +306,7 @@
3348 ulint innodb_os_log_written; /*!< srv_os_log_written */
3349 ulint innodb_os_log_fsyncs; /*!< fil_n_log_flushes */
3350 ulint innodb_os_log_pending_writes; /*!< srv_os_log_pending_writes */
3351-@@ -776,6 +814,8 @@
3352+@@ -780,6 +818,8 @@
3353 ulint innodb_pages_created; /*!< buf_pool->stat.n_pages_created */
3354 ulint innodb_pages_read; /*!< buf_pool->stat.n_pages_read */
3355 ulint innodb_pages_written; /*!< buf_pool->stat.n_pages_written */
3356@@ -315,7 +315,7 @@
3357 ulint innodb_row_lock_waits; /*!< srv_n_lock_wait_count */
3358 ulint innodb_row_lock_current_waits; /*!< srv_n_lock_wait_current_count */
3359 ib_int64_t innodb_row_lock_time; /*!< srv_n_lock_wait_time
3360-@@ -785,11 +825,18 @@
3361+@@ -789,11 +829,18 @@
3362 / srv_n_lock_wait_count */
3363 ulint innodb_row_lock_time_max; /*!< srv_n_lock_max_wait_time
3364 / 1000 */
3365@@ -336,7 +336,7 @@
3366 /** Thread slot in the thread table */
3367 --- a/storage/innobase/include/sync0sync.h
3368 +++ b/storage/innobase/include/sync0sync.h
3369-@@ -771,6 +771,10 @@
3370+@@ -767,6 +767,10 @@
3371
3372 #define SYNC_SPIN_ROUNDS srv_n_spin_wait_rounds
3373
3374
3375=== modified file 'patches/innodb_show_sys_tables.patch'
3376--- patches/innodb_show_sys_tables.patch 2011-09-21 09:20:58 +0000
3377+++ patches/innodb_show_sys_tables.patch 2011-11-02 10:38:52 +0000
3378@@ -7,7 +7,7 @@
3379 # should be done or reviewed by the maintainer!
3380 --- a/storage/innobase/dict/dict0load.c
3381 +++ b/storage/innobase/dict/dict0load.c
3382-@@ -437,7 +437,7 @@
3383+@@ -442,7 +442,7 @@
3384
3385 }
3386
3387@@ -16,7 +16,7 @@
3388 /********************************************************************//**
3389 This function parses a SYS_FOREIGN record and populate a dict_foreign_t
3390 structure with the information from the record. For detail information
3391-@@ -513,9 +513,9 @@
3392+@@ -518,9 +518,9 @@
3393
3394 return(NULL);
3395 }
3396@@ -28,7 +28,7 @@
3397 /********************************************************************//**
3398 This function parses a SYS_FOREIGN_COLS record and extract necessary
3399 information from the record and return to caller.
3400-@@ -579,7 +579,7 @@
3401+@@ -584,7 +584,7 @@
3402
3403 return(NULL);
3404 }
3405@@ -39,7 +39,7 @@
3406 Determine the flags of a table described in SYS_TABLES.
3407 --- a/storage/innobase/handler/ha_innodb.cc
3408 +++ b/storage/innobase/handler/ha_innodb.cc
3409-@@ -11786,7 +11786,14 @@
3410+@@ -11925,7 +11925,14 @@
3411 i_s_innodb_cmp,
3412 i_s_innodb_cmp_reset,
3413 i_s_innodb_cmpmem,
3414
3415=== modified file 'patches/innodb_split_buf_pool_mutex.patch'
3416--- patches/innodb_split_buf_pool_mutex.patch 2011-09-21 09:20:58 +0000
3417+++ patches/innodb_split_buf_pool_mutex.patch 2011-11-02 10:38:52 +0000
3418@@ -7,7 +7,7 @@
3419 # should be done or reviewed by the maintainer!
3420 --- a/storage/innobase/btr/btr0cur.c
3421 +++ b/storage/innobase/btr/btr0cur.c
3422-@@ -4142,7 +4142,8 @@
3423+@@ -4091,7 +4091,8 @@
3424
3425 mtr_commit(mtr);
3426
3427@@ -17,7 +17,7 @@
3428 mutex_enter(&block->mutex);
3429
3430 /* Only free the block if it is still allocated to
3431-@@ -4153,16 +4154,21 @@
3432+@@ -4102,16 +4103,21 @@
3433 && buf_block_get_space(block) == space
3434 && buf_block_get_page_no(block) == page_no) {
3435
3436@@ -45,7 +45,7 @@
3437
3438 --- a/storage/innobase/btr/btr0sea.c
3439 +++ b/storage/innobase/btr/btr0sea.c
3440-@@ -1943,7 +1943,7 @@
3441+@@ -1944,7 +1944,7 @@
3442 rec_offs_init(offsets_);
3443
3444 rw_lock_x_lock(&btr_search_latch);
3445@@ -54,7 +54,7 @@
3446
3447 cell_count = hash_get_n_cells(btr_search_sys->hash_index);
3448
3449-@@ -1951,11 +1951,11 @@
3450+@@ -1952,11 +1952,11 @@
3451 /* We release btr_search_latch every once in a while to
3452 give other queries a chance to run. */
3453 if ((i != 0) && ((i % chunk_size) == 0)) {
3454@@ -68,7 +68,7 @@
3455 }
3456
3457 node = hash_get_nth_cell(btr_search_sys->hash_index, i)->node;
3458-@@ -2066,11 +2066,11 @@
3459+@@ -2067,11 +2067,11 @@
3460 /* We release btr_search_latch every once in a while to
3461 give other queries a chance to run. */
3462 if (i != 0) {
3463@@ -82,7 +82,7 @@
3464 }
3465
3466 if (!ha_validate(btr_search_sys->hash_index, i, end_index)) {
3467-@@ -2078,7 +2078,7 @@
3468+@@ -2079,7 +2079,7 @@
3469 }
3470 }
3471
3472@@ -283,7 +283,7 @@
3473 {
3474 buf_page_t* bpage;
3475 const ulint size = BUF_BUDDY_LOW << i;
3476-@@ -335,13 +362,20 @@
3477+@@ -334,13 +361,20 @@
3478 ulint space;
3479 ulint page_no;
3480
3481@@ -305,7 +305,7 @@
3482 /* We assume that all memory from buf_buddy_alloc()
3483 is used for compressed page frames. */
3484
3485-@@ -375,6 +409,11 @@
3486+@@ -374,6 +408,11 @@
3487 added to buf_pool->page_hash yet. Obviously,
3488 it cannot be relocated. */
3489
3490@@ -317,7 +317,7 @@
3491 return(FALSE);
3492 }
3493
3494-@@ -384,18 +423,27 @@
3495+@@ -383,18 +422,27 @@
3496 For the sake of simplicity, give up. */
3497 ut_ad(page_zip_get_size(&bpage->zip) < size);
3498
3499@@ -346,8 +346,8 @@
3500 - if (buf_page_can_relocate(bpage)) {
3501 + if (mutex && buf_page_can_relocate(bpage)) {
3502 /* Relocate the compressed page. */
3503+ ullint usec = ut_time_us(NULL);
3504 ut_a(bpage->zip.data == src);
3505- memcpy(dst, src, size);
3506 @@ -409,10 +457,22 @@
3507 buddy_stat->relocated_usec
3508 += ut_time_us(NULL) - usec;
3509@@ -1249,10 +1249,10 @@
3510
3511 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
3512 ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
3513-@@ -3030,7 +3187,10 @@
3514+@@ -3031,7 +3188,10 @@
3515 buf_page_t* hash_page;
3516- buf_pool_t* buf_pool = buf_pool_get(space, offset);
3517
3518+ ut_ad(buf_pool == buf_pool_get(space, offset));
3519 - ut_ad(buf_pool_mutex_own(buf_pool));
3520 + //ut_ad(buf_pool_mutex_own(buf_pool));
3521 +#ifdef UNIV_SYNC_DEBUG
3522@@ -1261,7 +1261,7 @@
3523 ut_ad(mutex_own(&(block->mutex)));
3524 ut_a(buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE);
3525
3526-@@ -3059,11 +3219,14 @@
3527+@@ -3060,11 +3220,14 @@
3528 if (UNIV_LIKELY(!hash_page)) {
3529 } else if (buf_pool_watch_is_sentinel(buf_pool, hash_page)) {
3530 /* Preserve the reference count. */
3531@@ -1277,7 +1277,7 @@
3532 } else {
3533 fprintf(stderr,
3534 "InnoDB: Error: page %lu %lu already found"
3535-@@ -3073,7 +3236,8 @@
3536+@@ -3074,7 +3237,8 @@
3537 (const void*) hash_page, (const void*) block);
3538 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
3539 mutex_exit(&block->mutex);
3540@@ -1287,7 +1287,7 @@
3541 buf_print();
3542 buf_LRU_print();
3543 buf_validate();
3544-@@ -3156,7 +3320,9 @@
3545+@@ -3157,7 +3321,9 @@
3546
3547 fold = buf_page_address_fold(space, offset);
3548
3549@@ -1298,7 +1298,7 @@
3550
3551 watch_page = buf_page_hash_get_low(buf_pool, space, offset, fold);
3552 if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) {
3553-@@ -3165,9 +3331,15 @@
3554+@@ -3166,9 +3332,15 @@
3555 err_exit:
3556 if (block) {
3557 mutex_enter(&block->mutex);
3558@@ -1315,16 +1315,16 @@
3559
3560 bpage = NULL;
3561 goto func_exit;
3562-@@ -3190,6 +3362,8 @@
3563+@@ -3191,6 +3363,8 @@
3564
3565- buf_page_init(space, offset, fold, block);
3566+ buf_page_init(buf_pool, space, offset, fold, block);
3567
3568 + rw_lock_x_unlock(&buf_pool->page_hash_latch);
3569 +
3570 /* The block must be put to the LRU list, to the old blocks */
3571 buf_LRU_add_block(bpage, TRUE/* to old blocks */);
3572
3573-@@ -3217,7 +3391,7 @@
3574+@@ -3218,7 +3392,7 @@
3575 been added to buf_pool->LRU and
3576 buf_pool->page_hash. */
3577 mutex_exit(&block->mutex);
3578@@ -1333,7 +1333,7 @@
3579 mutex_enter(&block->mutex);
3580 block->page.zip.data = data;
3581
3582-@@ -3230,13 +3404,14 @@
3583+@@ -3231,13 +3405,14 @@
3584 buf_unzip_LRU_add_block(block, TRUE);
3585 }
3586
3587@@ -1349,7 +1349,7 @@
3588
3589 /* If buf_buddy_alloc() allocated storage from the LRU list,
3590 it released and reacquired buf_pool->mutex. Thus, we must
3591-@@ -3252,7 +3427,10 @@
3592+@@ -3253,7 +3428,10 @@
3593
3594 /* The block was added by some other thread. */
3595 watch_page = NULL;
3596@@ -1361,7 +1361,7 @@
3597
3598 bpage = NULL;
3599 goto func_exit;
3600-@@ -3300,20 +3478,26 @@
3601+@@ -3301,20 +3479,26 @@
3602 HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold,
3603 bpage);
3604
3605@@ -1389,7 +1389,7 @@
3606
3607 if (mode == BUF_READ_IBUF_PAGES_ONLY) {
3608
3609-@@ -3355,7 +3539,9 @@
3610+@@ -3356,7 +3540,9 @@
3611
3612 fold = buf_page_address_fold(space, offset);
3613
3614@@ -1400,7 +1400,7 @@
3615
3616 block = (buf_block_t*) buf_page_hash_get_low(
3617 buf_pool, space, offset, fold);
3618-@@ -3371,7 +3557,9 @@
3619+@@ -3372,7 +3558,9 @@
3620 #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
3621
3622 /* Page can be found in buf_pool */
3623@@ -1411,15 +1411,15 @@
3624
3625 buf_block_free(free_block);
3626
3627-@@ -3393,6 +3581,7 @@
3628+@@ -3394,6 +3582,7 @@
3629 mutex_enter(&block->mutex);
3630
3631- buf_page_init(space, offset, fold, block);
3632+ buf_page_init(buf_pool, space, offset, fold, block);
3633 + rw_lock_x_unlock(&buf_pool->page_hash_latch);
3634
3635 /* The block must be put to the LRU list */
3636 buf_LRU_add_block(&block->page, FALSE);
3637-@@ -3419,7 +3608,7 @@
3638+@@ -3420,7 +3609,7 @@
3639 the reacquisition of buf_pool->mutex. We also must
3640 defer this operation until after the block descriptor
3641 has been added to buf_pool->LRU and buf_pool->page_hash. */
3642@@ -1428,7 +1428,7 @@
3643 mutex_enter(&block->mutex);
3644 block->page.zip.data = data;
3645
3646-@@ -3437,7 +3626,8 @@
3647+@@ -3438,7 +3627,8 @@
3648
3649 buf_page_set_accessed(&block->page, time_ms);
3650
3651@@ -1438,7 +1438,35 @@
3652
3653 mtr_memo_push(mtr, block, MTR_MEMO_BUF_FIX);
3654
3655-@@ -3488,6 +3678,8 @@
3656+@@ -3493,7 +3683,9 @@
3657+ ibool ret = TRUE;
3658+
3659+ /* First unfix and release lock on the bpage */
3660+- buf_pool_mutex_enter(buf_pool);
3661++ //buf_pool_mutex_enter(buf_pool);
3662++ mutex_enter(&buf_pool->LRU_list_mutex);
3663++ rw_lock_x_lock(&buf_pool->page_hash_latch);
3664+ mutex_enter(buf_page_get_mutex(bpage));
3665+ ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_READ);
3666+ ut_ad(bpage->buf_fix_count == 0);
3667+@@ -3514,11 +3706,15 @@
3668+ ret = FALSE;
3669+ }
3670+
3671++ buf_pool_mutex_enter(buf_pool);
3672+ ut_ad(buf_pool->n_pend_reads > 0);
3673+ buf_pool->n_pend_reads--;
3674++ buf_pool_mutex_exit(buf_pool);
3675+
3676+ mutex_exit(buf_page_get_mutex(bpage));
3677+- buf_pool_mutex_exit(buf_pool);
3678++ //buf_pool_mutex_exit(buf_pool);
3679++ mutex_exit(&buf_pool->LRU_list_mutex);
3680++ rw_lock_x_unlock(&buf_pool->page_hash_latch);
3681+
3682+ return(ret);
3683+ }
3684+@@ -3536,6 +3732,8 @@
3685 buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
3686 const ibool uncompressed = (buf_page_get_state(bpage)
3687 == BUF_BLOCK_FILE_PAGE);
3688@@ -1447,7 +1475,7 @@
3689
3690 ut_a(buf_page_in_file(bpage));
3691
3692-@@ -3621,8 +3813,26 @@
3693+@@ -3678,8 +3876,26 @@
3694 }
3695 }
3696
3697@@ -1475,7 +1503,7 @@
3698
3699 #ifdef UNIV_IBUF_COUNT_DEBUG
3700 if (io_type == BUF_IO_WRITE || uncompressed) {
3701-@@ -3645,6 +3855,7 @@
3702+@@ -3702,6 +3918,7 @@
3703 the x-latch to this OS thread: do not let this confuse you in
3704 debugging! */
3705
3706@@ -1483,7 +1511,7 @@
3707 ut_ad(buf_pool->n_pend_reads > 0);
3708 buf_pool->n_pend_reads--;
3709 buf_pool->stat.n_pages_read++;
3710-@@ -3662,6 +3873,9 @@
3711+@@ -3719,6 +3936,9 @@
3712
3713 buf_flush_write_complete(bpage);
3714
3715@@ -1493,7 +1521,7 @@
3716 if (uncompressed) {
3717 rw_lock_s_unlock_gen(&((buf_block_t*) bpage)->lock,
3718 BUF_IO_WRITE);
3719-@@ -3684,8 +3898,8 @@
3720+@@ -3741,8 +3961,8 @@
3721 }
3722 #endif /* UNIV_DEBUG */
3723
3724@@ -1503,7 +1531,7 @@
3725 }
3726
3727 /*********************************************************************//**
3728-@@ -3702,7 +3916,9 @@
3729+@@ -3759,7 +3979,9 @@
3730
3731 ut_ad(buf_pool);
3732
3733@@ -1514,7 +1542,7 @@
3734
3735 chunk = buf_pool->chunks;
3736
3737-@@ -3719,7 +3935,9 @@
3738+@@ -3776,7 +3998,9 @@
3739 }
3740 }
3741
3742@@ -1525,7 +1553,7 @@
3743
3744 return(TRUE);
3745 }
3746-@@ -3767,7 +3985,8 @@
3747+@@ -3824,7 +4048,8 @@
3748 freed = buf_LRU_search_and_free_block(buf_pool, 100);
3749 }
3750
3751@@ -1535,7 +1563,7 @@
3752
3753 ut_ad(UT_LIST_GET_LEN(buf_pool->LRU) == 0);
3754 ut_ad(UT_LIST_GET_LEN(buf_pool->unzip_LRU) == 0);
3755-@@ -3780,7 +3999,8 @@
3756+@@ -3837,7 +4062,8 @@
3757 memset(&buf_pool->stat, 0x00, sizeof(buf_pool->stat));
3758 buf_refresh_io_stats(buf_pool);
3759
3760@@ -1545,7 +1573,7 @@
3761 }
3762
3763 /*********************************************************************//**
3764-@@ -3822,7 +4042,10 @@
3765+@@ -3879,7 +4105,10 @@
3766
3767 ut_ad(buf_pool);
3768
3769@@ -1557,7 +1585,7 @@
3770
3771 chunk = buf_pool->chunks;
3772
3773-@@ -3917,7 +4140,7 @@
3774+@@ -3974,7 +4203,7 @@
3775 /* Check clean compressed-only blocks. */
3776
3777 for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
3778@@ -1566,7 +1594,7 @@
3779 ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE);
3780 switch (buf_page_get_io_fix(b)) {
3781 case BUF_IO_NONE:
3782-@@ -3948,7 +4171,7 @@
3783+@@ -4005,7 +4234,7 @@
3784
3785 buf_flush_list_mutex_enter(buf_pool);
3786 for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b;
3787@@ -1575,7 +1603,7 @@
3788 ut_ad(b->in_flush_list);
3789 ut_a(b->oldest_modification);
3790 n_flush++;
3791-@@ -4007,6 +4230,8 @@
3792+@@ -4064,6 +4293,8 @@
3793 }
3794
3795 ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == n_lru);
3796@@ -1584,7 +1612,7 @@
3797 if (UT_LIST_GET_LEN(buf_pool->free) != n_free) {
3798 fprintf(stderr, "Free list len %lu, free blocks %lu\n",
3799 (ulong) UT_LIST_GET_LEN(buf_pool->free),
3800-@@ -4017,8 +4242,11 @@
3801+@@ -4074,8 +4305,11 @@
3802 ut_a(buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE] == n_single_flush);
3803 ut_a(buf_pool->n_flush[BUF_FLUSH_LIST] == n_list_flush);
3804 ut_a(buf_pool->n_flush[BUF_FLUSH_LRU] == n_lru_flush);
3805@@ -1597,7 +1625,7 @@
3806
3807 ut_a(buf_LRU_validate());
3808 ut_a(buf_flush_validate(buf_pool));
3809-@@ -4074,7 +4302,9 @@
3810+@@ -4131,7 +4365,9 @@
3811 index_ids = mem_alloc(size * sizeof *index_ids);
3812 counts = mem_alloc(sizeof(ulint) * size);
3813
3814@@ -1608,7 +1636,7 @@
3815 buf_flush_list_mutex_enter(buf_pool);
3816
3817 fprintf(stderr,
3818-@@ -4143,7 +4373,9 @@
3819+@@ -4200,7 +4436,9 @@
3820 }
3821 }
3822
3823@@ -1619,7 +1647,7 @@
3824
3825 for (i = 0; i < n_found; i++) {
3826 index = dict_index_get_if_in_cache(index_ids[i]);
3827-@@ -4200,7 +4432,7 @@
3828+@@ -4257,7 +4495,7 @@
3829 buf_chunk_t* chunk;
3830 ulint fixed_pages_number = 0;
3831
3832@@ -1628,7 +1656,7 @@
3833
3834 chunk = buf_pool->chunks;
3835
3836-@@ -4234,7 +4466,7 @@
3837+@@ -4291,7 +4529,7 @@
3838 /* Traverse the lists of clean and dirty compressed-only blocks. */
3839
3840 for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
3841@@ -1637,7 +1665,7 @@
3842 ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE);
3843 ut_a(buf_page_get_io_fix(b) != BUF_IO_WRITE);
3844
3845-@@ -4246,7 +4478,7 @@
3846+@@ -4303,7 +4541,7 @@
3847
3848 buf_flush_list_mutex_enter(buf_pool);
3849 for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b;
3850@@ -1646,7 +1674,7 @@
3851 ut_ad(b->in_flush_list);
3852
3853 switch (buf_page_get_state(b)) {
3854-@@ -4272,7 +4504,7 @@
3855+@@ -4329,7 +4567,7 @@
3856
3857 buf_flush_list_mutex_exit(buf_pool);
3858 mutex_exit(&buf_pool->zip_mutex);
3859@@ -1655,7 +1683,7 @@
3860
3861 return(fixed_pages_number);
3862 }
3863-@@ -4430,6 +4662,8 @@
3864+@@ -4487,6 +4725,8 @@
3865 /* Find appropriate pool_info to store stats for this buffer pool */
3866 pool_info = &all_pool_info[pool_id];
3867
3868@@ -1664,7 +1692,7 @@
3869 buf_pool_mutex_enter(buf_pool);
3870 buf_flush_list_mutex_enter(buf_pool);
3871
3872-@@ -4545,6 +4779,8 @@
3873+@@ -4602,6 +4842,8 @@
3874 pool_info->unzip_cur = buf_LRU_stat_cur.unzip;
3875
3876 buf_refresh_io_stats(buf_pool);
3877@@ -1673,7 +1701,7 @@
3878 buf_pool_mutex_exit(buf_pool);
3879 }
3880
3881-@@ -4789,11 +5025,13 @@
3882+@@ -4846,11 +5088,13 @@
3883 {
3884 ulint len;
3885
3886@@ -1863,7 +1891,7 @@
3887 ut_ad(buf_flush_ready_for_flush(bpage, flush_type));
3888
3889 buf_page_set_io_fix(bpage, BUF_IO_WRITE);
3890-@@ -1429,14 +1439,16 @@
3891+@@ -1453,14 +1463,16 @@
3892
3893 buf_pool = buf_pool_get(space, i);
3894
3895@@ -1879,10 +1907,10 @@
3896 - buf_pool_mutex_exit(buf_pool);
3897 + //buf_pool_mutex_exit(buf_pool);
3898 + rw_lock_s_unlock(&buf_pool->page_hash_latch);
3899- continue;
3900- }
3901-
3902-@@ -1448,11 +1460,9 @@
3903+ /* not contiguous */
3904+ if (srv_flush_neighbor_pages == 2) {
3905+ break;
3906+@@ -1476,11 +1488,9 @@
3907 if (flush_type != BUF_FLUSH_LRU
3908 || i == offset
3909 || buf_page_is_old(bpage)) {
3910@@ -1896,9 +1924,9 @@
3911 && (i == offset || !bpage->buf_fix_count)) {
3912 /* We only try to flush those
3913 neighbors != offset where the buf fix
3914-@@ -1468,11 +1478,12 @@
3915- ut_ad(!buf_pool_mutex_own(buf_pool));
3916+@@ -1497,11 +1507,12 @@
3917 count++;
3918+ /* contiguous */
3919 continue;
3920 - } else {
3921 + } else if (block_mutex) {
3922@@ -1908,10 +1936,10 @@
3923 - buf_pool_mutex_exit(buf_pool);
3924 + //buf_pool_mutex_exit(buf_pool);
3925 + rw_lock_s_unlock(&buf_pool->page_hash_latch);
3926- }
3927
3928- return(count);
3929-@@ -1505,21 +1516,25 @@
3930+ /* not contiguous */
3931+ if (srv_flush_neighbor_pages == 2) {
3932+@@ -1546,21 +1557,25 @@
3933 buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
3934 #endif /* UNIV_DEBUG */
3935
3936@@ -1943,7 +1971,7 @@
3937
3938 /* These fields are protected by both the
3939 buffer pool mutex and block mutex. */
3940-@@ -1535,13 +1550,18 @@
3941+@@ -1576,13 +1591,18 @@
3942 *count,
3943 n_to_flush);
3944
3945@@ -1965,7 +1993,7 @@
3946
3947 return(flushed);
3948 }
3949-@@ -1562,7 +1582,8 @@
3950+@@ -1603,7 +1623,8 @@
3951 buf_page_t* bpage;
3952 ulint count = 0;
3953
3954@@ -1975,7 +2003,7 @@
3955
3956 do {
3957 /* Start from the end of the list looking for a
3958-@@ -1584,7 +1605,8 @@
3959+@@ -1625,7 +1646,8 @@
3960 should be flushed, we factor in this value. */
3961 buf_lru_flush_page_count += count;
3962
3963@@ -1985,7 +2013,7 @@
3964
3965 return(count);
3966 }
3967-@@ -1612,9 +1634,10 @@
3968+@@ -1653,9 +1675,10 @@
3969 {
3970 ulint len;
3971 buf_page_t* bpage;
3972@@ -1997,7 +2025,7 @@
3973
3974 /* If we have flushed enough, leave the loop */
3975 do {
3976-@@ -1633,6 +1656,7 @@
3977+@@ -1674,6 +1697,7 @@
3978
3979 if (bpage) {
3980 ut_a(bpage->oldest_modification > 0);
3981@@ -2005,7 +2033,7 @@
3982 }
3983
3984 if (!bpage || bpage->oldest_modification >= lsn_limit) {
3985-@@ -1674,9 +1698,17 @@
3986+@@ -1715,9 +1739,17 @@
3987 break;
3988 }
3989
3990@@ -2025,7 +2053,7 @@
3991
3992 buf_flush_list_mutex_exit(buf_pool);
3993
3994-@@ -1685,7 +1717,7 @@
3995+@@ -1726,7 +1758,7 @@
3996
3997 } while (count < min_n && bpage != NULL && len > 0);
3998
3999@@ -2034,7 +2062,7 @@
4000
4001 return(count);
4002 }
4003-@@ -1724,13 +1756,15 @@
4004+@@ -1765,13 +1797,15 @@
4005 || sync_thread_levels_empty_except_dict());
4006 #endif /* UNIV_SYNC_DEBUG */
4007
4008@@ -2051,7 +2079,7 @@
4009 break;
4010 case BUF_FLUSH_LIST:
4011 count = buf_flush_flush_list_batch(buf_pool, min_n, lsn_limit);
4012-@@ -1739,7 +1773,7 @@
4013+@@ -1780,7 +1814,7 @@
4014 ut_error;
4015 }
4016
4017@@ -2060,7 +2088,7 @@
4018
4019 buf_flush_buffered_writes();
4020
4021-@@ -1995,7 +2029,7 @@
4022+@@ -2049,7 +2083,7 @@
4023 retry:
4024 //buf_pool_mutex_enter(buf_pool);
4025 if (have_LRU_mutex)
4026@@ -2069,7 +2097,7 @@
4027
4028 n_replaceable = UT_LIST_GET_LEN(buf_pool->free);
4029
4030-@@ -2012,15 +2046,15 @@
4031+@@ -2066,15 +2100,15 @@
4032 bpage = UT_LIST_GET_LAST(buf_pool->LRU);
4033 continue;
4034 }
4035@@ -2090,7 +2118,7 @@
4036
4037 distance++;
4038
4039-@@ -2029,7 +2063,7 @@
4040+@@ -2083,7 +2117,7 @@
4041
4042 //buf_pool_mutex_exit(buf_pool);
4043 if (have_LRU_mutex)
4044@@ -2099,7 +2127,7 @@
4045
4046 if (n_replaceable >= BUF_FLUSH_FREE_BLOCK_MARGIN(buf_pool)) {
4047
4048-@@ -2228,7 +2262,7 @@
4049+@@ -2282,7 +2316,7 @@
4050
4051 ut_ad(buf_flush_list_mutex_own(buf_pool));
4052
4053@@ -2108,7 +2136,7 @@
4054 ut_ad(ut_list_node_313->in_flush_list));
4055
4056 bpage = UT_LIST_GET_FIRST(buf_pool->flush_list);
4057-@@ -2268,7 +2302,7 @@
4058+@@ -2322,7 +2356,7 @@
4059 rnode = rbt_next(buf_pool->flush_rbt, rnode);
4060 }
4061
4062@@ -2953,8 +2981,17 @@
4063 + buf_LRU_block_free_non_file_page(block, have_page_hash_mutex);
4064 }
4065
4066- /**********************************************************************//**
4067-@@ -1909,7 +2063,8 @@
4068+ /******************************************************************//**
4069+@@ -1897,7 +2051,7 @@
4070+ {
4071+ if (buf_LRU_block_remove_hashed_page(bpage, TRUE)
4072+ != BUF_BLOCK_ZIP_FREE) {
4073+- buf_LRU_block_free_hashed_page((buf_block_t*) bpage);
4074++ buf_LRU_block_free_hashed_page((buf_block_t*) bpage, TRUE);
4075+ }
4076+ }
4077+
4078+@@ -1925,7 +2079,8 @@
4079 }
4080
4081 if (adjust) {
4082@@ -2964,7 +3001,7 @@
4083
4084 if (ratio != buf_pool->LRU_old_ratio) {
4085 buf_pool->LRU_old_ratio = ratio;
4086-@@ -1921,7 +2076,8 @@
4087+@@ -1937,7 +2092,8 @@
4088 }
4089 }
4090
4091@@ -2974,7 +3011,7 @@
4092 } else {
4093 buf_pool->LRU_old_ratio = ratio;
4094 }
4095-@@ -2026,7 +2182,8 @@
4096+@@ -2042,7 +2198,8 @@
4097 ulint new_len;
4098
4099 ut_ad(buf_pool);
4100@@ -2984,7 +3021,7 @@
4101
4102 if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) {
4103
4104-@@ -2087,16 +2244,22 @@
4105+@@ -2103,16 +2260,22 @@
4106
4107 ut_a(buf_pool->LRU_old_len == old_len);
4108
4109@@ -3009,7 +3046,7 @@
4110 UT_LIST_VALIDATE(unzip_LRU, buf_block_t, buf_pool->unzip_LRU,
4111 ut_ad(ut_list_node_313->in_unzip_LRU_list
4112 && ut_list_node_313->page.in_LRU_list));
4113-@@ -2110,7 +2273,8 @@
4114+@@ -2126,7 +2289,8 @@
4115 ut_a(buf_page_belongs_to_unzip_LRU(&block->page));
4116 }
4117
4118@@ -3019,7 +3056,7 @@
4119 }
4120
4121 /**********************************************************************//**
4122-@@ -2146,7 +2310,8 @@
4123+@@ -2162,7 +2326,8 @@
4124 const buf_page_t* bpage;
4125
4126 ut_ad(buf_pool);
4127@@ -3029,7 +3066,7 @@
4128
4129 bpage = UT_LIST_GET_FIRST(buf_pool->LRU);
4130
4131-@@ -2203,7 +2368,8 @@
4132+@@ -2219,7 +2384,8 @@
4133 bpage = UT_LIST_GET_NEXT(LRU, bpage);
4134 }
4135
4136@@ -3279,7 +3316,7 @@
4137 Creates the buffer pool.
4138 @return own: buf_pool object, NULL if not enough memory or error */
4139 UNIV_INTERN
4140-@@ -889,6 +903,15 @@
4141+@@ -864,6 +878,15 @@
4142 const buf_page_t* bpage) /*!< in: pointer to control block */
4143 __attribute__((pure));
4144
4145@@ -3295,7 +3332,7 @@
4146 /*********************************************************************//**
4147 Get the flush type of a page.
4148 @return flush type */
4149-@@ -1370,7 +1393,7 @@
4150+@@ -1345,7 +1368,7 @@
4151 All these are protected by buf_pool->mutex. */
4152 /* @{ */
4153
4154@@ -3304,7 +3341,7 @@
4155 /*!< based on state, this is a
4156 list node, protected either by
4157 buf_pool->mutex or by
4158-@@ -1398,6 +1421,10 @@
4159+@@ -1373,6 +1396,10 @@
4160 BUF_BLOCK_REMOVE_HASH or
4161 BUF_BLOCK_READY_IN_USE. */
4162
4163@@ -3315,7 +3352,7 @@
4164 #ifdef UNIV_DEBUG
4165 ibool in_flush_list; /*!< TRUE if in buf_pool->flush_list;
4166 when buf_pool->flush_list_mutex is
4167-@@ -1490,11 +1517,11 @@
4168+@@ -1465,11 +1492,11 @@
4169 a block is in the unzip_LRU list
4170 if page.state == BUF_BLOCK_FILE_PAGE
4171 and page.zip.data != NULL */
4172@@ -3329,7 +3366,7 @@
4173 mutex_t mutex; /*!< mutex protecting this block:
4174 state (also protected by the buffer
4175 pool mutex), io_fix, buf_fix_count,
4176-@@ -1671,6 +1698,11 @@
4177+@@ -1646,6 +1673,11 @@
4178 pool instance, protects compressed
4179 only pages (of type buf_page_t, not
4180 buf_block_t */
4181@@ -3341,7 +3378,7 @@
4182 ulint instance_no; /*!< Array index of this buffer
4183 pool instance */
4184 ulint old_pool_size; /*!< Old pool size in bytes */
4185-@@ -1824,8 +1856,8 @@
4186+@@ -1799,8 +1831,8 @@
4187 /** Test if a buffer pool mutex is owned. */
4188 #define buf_pool_mutex_own(b) mutex_own(&b->mutex)
4189 /** Acquire a buffer pool mutex. */
4190@@ -3529,7 +3566,7 @@
4191 && (block->page.buf_fix_count == 0))
4192 || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE));
4193 #endif /* UNIV_SYNC_DEBUG */
4194-@@ -1013,7 +1044,11 @@
4195+@@ -1026,7 +1057,11 @@
4196 buf_page_t* bpage;
4197
4198 ut_ad(buf_pool);
4199@@ -3542,7 +3579,7 @@
4200 ut_ad(fold == buf_page_address_fold(space, offset));
4201
4202 /* Look for the page in the hash table */
4203-@@ -1098,11 +1133,13 @@
4204+@@ -1111,11 +1146,13 @@
4205 const buf_page_t* bpage;
4206 buf_pool_t* buf_pool = buf_pool_get(space, offset);
4207
4208@@ -3558,7 +3595,7 @@
4209
4210 return(bpage != NULL);
4211 }
4212-@@ -1230,4 +1267,38 @@
4213+@@ -1243,4 +1280,38 @@
4214 buf_pool_mutex_exit(buf_pool);
4215 }
4216 }
4217@@ -3643,7 +3680,7 @@
4218 extern mysql_pfs_key_t cache_last_read_mutex_key;
4219 extern mysql_pfs_key_t dict_foreign_err_mutex_key;
4220 extern mysql_pfs_key_t dict_sys_mutex_key;
4221-@@ -670,7 +674,7 @@
4222+@@ -667,7 +671,7 @@
4223 #define SYNC_TRX_SYS_HEADER 290
4224 #define SYNC_PURGE_QUEUE 200
4225 #define SYNC_LOG 170
4226@@ -3652,7 +3689,7 @@
4227 #define SYNC_RECV 168
4228 #define SYNC_WORK_QUEUE 162
4229 #define SYNC_SEARCH_SYS_CONF 161 /* for assigning btr_search_enabled */
4230-@@ -680,8 +684,13 @@
4231+@@ -677,8 +681,13 @@
4232 SYNC_SEARCH_SYS, as memory allocation
4233 can call routines there! Otherwise
4234 the level is SYNC_MEM_HASH. */
4235@@ -3667,7 +3704,7 @@
4236 #define SYNC_BUF_FLUSH_LIST 145 /* Buffer flush list mutex */
4237 #define SYNC_DOUBLEWRITE 140
4238 #define SYNC_ANY_LATCH 135
4239-@@ -713,7 +722,7 @@
4240+@@ -709,7 +718,7 @@
4241 os_fast_mutex; /*!< We use this OS mutex in place of lock_word
4242 when atomic operations are not enabled */
4243 #endif
4244@@ -3731,7 +3768,7 @@
4245 }
4246
4247 /******************************************************************//**
4248-@@ -1239,7 +1249,12 @@
4249+@@ -1234,7 +1244,12 @@
4250 ut_error;
4251 }
4252 break;
4253@@ -3744,7 +3781,7 @@
4254 case SYNC_BUF_POOL:
4255 /* We can have multiple mutexes of this type therefore we
4256 can only check whether the greater than condition holds. */
4257-@@ -1257,7 +1272,8 @@
4258+@@ -1252,7 +1267,8 @@
4259 buffer block (block->mutex or buf_pool->zip_mutex). */
4260 if (!sync_thread_levels_g(array, level, FALSE)) {
4261 ut_a(sync_thread_levels_g(array, level - 1, TRUE));
4262
4263=== modified file 'patches/innodb_stats.patch'
4264--- patches/innodb_stats.patch 2011-09-21 09:20:58 +0000
4265+++ patches/innodb_stats.patch 2011-11-02 10:38:52 +0000
4266@@ -356,7 +356,7 @@
4267 }
4268
4269 return(table);
4270-@@ -4343,6 +4343,295 @@
4271+@@ -4344,6 +4344,295 @@
4272 }
4273
4274 /*********************************************************************//**
4275@@ -652,7 +652,7 @@
4276 Calculates new estimates for table and index statistics. The statistics
4277 are used in query optimization. */
4278 UNIV_INTERN
4279-@@ -4350,10 +4639,11 @@
4280+@@ -4351,10 +4640,11 @@
4281 dict_update_statistics(
4282 /*===================*/
4283 dict_table_t* table, /*!< in/out: table */
4284@@ -665,7 +665,7 @@
4285 {
4286 dict_index_t* index;
4287 ulint sum_of_index_sizes = 0;
4288-@@ -4370,6 +4660,27 @@
4289+@@ -4371,6 +4661,27 @@
4290 return;
4291 }
4292
4293@@ -693,7 +693,7 @@
4294 /* Find out the sizes of the indexes and how many different values
4295 for the key they approximately have */
4296
4297-@@ -4434,6 +4745,11 @@
4298+@@ -4435,6 +4746,11 @@
4299 index = dict_table_get_next_index(index);
4300 } while (index);
4301
4302@@ -705,7 +705,7 @@
4303 index = dict_table_get_first_index(table);
4304
4305 table->stat_n_rows = index->stat_n_diff_key_vals[
4306-@@ -4451,6 +4767,78 @@
4307+@@ -4452,6 +4768,78 @@
4308 dict_table_stats_unlock(table, RW_X_LATCH);
4309 }
4310
4311@@ -784,7 +784,7 @@
4312 /**********************************************************************//**
4313 Prints info of a foreign key constraint. */
4314 static
4315-@@ -4528,7 +4916,8 @@
4316+@@ -4529,7 +4917,8 @@
4317
4318 ut_ad(mutex_own(&(dict_sys->mutex)));
4319
4320@@ -804,9 +804,9 @@
4321 + "SYS_FOREIGN_COLS",
4322 + "SYS_STATS"
4323 };
4324- /****************************************************************//**
4325- Compare the name of an index column.
4326-@@ -343,12 +344,13 @@
4327+
4328+ /* If this flag is TRUE, then we will load the cluster index's (and tables')
4329+@@ -348,12 +349,13 @@
4330 }
4331
4332 if ((status & DICT_TABLE_UPDATE_STATS)
4333@@ -821,7 +821,7 @@
4334 }
4335
4336 return(NULL);
4337-@@ -582,6 +584,75 @@
4338+@@ -587,6 +589,75 @@
4339 //#endif /* FOREIGN_NOT_USED */
4340
4341 /********************************************************************//**
4342@@ -907,7 +907,7 @@
4343
4344
4345 static char* internal_innobase_data_file_path = NULL;
4346-@@ -2441,6 +2442,8 @@
4347+@@ -2468,6 +2469,8 @@
4348 goto error;
4349 }
4350
4351@@ -916,7 +916,7 @@
4352 /* -------------- Log files ---------------------------*/
4353
4354 /* The default dir for log files is the datadir of MySQL */
4355-@@ -5230,6 +5233,10 @@
4356+@@ -5257,6 +5260,10 @@
4357
4358 error = row_insert_for_mysql((byte*) record, prebuilt);
4359
4360@@ -927,7 +927,7 @@
4361 /* Handle duplicate key errors */
4362 if (auto_inc_used) {
4363 ulint err;
4364-@@ -5566,6 +5573,10 @@
4365+@@ -5593,6 +5600,10 @@
4366 }
4367 }
4368
4369@@ -938,7 +938,7 @@
4370 innodb_srv_conc_exit_innodb(trx);
4371
4372 error = convert_error_code_to_mysql(error,
4373-@@ -5619,6 +5630,10 @@
4374+@@ -5646,6 +5657,10 @@
4375
4376 error = row_update_for_mysql((byte*) record, prebuilt);
4377
4378@@ -949,7 +949,7 @@
4379 innodb_srv_conc_exit_innodb(trx);
4380
4381 error = convert_error_code_to_mysql(
4382-@@ -5937,6 +5952,11 @@
4383+@@ -5966,6 +5981,11 @@
4384 case DB_SUCCESS:
4385 error = 0;
4386 table->status = 0;
4387@@ -961,7 +961,7 @@
4388 break;
4389 case DB_RECORD_NOT_FOUND:
4390 error = HA_ERR_KEY_NOT_FOUND;
4391-@@ -6146,6 +6166,11 @@
4392+@@ -6198,6 +6218,11 @@
4393 case DB_SUCCESS:
4394 error = 0;
4395 table->status = 0;
4396@@ -973,7 +973,7 @@
4397 break;
4398 case DB_RECORD_NOT_FOUND:
4399 error = HA_ERR_END_OF_FILE;
4400-@@ -8088,11 +8113,35 @@
4401+@@ -8144,11 +8169,35 @@
4402 /* In sql_show we call with this flag: update
4403 then statistics so that they are up-to-date */
4404
4405@@ -1010,7 +1010,7 @@
4406
4407 prebuilt->trx->op_info = "returning various info to MySQL";
4408 }
4409-@@ -8177,7 +8226,7 @@
4410+@@ -8233,7 +8282,7 @@
4411 are asked by MySQL to avoid locking. Another reason to
4412 avoid the call is that it uses quite a lot of CPU.
4413 See Bug#38185. */
4414@@ -1019,7 +1019,7 @@
4415 || !(flag & HA_STATUS_VARIABLE_EXTRA)) {
4416 /* We do not update delete_length if no
4417 locking is requested so the "old" value can
4418-@@ -11391,6 +11440,26 @@
4419+@@ -11503,6 +11552,26 @@
4420 "The number of index pages to sample when calculating statistics (default 8)",
4421 NULL, NULL, 8, 1, ~0ULL, 0);
4422
4423@@ -1046,7 +1046,7 @@
4424 static MYSQL_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled,
4425 PLUGIN_VAR_OPCMDARG,
4426 "Enable InnoDB adaptive hash index (enabled by default). "
4427-@@ -11722,6 +11791,9 @@
4428+@@ -11861,6 +11930,9 @@
4429 MYSQL_SYSVAR(recovery_update_relay_log),
4430 MYSQL_SYSVAR(rollback_on_timeout),
4431 MYSQL_SYSVAR(stats_on_metadata),
4432@@ -1056,7 +1056,7 @@
4433 MYSQL_SYSVAR(stats_sample_pages),
4434 MYSQL_SYSVAR(adaptive_hash_index),
4435 MYSQL_SYSVAR(stats_method),
4436-@@ -11793,7 +11865,10 @@
4437+@@ -11932,7 +12004,10 @@
4438 i_s_innodb_sys_columns,
4439 i_s_innodb_sys_fields,
4440 i_s_innodb_sys_foreign,
4441@@ -1682,8 +1682,8 @@
4442 +#define DICT_HDR_XTRADB_MARK 256 /* Flag to distinguish expansion of XtraDB */
4443 /*-------------------------------------------------------------*/
4444
4445- /* The field number of the page number field in the sys_indexes table
4446-@@ -144,11 +148,16 @@
4447+ /* The field numbers in the SYS_TABLES clustered index */
4448+@@ -146,11 +150,16 @@
4449 #define DICT_SYS_INDEXES_TYPE_FIELD 6
4450 #define DICT_SYS_INDEXES_NAME_FIELD 4
4451
4452@@ -1757,7 +1757,7 @@
4453 #include "dict0crea.ic"
4454 --- a/storage/innobase/include/dict0dict.h
4455 +++ b/storage/innobase/include/dict0dict.h
4456-@@ -1109,10 +1109,18 @@
4457+@@ -1126,10 +1126,18 @@
4458 dict_update_statistics(
4459 /*===================*/
4460 dict_table_t* table, /*!< in/out: table */
4461@@ -1777,7 +1777,7 @@
4462 /********************************************************************//**
4463 Reserves the dictionary system mutex for MySQL. */
4464 UNIV_INTERN
4465-@@ -1227,6 +1235,7 @@
4466+@@ -1244,6 +1252,7 @@
4467 dict_table_t* sys_columns; /*!< SYS_COLUMNS table */
4468 dict_table_t* sys_indexes; /*!< SYS_INDEXES table */
4469 dict_table_t* sys_fields; /*!< SYS_FIELDS table */
4470@@ -1854,7 +1854,7 @@
4471 should be called after the indexes for a table have been created.
4472 --- a/storage/innobase/include/srv0srv.h
4473 +++ b/storage/innobase/include/srv0srv.h
4474-@@ -212,6 +212,9 @@
4475+@@ -216,6 +216,9 @@
4476 extern ibool srv_innodb_status;
4477
4478 extern unsigned long long srv_stats_sample_pages;
4479@@ -1908,7 +1908,7 @@
4480 } else {
4481 --- a/storage/innobase/row/row0ins.c
4482 +++ b/storage/innobase/row/row0ins.c
4483-@@ -2013,6 +2013,8 @@
4484+@@ -2015,6 +2015,8 @@
4485 }
4486
4487 #ifdef UNIV_DEBUG
4488@@ -1930,7 +1930,7 @@
4489 /* Drop the index definition and the B-tree. */
4490 --- a/storage/innobase/row/row0mysql.c
4491 +++ b/storage/innobase/row/row0mysql.c
4492-@@ -921,6 +921,9 @@
4493+@@ -922,6 +922,9 @@
4494
4495 table->stat_modified_counter = counter + 1;
4496
4497@@ -1940,7 +1940,7 @@
4498 /* Calculate new statistics if 1 / 16 of table has been modified
4499 since the last time a statistics batch was run, or if
4500 stat_modified_counter > 2 000 000 000 (to avoid wrap-around).
4501-@@ -931,7 +934,7 @@
4502+@@ -932,7 +935,7 @@
4503 || ((ib_int64_t)counter > 16 + table->stat_n_rows / 16)) {
4504
4505 dict_update_statistics(table, FALSE /* update even if stats
4506@@ -1949,7 +1949,7 @@
4507 }
4508 }
4509
4510-@@ -2076,6 +2079,71 @@
4511+@@ -2077,6 +2080,71 @@
4512 }
4513
4514 /*********************************************************************//**
4515@@ -2021,7 +2021,7 @@
4516 Scans a table create SQL string and adds to the data dictionary
4517 the foreign key constraints declared in the string. This function
4518 should be called after the indexes for a table have been created.
4519-@@ -3000,7 +3068,7 @@
4520+@@ -3001,7 +3069,7 @@
4521 dict_table_autoinc_initialize(table, 1);
4522 dict_table_autoinc_unlock(table);
4523 dict_update_statistics(table, FALSE /* update even if stats are
4524@@ -2030,7 +2030,7 @@
4525
4526 trx_commit_for_mysql(trx);
4527
4528-@@ -3302,6 +3370,8 @@
4529+@@ -3312,6 +3380,8 @@
4530 " IF (SQL % NOTFOUND) THEN\n"
4531 " found := 0;\n"
4532 " ELSE\n"
4533@@ -2041,7 +2041,7 @@
4534 " DELETE FROM SYS_INDEXES\n"
4535 --- a/storage/innobase/row/row0row.c
4536 +++ b/storage/innobase/row/row0row.c
4537-@@ -373,6 +373,14 @@
4538+@@ -364,6 +364,14 @@
4539
4540 rec_len = rec_offs_n_fields(offsets);
4541
4542@@ -2056,7 +2056,7 @@
4543 entry = dtuple_create(heap, rec_len);
4544
4545 dtuple_set_n_fields_cmp(entry,
4546-@@ -384,6 +392,14 @@
4547+@@ -375,6 +383,14 @@
4548 for (i = 0; i < rec_len; i++) {
4549
4550 dfield = dtuple_get_nth_field(entry, i);
4551@@ -2119,12 +2119,12 @@
4552 UNIV_INTERN ibool srv_use_checksums = TRUE;
4553 --- a/storage/innobase/trx/trx0rec.c
4554 +++ b/storage/innobase/trx/trx0rec.c
4555-@@ -669,15 +669,27 @@
4556+@@ -669,14 +669,27 @@
4557 /* Save to the undo log the old values of the columns to be updated. */
4558
4559 if (update) {
4560 + ulint extended = 0;
4561-
4562++
4563 if (trx_undo_left(undo_page, ptr) < 5) {
4564
4565 return(0);
4566@@ -2135,8 +2135,7 @@
4567 + && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes)) {
4568 + for (i = 0; i < upd_get_n_fields(update); i++) {
4569 + ulint pos = upd_get_nth_field(update, i)->field_no;
4570-
4571-- for (i = 0; i < upd_get_n_fields(update); i++) {
4572++
4573 + if (pos >= rec_offs_n_fields(offsets)) {
4574 + extended++;
4575 + }
4576@@ -2144,7 +2143,8 @@
4577 + }
4578 +
4579 + ptr += mach_write_compressed(ptr, upd_get_n_fields(update) - extended);
4580-+
4581+
4582+- for (i = 0; i < upd_get_n_fields(update); i++) {
4583 + for (i = 0; i < upd_get_n_fields(update) - extended; i++) {
4584
4585 ulint pos = upd_get_nth_field(update, i)->field_no;
4586
4587=== modified file 'patches/innodb_thread_concurrency_timer_based.patch'
4588--- patches/innodb_thread_concurrency_timer_based.patch 2011-09-21 09:20:58 +0000
4589+++ patches/innodb_thread_concurrency_timer_based.patch 2011-11-02 10:38:52 +0000
4590@@ -15,7 +15,7 @@
4591 static long long innobase_buffer_pool_size, innobase_log_file_size;
4592
4593 /** Percentage of the buffer pool to reserve for 'old' blocks.
4594-@@ -2550,6 +2551,9 @@
4595+@@ -2577,6 +2578,9 @@
4596 srv_n_log_files = (ulint) innobase_log_files_in_group;
4597 srv_log_file_size = (ulint) innobase_log_file_size;
4598
4599@@ -25,7 +25,7 @@
4600 #ifdef UNIV_LOG_ARCHIVE
4601 srv_log_archive_on = (ulint) innobase_log_archive;
4602 #endif /* UNIV_LOG_ARCHIVE */
4603-@@ -11481,6 +11485,12 @@
4604+@@ -11593,6 +11597,12 @@
4605 "Maximum delay between polling for a spin lock (6 by default)",
4606 NULL, NULL, 6L, 0L, ~0L, 0);
4607
4608@@ -38,7 +38,7 @@
4609 static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
4610 PLUGIN_VAR_RQCMDARG,
4611 "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.",
4612-@@ -11698,6 +11708,7 @@
4613+@@ -11837,6 +11847,7 @@
4614 MYSQL_SYSVAR(spin_wait_delay),
4615 MYSQL_SYSVAR(table_locks),
4616 MYSQL_SYSVAR(thread_concurrency),
4617@@ -48,7 +48,7 @@
4618 MYSQL_SYSVAR(show_verbose_locks),
4619 --- a/storage/innobase/include/srv0srv.h
4620 +++ b/storage/innobase/include/srv0srv.h
4621-@@ -161,6 +161,8 @@
4622+@@ -165,6 +165,8 @@
4623 extern ulint srv_mem_pool_size;
4624 extern ulint srv_lock_table_size;
4625
4626
4627=== modified file 'patches/memory_dynamic_rows.patch'
4628--- patches/memory_dynamic_rows.patch 2011-09-03 15:15:31 +0000
4629+++ patches/memory_dynamic_rows.patch 2011-11-02 10:38:52 +0000
4630@@ -19,7 +19,7 @@
4631
4632 #define HP_MAX_LEVELS 4 /* 128^5 records is enough */
4633 #define HP_PTRS_IN_NOD 128
4634-@@ -130,22 +140,58 @@
4635+@@ -131,22 +141,58 @@
4636 uint (*get_key_length)(struct st_hp_keydef *keydef, const uchar *key);
4637 } HP_KEYDEF;
4638
4639@@ -83,9 +83,9 @@
4640 uint open_count;
4641 - uchar *del_link; /* Link to next block with del. rec */
4642 char * name; /* Name of "memory-file" */
4643+ time_t create_time;
4644 THR_LOCK lock;
4645- mysql_mutex_t intern_lock; /* Locking for use with _locking */
4646-@@ -154,6 +200,7 @@
4647+@@ -156,6 +202,7 @@
4648 uint auto_key;
4649 uint auto_key_type; /* real type of the auto key segment */
4650 ulonglong auto_increment;
4651@@ -93,7 +93,7 @@
4652 } HP_SHARE;
4653
4654 struct st_hp_hash_info;
4655-@@ -163,7 +210,7 @@
4656+@@ -165,7 +212,7 @@
4657 HP_SHARE *s;
4658 uchar *current_ptr;
4659 struct st_hp_hash_info *current_hash_ptr;
4660@@ -102,7 +102,7 @@
4661 int lastinx,errkey;
4662 int mode; /* Mode of file (READONLY..) */
4663 uint opt_flag,update;
4664-@@ -176,6 +223,9 @@
4665+@@ -178,6 +225,9 @@
4666 my_bool implicit_emptied;
4667 THR_LOCK_DATA lock;
4668 LIST open_list;
4669@@ -112,7 +112,7 @@
4670 } HP_INFO;
4671
4672
4673-@@ -197,6 +247,14 @@
4674+@@ -199,6 +249,14 @@
4675 open_count to 1. Is only looked at if not internal_table.
4676 */
4677 my_bool pin_share;
4678@@ -127,7 +127,7 @@
4679 } HP_CREATE_INFO;
4680
4681 /* Prototypes for heap-functions */
4682-@@ -213,9 +271,8 @@
4683+@@ -215,9 +273,8 @@
4684 extern int heap_scan(register HP_INFO *info, uchar *record);
4685 extern int heap_delete(HP_INFO *info,const uchar *buff);
4686 extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag);
4687@@ -318,7 +318,7 @@
4688 }
4689 }
4690
4691-@@ -428,6 +435,13 @@
4692+@@ -429,6 +436,13 @@
4693 return 0;
4694 }
4695
4696@@ -332,7 +332,7 @@
4697
4698 int ha_heap::extra(enum ha_extra_function operation)
4699 {
4700-@@ -645,23 +659,70 @@
4701+@@ -646,23 +660,70 @@
4702 heap_prepare_hp_create_info(TABLE *table_arg, bool internal_table,
4703 HP_CREATE_INFO *hp_create_info)
4704 {
4705@@ -405,7 +405,7 @@
4706 seg= reinterpret_cast<HA_KEYSEG*>(keydef + keys);
4707 for (key= 0; key < keys; key++)
4708 {
4709-@@ -677,11 +738,11 @@
4710+@@ -678,11 +739,11 @@
4711 case HA_KEY_ALG_UNDEF:
4712 case HA_KEY_ALG_HASH:
4713 keydef[key].algorithm= HA_KEY_ALG_HASH;
4714@@ -419,7 +419,7 @@
4715 break;
4716 default:
4717 DBUG_ASSERT(0); // cannot happen
4718-@@ -706,6 +767,16 @@
4719+@@ -707,6 +768,16 @@
4720 seg->length= (uint) key_part->length;
4721 seg->flag= key_part->key_part_flag;
4722
4723@@ -436,7 +436,7 @@
4724 if (field->flags & (ENUM_FLAG | SET_FLAG))
4725 seg->charset= &my_charset_bin;
4726 else
4727-@@ -731,9 +802,75 @@
4728+@@ -732,9 +803,75 @@
4729 auto_key= key+ 1;
4730 auto_key_type= field->key_type();
4731 }
4732@@ -513,7 +513,7 @@
4733 if (table_arg->found_next_number_field)
4734 {
4735 keydef[share->next_number_index].flag|= HA_AUTO_KEY;
4736-@@ -744,16 +881,19 @@
4737+@@ -745,16 +882,19 @@
4738 hp_create_info->max_table_size=current_thd->variables.max_heap_table_size;
4739 hp_create_info->with_auto_increment= found_real_auto_increment;
4740 hp_create_info->internal_table= internal_table;
4741@@ -539,7 +539,7 @@
4742 return 0;
4743 }
4744
4745-@@ -773,6 +913,7 @@
4746+@@ -774,6 +914,7 @@
4747 create_info->auto_increment_value - 1 : 0);
4748 error= heap_create(name, &hp_create_info, &internal_share, &created);
4749 my_free(hp_create_info.keydef);
4750@@ -547,7 +547,7 @@
4751 DBUG_ASSERT(file == 0);
4752 return (error);
4753 }
4754-@@ -783,6 +924,13 @@
4755+@@ -784,6 +925,13 @@
4756 table->file->info(HA_STATUS_AUTO);
4757 if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
4758 create_info->auto_increment_value= stats.auto_increment_value;
4759@@ -964,7 +964,7 @@
4760 /* Fix keys */
4761 memcpy(share->keydef, keydef, (size_t) (sizeof(keydef[0]) * keys));
4762 for (i= 0, keyinfo= share->keydef; i < keys; i++, keyinfo++)
4763-@@ -177,15 +310,35 @@
4764+@@ -177,16 +310,36 @@
4765 share->min_records= min_records;
4766 share->max_records= max_records;
4767 share->max_table_size= create_info->max_table_size;
4768@@ -979,6 +979,7 @@
4769 share->auto_key= create_info->auto_key;
4770 share->auto_key_type= create_info->auto_key_type;
4771 share->auto_increment= create_info->auto_increment;
4772+ share->create_time= (long) time((time_t*) 0);
4773 +
4774 + share->fixed_data_length= fixed_data_length;
4775 + share->fixed_column_count= fixed_column_count;
4776@@ -1002,7 +1003,7 @@
4777 /* Must be allocated separately for rename to work */
4778 if (!(share->name= my_strdup(name,MYF(0))))
4779 {
4780-@@ -227,7 +380,7 @@
4781+@@ -228,7 +381,7 @@
4782 param->search_flag, not_used);
4783 }
4784
4785@@ -1011,7 +1012,7 @@
4786 ulong max_records)
4787 {
4788 uint i,recbuffer,records_in_block;
4789-@@ -235,7 +388,12 @@
4790+@@ -236,7 +389,12 @@
4791 max_records= max(min_records,max_records);
4792 if (!max_records)
4793 max_records= 1000; /* As good as quess as anything */
4794@@ -3944,7 +3945,7 @@
4795 +PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4796 +SHOW TABLE STATUS LIKE 't1';
4797 +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
4798-+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC
4799++t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4800 +DROP TABLE t1;
4801 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4802 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4803@@ -3955,25 +3956,25 @@
4804 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4805 +SHOW TABLE STATUS LIKE 't1';
4806 +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
4807-+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
4808++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
4809 +DROP TABLE t1;
4810 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4811 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=123 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4812 +SHOW TABLE STATUS LIKE 't1';
4813 +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
4814-+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
4815++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
4816 +DROP TABLE t1;
4817 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4818 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4819 +SHOW TABLE STATUS LIKE 't1';
4820 +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
4821-+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
4822++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
4823 +DROP TABLE t1;
4824 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4825 +PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4826 +SHOW TABLE STATUS LIKE 't1';
4827 +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
4828-+t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC
4829++t1 MEMORY 10 Fixed 0 X 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4830 +DROP TABLE t1;
4831 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4832 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4833@@ -3984,19 +3985,19 @@
4834 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4835 +SHOW TABLE STATUS LIKE 't1';
4836 +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
4837-+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
4838++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
4839 +DROP TABLE t1;
4840 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4841 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=121 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4842 +SHOW TABLE STATUS LIKE 't1';
4843 +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
4844-+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
4845++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
4846 +DROP TABLE t1;
4847 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4848 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4849 +SHOW TABLE STATUS LIKE 't1';
4850 +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
4851-+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
4852++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
4853 +DROP TABLE t1;
4854 --- /dev/null
4855 +++ b/mysql-test/r/percona_heap_bug784464_32bit.result
4856@@ -4005,13 +4006,13 @@
4857 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4858 +SHOW TABLE STATUS LIKE 't1';
4859 +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
4860-+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
4861++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
4862 +DROP TABLE t1;
4863 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4864 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4865 +SHOW TABLE STATUS LIKE 't1';
4866 +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
4867-+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
4868++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
4869 +DROP TABLE t1;
4870 --- /dev/null
4871 +++ b/mysql-test/r/percona_heap_bug784464_64bit.result
4872@@ -4020,13 +4021,13 @@
4873 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4874 +SHOW TABLE STATUS LIKE 't1';
4875 +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
4876-+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
4877++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
4878 +DROP TABLE t1;
4879 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4880 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4881 +SHOW TABLE STATUS LIKE 't1';
4882 +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
4883-+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
4884++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
4885 +DROP TABLE t1;
4886 --- /dev/null
4887 +++ b/mysql-test/r/percona_heap_bug784468.result
4888@@ -4034,17 +4035,17 @@
4889 +CREATE TABLE t1 ( f1 VARCHAR(30)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4890 +SHOW TABLE STATUS LIKE 't1';
4891 +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
4892-+t1 MEMORY 10 Fixed 0 32 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC
4893++t1 MEMORY 10 Fixed 0 32 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4894 +DROP TABLE t1;
4895 +CREATE TABLE t1 ( f1 VARCHAR(31)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4896 +SHOW TABLE STATUS LIKE 't1';
4897 +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
4898-+t1 MEMORY 10 Fixed 0 33 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC
4899++t1 MEMORY 10 Fixed 0 33 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4900 +DROP TABLE t1;
4901 +CREATE TABLE t1 ( f1 VARCHAR(32)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4902 +SHOW TABLE STATUS LIKE 't1';
4903 +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
4904-+t1 MEMORY 10 Fixed 0 34 0 X 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL row_format=DYNAMIC
4905++t1 MEMORY 10 Fixed 0 34 0 X 0 0 NULL X X NULL latin1_swedish_ci NULL row_format=DYNAMIC
4906 +DROP TABLE t1;
4907 --- /dev/null
4908 +++ b/mysql-test/r/percona_heap_bug788544.result
4909@@ -4996,7 +4997,7 @@
4910 +DROP TABLE local_1_1;
4911 --- /dev/null
4912 +++ b/mysql-test/t/percona_heap_bug784464.test
4913-@@ -0,0 +1,64 @@
4914+@@ -0,0 +1,66 @@
4915 +#
4916 +# Bug #784464: Silent conversion from Dynamic to Fixed row_format for certain
4917 +# values of key_block_size.
4918@@ -5005,59 +5006,61 @@
4919 +
4920 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4921 + PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4922-+--replace_column 6 X 8 X
4923++--replace_column 6 X 8 X 12 X 13 X
4924 +SHOW TABLE STATUS LIKE 't1';
4925 +DROP TABLE t1;
4926 +
4927 +--error ER_CANT_USE_OPTION_HERE
4928 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4929 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4930++--replace_column 12 X 13 X
4931 +SHOW TABLE STATUS LIKE 't1';
4932 +
4933 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4934 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4935-+--replace_column 6 X 8 X
4936++--replace_column 6 X 8 X 12 X 13 X
4937 +SHOW TABLE STATUS LIKE 't1';
4938 +DROP TABLE t1;
4939 +
4940 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4941 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=123 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4942-+--replace_column 6 X 8 X
4943++--replace_column 6 X 8 X 12 X 13 X
4944 +SHOW TABLE STATUS LIKE 't1';
4945 +DROP TABLE t1;
4946 +
4947 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4948 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4949-+--replace_column 6 X 8 X
4950++--replace_column 6 X 8 X 12 X 13 X
4951 +SHOW TABLE STATUS LIKE 't1';
4952 +DROP TABLE t1;
4953 +
4954 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4955 + PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4956-+--replace_column 6 X 8 X
4957++--replace_column 6 X 8 X 12 X 13 X
4958 +SHOW TABLE STATUS LIKE 't1';
4959 +DROP TABLE t1;
4960 +
4961 +--error ER_CANT_USE_OPTION_HERE
4962 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4963 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4964++--replace_column 12 X 13 X
4965 +SHOW TABLE STATUS LIKE 't1';
4966 +
4967 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4968 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4969-+--replace_column 6 X 8 X
4970++--replace_column 6 X 8 X 12 X 13 X
4971 +SHOW TABLE STATUS LIKE 't1';
4972 +DROP TABLE t1;
4973 +
4974 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4975 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=121 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4976-+--replace_column 6 X 8 X
4977++--replace_column 6 X 8 X 12 X 13 X
4978 +SHOW TABLE STATUS LIKE 't1';
4979 +DROP TABLE t1;
4980 +
4981 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4982 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4983-+--replace_column 6 X 8 X
4984++--replace_column 6 X 8 X 12 X 13 X
4985 +SHOW TABLE STATUS LIKE 't1';
4986 +DROP TABLE t1;
4987 +
4988@@ -5070,13 +5073,13 @@
4989 +
4990 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
4991 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4992-+--replace_column 6 X 8 X
4993++--replace_column 6 X 8 X 12 X 13 X
4994 +SHOW TABLE STATUS LIKE 't1';
4995 +DROP TABLE t1;
4996 +
4997 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
4998 + PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
4999-+--replace_column 6 X 8 X
5000++--replace_column 6 X 8 X 12 X 13 X
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches