Merge lp:~percona-dev/percona-server/5.5.13-fix_bug802348 into lp:percona-server/5.5

Proposed by Yasufumi Kinoshita
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 134
Proposed branch: lp:~percona-dev/percona-server/5.5.13-fix_bug802348
Merge into: lp:percona-server/5.5
Diff against target: 827 lines (+112/-88)
7 files modified
innodb_adaptive_hash_index_partitions.patch (+1/-1)
innodb_buffer_pool_pages_i_s.patch (+1/-1)
innodb_extend_slow.patch (+14/-14)
innodb_fix_misc.patch (+1/-1)
innodb_pass_corrupt_table.patch (+6/-6)
innodb_separate_doublewrite.patch (+1/-1)
innodb_split_buf_pool_mutex.patch (+88/-64)
To merge this branch: bzr merge lp:~percona-dev/percona-server/5.5.13-fix_bug802348
Reviewer Review Type Date Requested Status
Stewart Smith Pending
Review via email: mp+65939@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'innodb_adaptive_hash_index_partitions.patch'
2--- innodb_adaptive_hash_index_partitions.patch 2011-06-23 07:32:16 +0000
3+++ innodb_adaptive_hash_index_partitions.patch 2011-06-27 07:15:55 +0000
4@@ -1008,7 +1008,7 @@
5 #endif /* UNIV_SYNC_DEBUG */
6 ut_ad(!btr_search_enabled);
7
8-@@ -2636,6 +2641,7 @@
9+@@ -2655,6 +2660,7 @@
10 {
11 block->check_index_page_at_flush = FALSE;
12 block->index = NULL;
13
14=== modified file 'innodb_buffer_pool_pages_i_s.patch'
15--- innodb_buffer_pool_pages_i_s.patch 2011-06-23 07:32:16 +0000
16+++ innodb_buffer_pool_pages_i_s.patch 2011-06-27 07:15:55 +0000
17@@ -8,7 +8,7 @@
18 diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
19 --- a/storage/innobase/buf/buf0buf.c 2010-12-04 20:20:44.595483291 +0900
20 +++ b/storage/innobase/buf/buf0buf.c 2010-12-06 19:28:04.055227506 +0900
21-@@ -4541,6 +4541,36 @@
22+@@ -4560,6 +4560,36 @@
23 mutex_exit(block_mutex);
24 }
25
26
27=== modified file 'innodb_extend_slow.patch'
28--- innodb_extend_slow.patch 2011-06-23 07:32:16 +0000
29+++ innodb_extend_slow.patch 2011-06-27 07:15:55 +0000
30@@ -75,7 +75,7 @@
31
32 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
33 ut_a(++buf_dbg_counter % 37 || buf_validate());
34-@@ -2499,6 +2541,13 @@
35+@@ -2518,6 +2560,13 @@
36 /* Let us wait until the read operation
37 completes */
38
39@@ -89,7 +89,7 @@
40 for (;;) {
41 enum buf_io_fix io_fix;
42
43-@@ -2513,6 +2562,12 @@
44+@@ -2532,6 +2581,12 @@
45 break;
46 }
47 }
48@@ -102,7 +102,7 @@
49 }
50
51 #ifdef UNIV_IBUF_COUNT_DEBUG
52-@@ -2828,6 +2883,11 @@
53+@@ -2847,6 +2902,11 @@
54 ibool must_read;
55 ulint retries = 0;
56 mutex_t* block_mutex = NULL;
57@@ -114,7 +114,7 @@
58 buf_pool_t* buf_pool = buf_pool_get(space, offset);
59
60 ut_ad(mtr);
61-@@ -2856,6 +2916,9 @@
62+@@ -2875,6 +2935,9 @@
63 || ibuf_page_low(space, zip_size, offset,
64 FALSE, file, line, NULL));
65 #endif
66@@ -124,7 +124,7 @@
67 buf_pool->stat.n_page_gets++;
68 fold = buf_page_address_fold(space, offset);
69 loop:
70-@@ -2930,7 +2993,7 @@
71+@@ -2949,7 +3012,7 @@
72 return(NULL);
73 }
74
75@@ -133,7 +133,7 @@
76 retries = 0;
77 } else if (retries < BUF_PAGE_READ_MAX_RETRIES) {
78 ++retries;
79-@@ -3239,6 +3302,13 @@
80+@@ -3258,6 +3321,13 @@
81 /* Let us wait until the read operation
82 completes */
83
84@@ -147,7 +147,7 @@
85 for (;;) {
86 enum buf_io_fix io_fix;
87
88-@@ -3253,6 +3323,12 @@
89+@@ -3272,6 +3342,12 @@
90 break;
91 }
92 }
93@@ -160,7 +160,7 @@
94 }
95
96 fix_type = MTR_MEMO_BUF_FIX;
97-@@ -3279,13 +3355,17 @@
98+@@ -3298,13 +3374,17 @@
99 read-ahead */
100
101 buf_read_ahead_linear(space, zip_size, offset,
102@@ -179,7 +179,7 @@
103 return(block);
104 }
105
106-@@ -3309,6 +3389,7 @@
107+@@ -3328,6 +3408,7 @@
108 unsigned access_time;
109 ibool success;
110 ulint fix_type;
111@@ -187,7 +187,7 @@
112
113 ut_ad(block);
114 ut_ad(mtr);
115-@@ -3386,6 +3467,10 @@
116+@@ -3405,6 +3486,10 @@
117 #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
118 ut_a(block->page.file_page_was_freed == FALSE);
119 #endif
120@@ -198,7 +198,7 @@
121 if (UNIV_UNLIKELY(!access_time)) {
122 /* In the case of a first access, try to apply linear
123 read-ahead */
124-@@ -3393,7 +3478,7 @@
125+@@ -3412,7 +3497,7 @@
126 buf_read_ahead_linear(buf_block_get_space(block),
127 buf_block_get_zip_size(block),
128 buf_block_get_page_no(block),
129@@ -207,7 +207,7 @@
130 }
131
132 #ifdef UNIV_IBUF_COUNT_DEBUG
133-@@ -3403,6 +3488,9 @@
134+@@ -3422,6 +3507,9 @@
135 buf_pool = buf_pool_from_block(block);
136 buf_pool->stat.n_page_gets++;
137
138@@ -217,7 +217,7 @@
139 return(TRUE);
140 }
141
142-@@ -3425,6 +3513,7 @@
143+@@ -3444,6 +3532,7 @@
144 buf_pool_t* buf_pool;
145 ibool success;
146 ulint fix_type;
147@@ -225,7 +225,7 @@
148
149 ut_ad(mtr);
150 ut_ad(mtr->state == MTR_ACTIVE);
151-@@ -3511,6 +3600,11 @@
152+@@ -3530,6 +3619,11 @@
153 #endif
154 buf_pool->stat.n_page_gets++;
155
156
157=== modified file 'innodb_fix_misc.patch'
158--- innodb_fix_misc.patch 2011-06-23 07:32:16 +0000
159+++ innodb_fix_misc.patch 2011-06-27 07:15:55 +0000
160@@ -13,7 +13,7 @@
161 diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
162 --- a/storage/innobase/buf/buf0buf.c 2011-02-23 19:00:48.178696354 +0900
163 +++ b/storage/innobase/buf/buf0buf.c 2011-02-23 19:01:19.138826278 +0900
164-@@ -4065,6 +4065,7 @@
165+@@ -4084,6 +4084,7 @@
166 bpage->state = BUF_BLOCK_ZIP_PAGE;
167 bpage->space = space;
168 bpage->offset = offset;
169
170=== modified file 'innodb_pass_corrupt_table.patch'
171--- innodb_pass_corrupt_table.patch 2011-06-23 07:32:16 +0000
172+++ innodb_pass_corrupt_table.patch 2011-06-27 07:15:55 +0000
173@@ -357,7 +357,7 @@
174 block_mutex = buf_page_get_mutex_enter(bpage);
175
176 rw_lock_s_unlock(&buf_pool->page_hash_latch);
177-@@ -3040,6 +3053,13 @@
178+@@ -3059,6 +3072,13 @@
179 return(NULL);
180 }
181
182@@ -371,7 +371,7 @@
183 switch (buf_block_get_state(block)) {
184 buf_page_t* bpage;
185 ibool success;
186-@@ -3714,6 +3734,7 @@
187+@@ -3733,6 +3753,7 @@
188 bpage->newest_modification = 0;
189 bpage->oldest_modification = 0;
190 HASH_INVALIDATE(bpage, hash);
191@@ -379,7 +379,7 @@
192 #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
193 bpage->file_page_was_freed = FALSE;
194 #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
195-@@ -4303,6 +4324,7 @@
196+@@ -4322,6 +4343,7 @@
197 (ulong) bpage->offset);
198 }
199
200@@ -387,7 +387,7 @@
201 /* From version 3.23.38 up we store the page checksum
202 to the 4 first bytes of the page end lsn field */
203
204-@@ -4344,6 +4366,23 @@
205+@@ -4363,6 +4385,23 @@
206 REFMAN "forcing-innodb-recovery.html\n"
207 "InnoDB: about forcing recovery.\n", stderr);
208
209@@ -411,7 +411,7 @@
210 if (srv_force_recovery < SRV_FORCE_IGNORE_CORRUPT) {
211 fputs("InnoDB: Ending processing because of"
212 " a corrupt database page.\n",
213-@@ -4351,6 +4390,7 @@
214+@@ -4370,6 +4409,7 @@
215 exit(1);
216 }
217 }
218@@ -419,7 +419,7 @@
219
220 if (recv_recovery_is_on()) {
221 /* Pages must be uncompressed for crash recovery. */
222-@@ -4360,8 +4400,11 @@
223+@@ -4379,8 +4419,11 @@
224
225 if (uncompressed && !recv_no_ibuf_operations) {
226 ibuf_merge_or_delete_for_page(
227
228=== modified file 'innodb_separate_doublewrite.patch'
229--- innodb_separate_doublewrite.patch 2011-06-23 07:32:16 +0000
230+++ innodb_separate_doublewrite.patch 2011-06-27 07:15:55 +0000
231@@ -8,7 +8,7 @@
232 diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
233 --- a/storage/innobase/buf/buf0buf.c 2010-12-03 17:49:11.574962867 +0900
234 +++ b/storage/innobase/buf/buf0buf.c 2010-12-04 15:35:58.624514033 +0900
235-@@ -4272,7 +4272,8 @@
236+@@ -4291,7 +4291,8 @@
237 read_space_id = mach_read_from_4(
238 frame + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
239
240
241=== modified file 'innodb_split_buf_pool_mutex.patch'
242--- innodb_split_buf_pool_mutex.patch 2011-06-23 07:32:16 +0000
243+++ innodb_split_buf_pool_mutex.patch 2011-06-27 07:15:55 +0000
244@@ -1093,7 +1093,7 @@
245 ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage));
246
247 switch (buf_page_get_state(bpage)) {
248-@@ -2355,19 +2449,19 @@
249+@@ -2355,24 +2449,43 @@
250 case BUF_BLOCK_MEMORY:
251 case BUF_BLOCK_REMOVE_HASH:
252 case BUF_BLOCK_ZIP_FREE:
253@@ -1109,16 +1109,40 @@
254 goto got_block;
255 case BUF_BLOCK_FILE_PAGE:
256 - block_mutex = &((buf_block_t*) bpage)->mutex;
257-- mutex_enter(block_mutex);
258 + ut_a(block_mutex == &((buf_block_t*) bpage)->mutex);
259++
260++ /* release mutex to obey to latch-order */
261++ mutex_exit(block_mutex);
262++
263++ /* get LRU_list_mutex for buf_LRU_free_block() */
264++ mutex_enter(&buf_pool->LRU_list_mutex);
265+ mutex_enter(block_mutex);
266
267- /* Discard the uncompressed page frame if possible. */
268+- /* Discard the uncompressed page frame if possible. */
269 - if (buf_LRU_free_block(bpage, FALSE) == BUF_LRU_FREED) {
270-+ if (buf_LRU_free_block(bpage, FALSE, FALSE) == BUF_LRU_FREED) {
271++ if (UNIV_UNLIKELY(bpage->space != space
272++ || bpage->offset != offset
273++ || !bpage->in_LRU_list
274++ || !bpage->zip.data)) {
275++ /* someone should interrupt, retry */
276++ mutex_exit(&buf_pool->LRU_list_mutex);
277++ mutex_exit(block_mutex);
278++ goto lookup;
279++ }
280
281++ /* Discard the uncompressed page frame if possible. */
282++ if (buf_LRU_free_block(bpage, FALSE, TRUE) == BUF_LRU_FREED) {
283++ mutex_exit(&buf_pool->LRU_list_mutex);
284 mutex_exit(block_mutex);
285 goto lookup;
286-@@ -2385,7 +2479,7 @@
287+ }
288+
289++ mutex_exit(&buf_pool->LRU_list_mutex);
290++
291+ buf_block_buf_fix_inc((buf_block_t*) bpage,
292+ __FILE__, __LINE__);
293+ goto got_block;
294+@@ -2385,7 +2498,7 @@
295 must_read = buf_page_get_io_fix(bpage) == BUF_IO_READ;
296 access_time = buf_page_is_accessed(bpage);
297
298@@ -1127,7 +1151,7 @@
299
300 mutex_exit(block_mutex);
301
302-@@ -2697,7 +2791,7 @@
303+@@ -2697,7 +2810,7 @@
304 const buf_block_t* block) /*!< in: pointer to block,
305 not dereferenced */
306 {
307@@ -1136,7 +1160,7 @@
308
309 if (UNIV_UNLIKELY((((ulint) block) % sizeof *block) != 0)) {
310 /* The pointer should be aligned. */
311-@@ -2733,6 +2827,7 @@
312+@@ -2733,6 +2846,7 @@
313 ulint fix_type;
314 ibool must_read;
315 ulint retries = 0;
316@@ -1144,7 +1168,7 @@
317 buf_pool_t* buf_pool = buf_pool_get(space, offset);
318
319 ut_ad(mtr);
320-@@ -2765,9 +2860,11 @@
321+@@ -2765,9 +2879,11 @@
322 fold = buf_page_address_fold(space, offset);
323 loop:
324 block = guess;
325@@ -1157,7 +1181,7 @@
326 /* If the guess is a compressed page descriptor that
327 has been allocated by buf_buddy_alloc(), it may have
328 been invalidated by buf_buddy_relocate(). In that
329-@@ -2776,11 +2873,15 @@
330+@@ -2776,11 +2892,15 @@
331 the guess may be pointing to a buffer pool chunk that
332 has been released when resizing the buffer pool. */
333
334@@ -1174,7 +1198,7 @@
335 block = guess = NULL;
336 } else {
337 ut_ad(!block->page.in_zip_hash);
338-@@ -2789,12 +2890,19 @@
339+@@ -2789,12 +2909,19 @@
340 }
341
342 if (block == NULL) {
343@@ -1194,7 +1218,7 @@
344 block = NULL;
345 }
346
347-@@ -2806,12 +2914,14 @@
348+@@ -2806,12 +2933,14 @@
349 space, offset, fold);
350
351 if (UNIV_LIKELY_NULL(block)) {
352@@ -1211,7 +1235,7 @@
353
354 if (mode == BUF_GET_IF_IN_POOL
355 || mode == BUF_PEEK_IF_IN_POOL
356-@@ -2861,7 +2971,8 @@
357+@@ -2861,7 +2990,8 @@
358 /* The page is being read to buffer pool,
359 but we cannot wait around for the read to
360 complete. */
361@@ -1221,7 +1245,7 @@
362
363 return(NULL);
364 }
365-@@ -2871,38 +2982,49 @@
366+@@ -2871,38 +3001,49 @@
367 ibool success;
368
369 case BUF_BLOCK_FILE_PAGE:
370@@ -1278,7 +1302,7 @@
371
372 {
373 buf_page_t* hash_bpage;
374-@@ -2915,35 +3037,47 @@
375+@@ -2915,35 +3056,47 @@
376 while buf_pool->mutex was released.
377 Free the block that was allocated. */
378
379@@ -1332,7 +1356,7 @@
380 buf_block_init_low(block);
381 block->lock_hash_val = lock_rec_hash(space, offset);
382
383-@@ -2952,7 +3086,7 @@
384+@@ -2952,7 +3105,7 @@
385
386 if (buf_page_get_state(&block->page)
387 == BUF_BLOCK_ZIP_PAGE) {
388@@ -1341,7 +1365,7 @@
389 &block->page);
390 ut_ad(!block->page.in_flush_list);
391 } else {
392-@@ -2969,20 +3103,25 @@
393+@@ -2969,20 +3122,25 @@
394 /* Insert at the front of unzip_LRU list */
395 buf_unzip_LRU_add_block(block, FALSE);
396
397@@ -1370,7 +1394,7 @@
398
399 /* Decompress the page and apply buffered operations
400 while not holding buf_pool->mutex or block->mutex. */
401-@@ -2995,12 +3134,15 @@
402+@@ -2995,12 +3153,15 @@
403 }
404
405 /* Unfix and unlatch the block. */
406@@ -1389,7 +1413,7 @@
407 rw_lock_x_unlock(&block->lock);
408
409 break;
410-@@ -3016,7 +3158,7 @@
411+@@ -3016,7 +3177,7 @@
412
413 ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
414
415@@ -1398,7 +1422,7 @@
416 #if UNIV_WORD_SIZE == 4
417 /* On 32-bit systems, there is no padding in buf_page_t. On
418 other systems, Valgrind could complain about uninitialized pad
419-@@ -3029,8 +3171,8 @@
420+@@ -3029,8 +3190,8 @@
421 /* Try to evict the block from the buffer pool, to use the
422 insert buffer (change buffer) as much as possible. */
423
424@@ -1409,7 +1433,7 @@
425 if (mode == BUF_GET_IF_IN_POOL_OR_WATCH) {
426 /* Set the watch, as it would have
427 been set if the page were not in the
428-@@ -3039,6 +3181,9 @@
429+@@ -3039,6 +3200,9 @@
430 space, offset, fold);
431
432 if (UNIV_LIKELY_NULL(block)) {
433@@ -1419,7 +1443,7 @@
434
435 /* The page entered the buffer
436 pool for some reason. Try to
437-@@ -3046,7 +3191,7 @@
438+@@ -3046,7 +3210,7 @@
439 goto got_block;
440 }
441 }
442@@ -1428,7 +1452,7 @@
443 fprintf(stderr,
444 "innodb_change_buffering_debug evict %u %u\n",
445 (unsigned) space, (unsigned) offset);
446-@@ -3065,13 +3210,14 @@
447+@@ -3065,13 +3229,14 @@
448
449 buf_block_buf_fix_inc(block, file, line);
450
451@@ -1445,7 +1469,7 @@
452
453 if (UNIV_LIKELY(mode != BUF_PEEK_IF_IN_POOL)) {
454 buf_page_set_accessed_make_young(&block->page, access_time);
455-@@ -3308,9 +3454,11 @@
456+@@ -3308,9 +3473,11 @@
457 buf_pool = buf_pool_from_block(block);
458
459 if (mode == BUF_MAKE_YOUNG && buf_page_peek_if_too_old(&block->page)) {
460@@ -1459,7 +1483,7 @@
461 } else if (!buf_page_is_accessed(&block->page)) {
462 /* Above, we do a dirty read on purpose, to avoid
463 mutex contention. The field buf_page_t::access_time
464-@@ -3318,9 +3466,11 @@
465+@@ -3318,9 +3485,11 @@
466 field must be protected by mutex, however. */
467 ulint time_ms = ut_time_ms();
468
469@@ -1473,7 +1497,7 @@
470 }
471
472 ut_ad(!ibuf_inside(mtr) || mode == BUF_KEEP_OLD);
473-@@ -3387,18 +3537,21 @@
474+@@ -3387,18 +3556,21 @@
475 ut_ad(mtr);
476 ut_ad(mtr->state == MTR_ACTIVE);
477
478@@ -1498,7 +1522,7 @@
479
480 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
481 ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
482-@@ -3487,7 +3640,10 @@
483+@@ -3487,7 +3659,10 @@
484 buf_page_t* hash_page;
485 buf_pool_t* buf_pool = buf_pool_get(space, offset);
486
487@@ -1510,7 +1534,7 @@
488 ut_ad(mutex_own(&(block->mutex)));
489 ut_a(buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE);
490
491-@@ -3516,11 +3672,14 @@
492+@@ -3516,11 +3691,14 @@
493 if (UNIV_LIKELY(!hash_page)) {
494 } else if (buf_pool_watch_is_sentinel(buf_pool, hash_page)) {
495 /* Preserve the reference count. */
496@@ -1526,7 +1550,7 @@
497 } else {
498 fprintf(stderr,
499 "InnoDB: Error: page %lu %lu already found"
500-@@ -3530,7 +3689,8 @@
501+@@ -3530,7 +3708,8 @@
502 (const void*) hash_page, (const void*) block);
503 #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
504 mutex_exit(&block->mutex);
505@@ -1536,7 +1560,7 @@
506 buf_print();
507 buf_LRU_print();
508 buf_validate();
509-@@ -3613,7 +3773,9 @@
510+@@ -3613,7 +3792,9 @@
511
512 fold = buf_page_address_fold(space, offset);
513
514@@ -1547,7 +1571,7 @@
515
516 watch_page = buf_page_hash_get_low(buf_pool, space, offset, fold);
517 if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) {
518-@@ -3622,9 +3784,15 @@
519+@@ -3622,9 +3803,15 @@
520 err_exit:
521 if (block) {
522 mutex_enter(&block->mutex);
523@@ -1564,7 +1588,7 @@
524
525 bpage = NULL;
526 goto func_exit;
527-@@ -3647,6 +3815,8 @@
528+@@ -3647,6 +3834,8 @@
529
530 buf_page_init(space, offset, fold, block);
531
532@@ -1573,7 +1597,7 @@
533 /* The block must be put to the LRU list, to the old blocks */
534 buf_LRU_add_block(bpage, TRUE/* to old blocks */);
535
536-@@ -3674,7 +3844,7 @@
537+@@ -3674,7 +3863,7 @@
538 been added to buf_pool->LRU and
539 buf_pool->page_hash. */
540 mutex_exit(&block->mutex);
541@@ -1582,7 +1606,7 @@
542 mutex_enter(&block->mutex);
543 block->page.zip.data = data;
544
545-@@ -3687,6 +3857,7 @@
546+@@ -3687,6 +3876,7 @@
547 buf_unzip_LRU_add_block(block, TRUE);
548 }
549
550@@ -1590,7 +1614,7 @@
551 mutex_exit(&block->mutex);
552 } else {
553 /* Defer buf_buddy_alloc() until after the block has
554-@@ -3698,8 +3869,8 @@
555+@@ -3698,8 +3888,8 @@
556 control block (bpage), in order to avoid the
557 invocation of buf_buddy_relocate_block() on
558 uninitialized data. */
559@@ -1601,7 +1625,7 @@
560
561 /* Initialize the buf_pool pointer. */
562 bpage->buf_pool_index = buf_pool_index(buf_pool);
563-@@ -3719,8 +3890,11 @@
564+@@ -3719,8 +3909,11 @@
565 /* The block was added by some other thread. */
566 watch_page = NULL;
567 bpage->state = BUF_BLOCK_ZIP_FREE;
568@@ -1615,7 +1639,7 @@
569
570 bpage = NULL;
571 goto func_exit;
572-@@ -3764,18 +3938,24 @@
573+@@ -3764,18 +3957,24 @@
574 HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold,
575 bpage);
576
577@@ -1641,7 +1665,7 @@
578
579 if (mode == BUF_READ_IBUF_PAGES_ONLY) {
580
581-@@ -3817,7 +3997,9 @@
582+@@ -3817,7 +4016,9 @@
583
584 fold = buf_page_address_fold(space, offset);
585
586@@ -1652,7 +1676,7 @@
587
588 block = (buf_block_t*) buf_page_hash_get_low(
589 buf_pool, space, offset, fold);
590-@@ -3833,7 +4015,9 @@
591+@@ -3833,7 +4034,9 @@
592 #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
593
594 /* Page can be found in buf_pool */
595@@ -1663,7 +1687,7 @@
596
597 buf_block_free(free_block);
598
599-@@ -3855,6 +4039,7 @@
600+@@ -3855,6 +4058,7 @@
601 mutex_enter(&block->mutex);
602
603 buf_page_init(space, offset, fold, block);
604@@ -1671,7 +1695,7 @@
605
606 /* The block must be put to the LRU list */
607 buf_LRU_add_block(&block->page, FALSE);
608-@@ -3881,7 +4066,7 @@
609+@@ -3881,7 +4085,7 @@
610 the reacquisition of buf_pool->mutex. We also must
611 defer this operation until after the block descriptor
612 has been added to buf_pool->LRU and buf_pool->page_hash. */
613@@ -1680,7 +1704,7 @@
614 mutex_enter(&block->mutex);
615 block->page.zip.data = data;
616
617-@@ -3899,7 +4084,8 @@
618+@@ -3899,7 +4103,8 @@
619
620 buf_page_set_accessed(&block->page, time_ms);
621
622@@ -1690,7 +1714,7 @@
623
624 mtr_memo_push(mtr, block, MTR_MEMO_BUF_FIX);
625
626-@@ -3950,6 +4136,8 @@
627+@@ -3950,6 +4155,8 @@
628 buf_pool_t* buf_pool = buf_pool_from_bpage(bpage);
629 const ibool uncompressed = (buf_page_get_state(bpage)
630 == BUF_BLOCK_FILE_PAGE);
631@@ -1699,7 +1723,7 @@
632
633 ut_a(buf_page_in_file(bpage));
634
635-@@ -4083,8 +4271,26 @@
636+@@ -4083,8 +4290,26 @@
637 }
638 }
639
640@@ -1727,7 +1751,7 @@
641
642 #ifdef UNIV_IBUF_COUNT_DEBUG
643 if (io_type == BUF_IO_WRITE || uncompressed) {
644-@@ -4107,6 +4313,7 @@
645+@@ -4107,6 +4332,7 @@
646 the x-latch to this OS thread: do not let this confuse you in
647 debugging! */
648
649@@ -1735,7 +1759,7 @@
650 ut_ad(buf_pool->n_pend_reads > 0);
651 buf_pool->n_pend_reads--;
652 buf_pool->stat.n_pages_read++;
653-@@ -4124,6 +4331,9 @@
654+@@ -4124,6 +4350,9 @@
655
656 buf_flush_write_complete(bpage);
657
658@@ -1745,7 +1769,7 @@
659 if (uncompressed) {
660 rw_lock_s_unlock_gen(&((buf_block_t*) bpage)->lock,
661 BUF_IO_WRITE);
662-@@ -4146,8 +4356,8 @@
663+@@ -4146,8 +4375,8 @@
664 }
665 #endif /* UNIV_DEBUG */
666
667@@ -1755,7 +1779,7 @@
668 }
669
670 /*********************************************************************//**
671-@@ -4164,7 +4374,9 @@
672+@@ -4164,7 +4393,9 @@
673
674 ut_ad(buf_pool);
675
676@@ -1766,7 +1790,7 @@
677
678 chunk = buf_pool->chunks;
679
680-@@ -4181,7 +4393,9 @@
681+@@ -4181,7 +4412,9 @@
682 }
683 }
684
685@@ -1777,7 +1801,7 @@
686
687 return(TRUE);
688 }
689-@@ -4229,7 +4443,8 @@
690+@@ -4229,7 +4462,8 @@
691 freed = buf_LRU_search_and_free_block(buf_pool, 100);
692 }
693
694@@ -1787,7 +1811,7 @@
695
696 ut_ad(UT_LIST_GET_LEN(buf_pool->LRU) == 0);
697 ut_ad(UT_LIST_GET_LEN(buf_pool->unzip_LRU) == 0);
698-@@ -4242,7 +4457,8 @@
699+@@ -4242,7 +4476,8 @@
700 memset(&buf_pool->stat, 0x00, sizeof(buf_pool->stat));
701 buf_refresh_io_stats(buf_pool);
702
703@@ -1797,7 +1821,7 @@
704 }
705
706 /*********************************************************************//**
707-@@ -4284,7 +4500,10 @@
708+@@ -4284,7 +4519,10 @@
709
710 ut_ad(buf_pool);
711
712@@ -1809,7 +1833,7 @@
713
714 chunk = buf_pool->chunks;
715
716-@@ -4379,7 +4598,7 @@
717+@@ -4379,7 +4617,7 @@
718 /* Check clean compressed-only blocks. */
719
720 for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
721@@ -1818,7 +1842,7 @@
722 ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE);
723 switch (buf_page_get_io_fix(b)) {
724 case BUF_IO_NONE:
725-@@ -4410,7 +4629,7 @@
726+@@ -4410,7 +4648,7 @@
727
728 buf_flush_list_mutex_enter(buf_pool);
729 for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b;
730@@ -1827,7 +1851,7 @@
731 ut_ad(b->in_flush_list);
732 ut_a(b->oldest_modification);
733 n_flush++;
734-@@ -4469,6 +4688,8 @@
735+@@ -4469,6 +4707,8 @@
736 }
737
738 ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == n_lru);
739@@ -1836,7 +1860,7 @@
740 if (UT_LIST_GET_LEN(buf_pool->free) != n_free) {
741 fprintf(stderr, "Free list len %lu, free blocks %lu\n",
742 (ulong) UT_LIST_GET_LEN(buf_pool->free),
743-@@ -4479,8 +4700,11 @@
744+@@ -4479,8 +4719,11 @@
745 ut_a(buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE] == n_single_flush);
746 ut_a(buf_pool->n_flush[BUF_FLUSH_LIST] == n_list_flush);
747 ut_a(buf_pool->n_flush[BUF_FLUSH_LRU] == n_lru_flush);
748@@ -1849,7 +1873,7 @@
749
750 ut_a(buf_LRU_validate());
751 ut_a(buf_flush_validate(buf_pool));
752-@@ -4536,7 +4760,9 @@
753+@@ -4536,7 +4779,9 @@
754 index_ids = mem_alloc(size * sizeof *index_ids);
755 counts = mem_alloc(sizeof(ulint) * size);
756
757@@ -1860,7 +1884,7 @@
758 buf_flush_list_mutex_enter(buf_pool);
759
760 fprintf(stderr,
761-@@ -4605,7 +4831,9 @@
762+@@ -4605,7 +4850,9 @@
763 }
764 }
765
766@@ -1871,7 +1895,7 @@
767
768 for (i = 0; i < n_found; i++) {
769 index = dict_index_get_if_in_cache(index_ids[i]);
770-@@ -4662,7 +4890,7 @@
771+@@ -4662,7 +4909,7 @@
772 buf_chunk_t* chunk;
773 ulint fixed_pages_number = 0;
774
775@@ -1880,7 +1904,7 @@
776
777 chunk = buf_pool->chunks;
778
779-@@ -4696,7 +4924,7 @@
780+@@ -4696,7 +4943,7 @@
781 /* Traverse the lists of clean and dirty compressed-only blocks. */
782
783 for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
784@@ -1889,7 +1913,7 @@
785 ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE);
786 ut_a(buf_page_get_io_fix(b) != BUF_IO_WRITE);
787
788-@@ -4708,7 +4936,7 @@
789+@@ -4708,7 +4955,7 @@
790
791 buf_flush_list_mutex_enter(buf_pool);
792 for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b;
793@@ -1898,7 +1922,7 @@
794 ut_ad(b->in_flush_list);
795
796 switch (buf_page_get_state(b)) {
797-@@ -4734,7 +4962,7 @@
798+@@ -4734,7 +4981,7 @@
799
800 buf_flush_list_mutex_exit(buf_pool);
801 mutex_exit(&buf_pool->zip_mutex);
802@@ -1907,7 +1931,7 @@
803
804 return(fixed_pages_number);
805 }
806-@@ -4890,6 +5118,8 @@
807+@@ -4890,6 +5137,8 @@
808 /* Find appropriate pool_info to store stats for this buffer pool */
809 pool_info = &all_pool_info[pool_id];
810
811@@ -1916,7 +1940,7 @@
812 buf_pool_mutex_enter(buf_pool);
813 buf_flush_list_mutex_enter(buf_pool);
814
815-@@ -5000,6 +5230,8 @@
816+@@ -5000,6 +5249,8 @@
817 pool_info->unzip_cur = buf_LRU_stat_cur.unzip;
818
819 buf_refresh_io_stats(buf_pool);
820@@ -1925,7 +1949,7 @@
821 buf_pool_mutex_exit(buf_pool);
822 }
823
824-@@ -5241,11 +5473,13 @@
825+@@ -5241,11 +5492,13 @@
826 {
827 ulint len;
828

Subscribers

People subscribed via source and target branches