Merge lp:~percona-dev/percona-server/5.1.57-remove_zip_clean into lp:percona-server/5.1

Proposed by Yasufumi Kinoshita
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 247
Proposed branch: lp:~percona-dev/percona-server/5.1.57-remove_zip_clean
Merge into: lp:percona-server/5.1
Diff against target: 628 lines (+540/-5)
1 file modified
innodb_fix_misc.patch (+540/-5)
To merge this branch: bzr merge lp:~percona-dev/percona-server/5.1.57-remove_zip_clean
Reviewer Review Type Date Requested Status
Stewart Smith Pending
Review via email: mp+65632@code.launchpad.net

Description of the change

fix for
http://bugs.mysql.com/bug.php?id=61341
is added innodb_fix_misc.patch

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

running this branch merged with trunk through param build: http://jenkins.percona.com/view/Percona%20Server%205.1/job/percona-server-5.1-param/31/

(to have extra check of my conflict resolution)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'innodb_fix_misc.patch'
--- innodb_fix_misc.patch 2011-05-10 07:31:20 +0000
+++ innodb_fix_misc.patch 2011-06-23 09:16:34 +0000
@@ -5,15 +5,466 @@
5# Bug fix for5# Bug fix for
6# http://bugs.mysql.com/56433 (always: because good for all users, and safe)6# http://bugs.mysql.com/56433 (always: because good for all users, and safe)
7# and http://bugs.mysql.com/51325 (optional: innodb_lazy_drop_table)7# and http://bugs.mysql.com/51325 (optional: innodb_lazy_drop_table)
8# and http://bugs.mysql.com/61341 (always for not-debug build)
8# were added. They may be removed in the future when will be fixed officially.9# were added. They may be removed in the future when will be fixed officially.
9#10#
10#!!! notice !!!11#!!! notice !!!
11# Any small change to this file in the main branch12# Any small change to this file in the main branch
12# should be done or reviewed by the maintainer!13# should be done or reviewed by the maintainer!
14diff -ruN a/storage/innodb_plugin/buf/buf0buddy.c b/storage/innodb_plugin/buf/buf0buddy.c
15--- a/storage/innodb_plugin/buf/buf0buddy.c 2011-06-23 17:58:32.811788353 +0900
16+++ b/storage/innodb_plugin/buf/buf0buddy.c 2011-06-23 17:59:22.291827133 +0900
17@@ -377,7 +377,9 @@
18 buf_page_t* bpage, /*!< in: block to relocate */
19 buf_page_t* dpage) /*!< in: free block to relocate to */
20 {
21+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
22 buf_page_t* b;
23+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
24
25 //ut_ad(buf_pool_mutex_own());
26 #ifdef UNIV_SYNC_DEBUG
27@@ -418,6 +420,7 @@
28 buf_relocate(bpage, dpage);
29 ut_d(bpage->state = BUF_BLOCK_ZIP_FREE);
30
31+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
32 /* relocate buf_pool->zip_clean */
33 mutex_enter(&flush_list_mutex);
34 b = UT_LIST_GET_PREV(zip_list, dpage);
35@@ -429,6 +432,7 @@
36 UT_LIST_ADD_FIRST(zip_list, buf_pool->zip_clean, dpage);
37 }
38 mutex_exit(&flush_list_mutex);
39+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
40
41 UNIV_MEM_INVALID(bpage, sizeof *bpage);
42
13diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0buf.c43diff -ruN a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0buf.c
14--- a/storage/innodb_plugin/buf/buf0buf.c 2011-02-21 20:31:57.781983359 +090044--- a/storage/innodb_plugin/buf/buf0buf.c 2011-02-21 20:31:57.781983359 +0900
15+++ b/storage/innodb_plugin/buf/buf0buf.c 2011-02-21 20:32:39.523946003 +090045+++ b/storage/innodb_plugin/buf/buf0buf.c 2011-02-21 20:32:39.523946003 +0900
16@@ -3243,6 +3243,7 @@46@@ -949,74 +949,6 @@
47 return(NULL);
48 }
49
50-/*********************************************************************//**
51-Checks that all blocks in the buffer chunk are in BUF_BLOCK_NOT_USED state.
52-@return TRUE if all freed */
53-static
54-ibool
55-buf_chunk_all_free(
56-/*===============*/
57- const buf_chunk_t* chunk) /*!< in: chunk being checked */
58-{
59- const buf_block_t* block;
60- ulint i;
61-
62- ut_ad(buf_pool);
63- ut_ad(buf_pool_mutex_own()); /* but we need all mutex here */
64-
65- block = chunk->blocks;
66-
67- for (i = chunk->size; i--; block++) {
68-
69- if (buf_block_get_state(block) != BUF_BLOCK_NOT_USED) {
70-
71- return(FALSE);
72- }
73- }
74-
75- return(TRUE);
76-}
77-
78-/********************************************************************//**
79-Frees a chunk of buffer frames. */
80-static
81-void
82-buf_chunk_free(
83-/*===========*/
84- buf_chunk_t* chunk) /*!< out: chunk of buffers */
85-{
86- buf_block_t* block;
87- const buf_block_t* block_end;
88-
89- ut_ad(buf_pool_mutex_own()); /* but we need all mutex here */
90-
91- block_end = chunk->blocks + chunk->size;
92-
93- for (block = chunk->blocks; block < block_end; block++) {
94- ut_a(buf_block_get_state(block) == BUF_BLOCK_NOT_USED);
95- ut_a(!block->page.zip.data);
96-
97- ut_ad(!block->page.in_LRU_list);
98- ut_ad(!block->in_unzip_LRU_list);
99- ut_ad(!block->page.in_flush_list);
100- /* Remove the block from the free list. */
101- mutex_enter(&free_list_mutex);
102- ut_ad(block->page.in_free_list);
103- UT_LIST_REMOVE(free, buf_pool->free, (&block->page));
104- mutex_exit(&free_list_mutex);
105-
106- /* Free the latches. */
107- mutex_free(&block->mutex);
108- rw_lock_free(&block->lock);
109-#ifdef UNIV_SYNC_DEBUG
110- rw_lock_free(&block->debug_latch);
111-#endif /* UNIV_SYNC_DEBUG */
112- UNIV_MEM_UNDESC(block);
113- }
114-
115- os_mem_free_large(chunk->mem, chunk->mem_size);
116-}
117-
118 /********************************************************************//**
119 Creates the buffer pool.
120 @return own: buf_pool object, NULL if not enough memory or error */
121@@ -1106,8 +1038,6 @@
122 chunk = chunks + buf_pool->n_chunks;
123
124 while (--chunk >= chunks) {
125- /* Bypass the checks of buf_chunk_free(), since they
126- would fail at shutdown. */
127 os_mem_free_large(chunk->mem, chunk->mem_size);
128 }
129
130@@ -1287,325 +1217,6 @@
131 }
132
133 /********************************************************************//**
134-Shrinks the buffer pool. */
135-static
136-void
137-buf_pool_shrink(
138-/*============*/
139- ulint chunk_size) /*!< in: number of pages to remove */
140-{
141- buf_chunk_t* chunks;
142- buf_chunk_t* chunk;
143- ulint max_size;
144- ulint max_free_size;
145- buf_chunk_t* max_chunk;
146- buf_chunk_t* max_free_chunk;
147-
148- ut_ad(!buf_pool_mutex_own());
149-
150-try_again:
151- btr_search_disable(); /* Empty the adaptive hash index again */
152- //buf_pool_mutex_enter();
153- mutex_enter(&LRU_list_mutex);
154-
155-shrink_again:
156- if (buf_pool->n_chunks <= 1) {
157-
158- /* Cannot shrink if there is only one chunk */
159- goto func_done;
160- }
161-
162- /* Search for the largest free chunk
163- not larger than the size difference */
164- chunks = buf_pool->chunks;
165- chunk = chunks + buf_pool->n_chunks;
166- max_size = max_free_size = 0;
167- max_chunk = max_free_chunk = NULL;
168-
169- while (--chunk >= chunks) {
170- if (chunk->size <= chunk_size
171- && chunk->size > max_free_size) {
172- if (chunk->size > max_size) {
173- max_size = chunk->size;
174- max_chunk = chunk;
175- }
176-
177- if (buf_chunk_all_free(chunk)) {
178- max_free_size = chunk->size;
179- max_free_chunk = chunk;
180- }
181- }
182- }
183-
184- if (!max_free_size) {
185-
186- ulint dirty = 0;
187- ulint nonfree = 0;
188- buf_block_t* block;
189- buf_block_t* bend;
190-
191- /* Cannot shrink: try again later
192- (do not assign srv_buf_pool_old_size) */
193- if (!max_chunk) {
194-
195- goto func_exit;
196- }
197-
198- block = max_chunk->blocks;
199- bend = block + max_chunk->size;
200-
201- /* Move the blocks of chunk to the end of the
202- LRU list and try to flush them. */
203- for (; block < bend; block++) {
204- switch (buf_block_get_state(block)) {
205- case BUF_BLOCK_NOT_USED:
206- continue;
207- case BUF_BLOCK_FILE_PAGE:
208- break;
209- default:
210- nonfree++;
211- continue;
212- }
213-
214- mutex_enter(&block->mutex);
215- /* The following calls will temporarily
216- release block->mutex and buf_pool_mutex.
217- Therefore, we have to always retry,
218- even if !dirty && !nonfree. */
219-
220- if (!buf_flush_ready_for_replace(&block->page)) {
221-
222- buf_LRU_make_block_old(&block->page);
223- dirty++;
224- } else if (buf_LRU_free_block(&block->page, TRUE, FALSE)
225- != BUF_LRU_FREED) {
226- nonfree++;
227- }
228-
229- mutex_exit(&block->mutex);
230- }
231-
232- //buf_pool_mutex_exit();
233- mutex_exit(&LRU_list_mutex);
234-
235- /* Request for a flush of the chunk if it helps.
236- Do not flush if there are non-free blocks, since
237- flushing will not make the chunk freeable. */
238- if (nonfree) {
239- /* Avoid busy-waiting. */
240- os_thread_sleep(100000);
241- } else if (dirty
242- && buf_flush_batch(BUF_FLUSH_LRU, dirty, 0)
243- == ULINT_UNDEFINED) {
244-
245- buf_flush_wait_batch_end(BUF_FLUSH_LRU);
246- }
247-
248- goto try_again;
249- }
250-
251- max_size = max_free_size;
252- max_chunk = max_free_chunk;
253-
254- srv_buf_pool_old_size = srv_buf_pool_size;
255-
256- /* Rewrite buf_pool->chunks. Copy everything but max_chunk. */
257- chunks = mem_alloc((buf_pool->n_chunks - 1) * sizeof *chunks);
258- memcpy(chunks, buf_pool->chunks,
259- (max_chunk - buf_pool->chunks) * sizeof *chunks);
260- memcpy(chunks + (max_chunk - buf_pool->chunks),
261- max_chunk + 1,
262- buf_pool->chunks + buf_pool->n_chunks
263- - (max_chunk + 1));
264- ut_a(buf_pool->curr_size > max_chunk->size);
265- buf_pool->curr_size -= max_chunk->size;
266- srv_buf_pool_curr_size = buf_pool->curr_size * UNIV_PAGE_SIZE;
267- chunk_size -= max_chunk->size;
268- buf_chunk_free(max_chunk);
269- mem_free(buf_pool->chunks);
270- buf_pool->chunks = chunks;
271- buf_pool->n_chunks--;
272-
273- /* Allow a slack of one megabyte. */
274- if (chunk_size > 1048576 / UNIV_PAGE_SIZE) {
275-
276- goto shrink_again;
277- }
278-
279-func_done:
280- srv_buf_pool_old_size = srv_buf_pool_size;
281-func_exit:
282- //buf_pool_mutex_exit();
283- mutex_exit(&LRU_list_mutex);
284- btr_search_enable();
285-}
286-
287-/********************************************************************//**
288-Rebuild buf_pool->page_hash. */
289-static
290-void
291-buf_pool_page_hash_rebuild(void)
292-/*============================*/
293-{
294- ulint i;
295- ulint n_chunks;
296- buf_chunk_t* chunk;
297- hash_table_t* page_hash;
298- hash_table_t* zip_hash;
299- buf_page_t* b;
300-
301- //buf_pool_mutex_enter();
302- mutex_enter(&LRU_list_mutex);
303- rw_lock_x_lock(&page_hash_latch);
304- mutex_enter(&flush_list_mutex);
305-
306-
307- /* Free, create, and populate the hash table. */
308- hash_table_free(buf_pool->page_hash);
309- buf_pool->page_hash = page_hash = hash_create(2 * buf_pool->curr_size);
310- zip_hash = hash_create(2 * buf_pool->curr_size);
311-
312- HASH_MIGRATE(buf_pool->zip_hash, zip_hash, buf_page_t, hash,
313- BUF_POOL_ZIP_FOLD_BPAGE);
314-
315- hash_table_free(buf_pool->zip_hash);
316- buf_pool->zip_hash = zip_hash;
317-
318- /* Insert the uncompressed file pages to buf_pool->page_hash. */
319-
320- chunk = buf_pool->chunks;
321- n_chunks = buf_pool->n_chunks;
322-
323- for (i = 0; i < n_chunks; i++, chunk++) {
324- ulint j;
325- buf_block_t* block = chunk->blocks;
326-
327- for (j = 0; j < chunk->size; j++, block++) {
328- if (buf_block_get_state(block)
329- == BUF_BLOCK_FILE_PAGE) {
330- ut_ad(!block->page.in_zip_hash);
331- ut_ad(block->page.in_page_hash);
332-
333- HASH_INSERT(buf_page_t, hash, page_hash,
334- buf_page_address_fold(
335- block->page.space,
336- block->page.offset),
337- &block->page);
338- }
339- }
340- }
341-
342- /* Insert the compressed-only pages to buf_pool->page_hash.
343- All such blocks are either in buf_pool->zip_clean or
344- in buf_pool->flush_list. */
345-
346- for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
347- b = UT_LIST_GET_NEXT(zip_list, b)) {
348- ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE);
349- ut_ad(!b->in_flush_list);
350- ut_ad(b->in_LRU_list);
351- ut_ad(b->in_page_hash);
352- ut_ad(!b->in_zip_hash);
353-
354- HASH_INSERT(buf_page_t, hash, page_hash,
355- buf_page_address_fold(b->space, b->offset), b);
356- }
357-
358- for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b;
359- b = UT_LIST_GET_NEXT(flush_list, b)) {
360- ut_ad(b->in_flush_list);
361- ut_ad(b->in_LRU_list);
362- ut_ad(b->in_page_hash);
363- ut_ad(!b->in_zip_hash);
364-
365- switch (buf_page_get_state(b)) {
366- case BUF_BLOCK_ZIP_DIRTY:
367- HASH_INSERT(buf_page_t, hash, page_hash,
368- buf_page_address_fold(b->space,
369- b->offset), b);
370- break;
371- case BUF_BLOCK_FILE_PAGE:
372- /* uncompressed page */
373- break;
374- case BUF_BLOCK_ZIP_FREE:
375- case BUF_BLOCK_ZIP_PAGE:
376- case BUF_BLOCK_NOT_USED:
377- case BUF_BLOCK_READY_FOR_USE:
378- case BUF_BLOCK_MEMORY:
379- case BUF_BLOCK_REMOVE_HASH:
380- ut_error;
381- break;
382- }
383- }
384-
385- //buf_pool_mutex_exit();
386- mutex_exit(&LRU_list_mutex);
387- rw_lock_x_unlock(&page_hash_latch);
388- mutex_exit(&flush_list_mutex);
389-}
390-
391-/********************************************************************//**
392-Resizes the buffer pool. */
393-UNIV_INTERN
394-void
395-buf_pool_resize(void)
396-/*=================*/
397-{
398- //buf_pool_mutex_enter();
399- mutex_enter(&LRU_list_mutex);
400-
401- if (srv_buf_pool_old_size == srv_buf_pool_size) {
402-
403- //buf_pool_mutex_exit();
404- mutex_exit(&LRU_list_mutex);
405- return;
406- }
407-
408- if (srv_buf_pool_curr_size + 1048576 > srv_buf_pool_size) {
409-
410- //buf_pool_mutex_exit();
411- mutex_exit(&LRU_list_mutex);
412-
413- /* Disable adaptive hash indexes and empty the index
414- in order to free up memory in the buffer pool chunks. */
415- buf_pool_shrink((srv_buf_pool_curr_size - srv_buf_pool_size)
416- / UNIV_PAGE_SIZE);
417- } else if (srv_buf_pool_curr_size + 1048576 < srv_buf_pool_size) {
418-
419- /* Enlarge the buffer pool by at least one megabyte */
420-
421- ulint mem_size
422- = srv_buf_pool_size - srv_buf_pool_curr_size;
423- buf_chunk_t* chunks;
424- buf_chunk_t* chunk;
425-
426- chunks = mem_alloc((buf_pool->n_chunks + 1) * sizeof *chunks);
427-
428- memcpy(chunks, buf_pool->chunks, buf_pool->n_chunks
429- * sizeof *chunks);
430-
431- chunk = &chunks[buf_pool->n_chunks];
432-
433- if (!buf_chunk_init(chunk, mem_size)) {
434- mem_free(chunks);
435- } else {
436- buf_pool->curr_size += chunk->size;
437- srv_buf_pool_curr_size = buf_pool->curr_size
438- * UNIV_PAGE_SIZE;
439- mem_free(buf_pool->chunks);
440- buf_pool->chunks = chunks;
441- buf_pool->n_chunks++;
442- }
443-
444- srv_buf_pool_old_size = srv_buf_pool_size;
445- //buf_pool_mutex_exit();
446- mutex_exit(&LRU_list_mutex);
447- }
448-
449- buf_pool_page_hash_rebuild();
450-}
451-
452-/********************************************************************//**
453 Moves a page to the start of the buffer pool LRU list. This high-level
454 function can be used to prevent an important page from slipping out of
455 the buffer pool. */
456@@ -2448,8 +2059,10 @@
457
458 if (buf_page_get_state(&block->page)
459 == BUF_BLOCK_ZIP_PAGE) {
460+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
461 UT_LIST_REMOVE(zip_list, buf_pool->zip_clean,
462 &block->page);
463+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
464 ut_ad(!block->page.in_flush_list);
465 } else {
466 /* Relocate buf_pool->flush_list. */
467@@ -3243,6 +2856,7 @@
17 bpage->state = BUF_BLOCK_ZIP_PAGE;468 bpage->state = BUF_BLOCK_ZIP_PAGE;
18 bpage->space = space;469 bpage->space = space;
19 bpage->offset = offset;470 bpage->offset = offset;
@@ -21,6 +472,18 @@
21 472
22 #ifdef UNIV_DEBUG473 #ifdef UNIV_DEBUG
23 bpage->in_page_hash = FALSE;474 bpage->in_page_hash = FALSE;
475@@ -3260,9 +2874,11 @@
476
477 /* The block must be put to the LRU list, to the old blocks */
478 buf_LRU_add_block(bpage, TRUE/* to old blocks */);
479+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
480 mutex_enter(&flush_list_mutex);
481 buf_LRU_insert_zip_clean(bpage);
482 mutex_exit(&flush_list_mutex);
483+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
484
485 mutex_exit(&LRU_list_mutex);
486
24diff -ruN a/storage/innodb_plugin/buf/buf0flu.c b/storage/innodb_plugin/buf/buf0flu.c487diff -ruN a/storage/innodb_plugin/buf/buf0flu.c b/storage/innodb_plugin/buf/buf0flu.c
25--- a/storage/innodb_plugin/buf/buf0flu.c 2011-02-21 20:31:57.784983260 +0900488--- a/storage/innodb_plugin/buf/buf0flu.c 2011-02-21 20:31:57.784983260 +0900
26+++ b/storage/innodb_plugin/buf/buf0flu.c 2011-02-21 20:32:39.524915732 +0900489+++ b/storage/innodb_plugin/buf/buf0flu.c 2011-02-21 20:32:39.524915732 +0900
@@ -47,10 +510,20 @@
47 if (flush_type != BUF_FLUSH_LRU) {510 if (flush_type != BUF_FLUSH_LRU) {
48 511
49 return(TRUE);512 return(TRUE);
513@@ -452,7 +459,9 @@
514 case BUF_BLOCK_ZIP_DIRTY:
515 buf_page_set_state(bpage, BUF_BLOCK_ZIP_PAGE);
516 UT_LIST_REMOVE(flush_list, buf_pool->flush_list, bpage);
517+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
518 buf_LRU_insert_zip_clean(bpage);
519+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
520 break;
521 case BUF_BLOCK_FILE_PAGE:
522 UT_LIST_REMOVE(flush_list, buf_pool->flush_list, bpage);
50diff -ruN a/storage/innodb_plugin/buf/buf0lru.c b/storage/innodb_plugin/buf/buf0lru.c523diff -ruN a/storage/innodb_plugin/buf/buf0lru.c b/storage/innodb_plugin/buf/buf0lru.c
51--- a/storage/innodb_plugin/buf/buf0lru.c 2011-02-21 20:31:57.451983310 +0900524--- a/storage/innodb_plugin/buf/buf0lru.c 2011-02-21 20:31:57.451983310 +0900
52+++ b/storage/innodb_plugin/buf/buf0lru.c 2011-02-21 20:32:39.526949096 +0900525+++ b/storage/innodb_plugin/buf/buf0lru.c 2011-02-21 20:32:39.526949096 +0900
53@@ -550,6 +550,30 @@526@@ -550,6 +550,31 @@
54 }527 }
55 }528 }
56 529
@@ -78,10 +551,19 @@
78+ mutex_exit(&LRU_list_mutex);551+ mutex_exit(&LRU_list_mutex);
79+}552+}
80+553+
554+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
81 /********************************************************************//**555 /********************************************************************//**
82 Insert a compressed block into buf_pool->zip_clean in the LRU order. */556 Insert a compressed block into buf_pool->zip_clean in the LRU order. */
83 UNIV_INTERN557 UNIV_INTERN
84@@ -1492,6 +1516,10 @@558@@ -583,6 +608,7 @@
559 UT_LIST_ADD_FIRST(zip_list, buf_pool->zip_clean, bpage);
560 }
561 }
562+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
563
564 /******************************************************************//**
565 Try to free an uncompressed page of a compressed block from the unzip
566@@ -1492,6 +1518,10 @@
85 return(BUF_LRU_NOT_FREED);567 return(BUF_LRU_NOT_FREED);
86 }568 }
87 569
@@ -92,6 +574,26 @@
92 #ifdef UNIV_IBUF_COUNT_DEBUG574 #ifdef UNIV_IBUF_COUNT_DEBUG
93 ut_a(ibuf_count_get(bpage->space, bpage->offset) == 0);575 ut_a(ibuf_count_get(bpage->space, bpage->offset) == 0);
94 #endif /* UNIV_IBUF_COUNT_DEBUG */576 #endif /* UNIV_IBUF_COUNT_DEBUG */
577@@ -1662,7 +1692,9 @@
578
579 mutex_enter(&flush_list_mutex);
580 if (b->state == BUF_BLOCK_ZIP_PAGE) {
581+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
582 buf_LRU_insert_zip_clean(b);
583+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
584 } else {
585 /* Relocate on buf_pool->flush_list. */
586 buf_flush_relocate_on_flush_list(bpage, b);
587@@ -1959,7 +1991,9 @@
588 ut_a(bpage->zip.data);
589 ut_a(buf_page_get_zip_size(bpage));
590
591+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
592 UT_LIST_REMOVE(zip_list, buf_pool->zip_clean, bpage);
593+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
594
595 mutex_exit(&buf_pool_zip_mutex);
596 //buf_pool_mutex_exit_forbid();
95diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c597diff -ruN a/storage/innodb_plugin/fil/fil0fil.c b/storage/innodb_plugin/fil/fil0fil.c
96--- a/storage/innodb_plugin/fil/fil0fil.c 2011-02-21 20:31:57.838984412 +0900598--- a/storage/innodb_plugin/fil/fil0fil.c 2011-02-21 20:31:57.838984412 +0900
97+++ b/storage/innodb_plugin/fil/fil0fil.c 2011-02-21 20:32:39.528914782 +0900599+++ b/storage/innodb_plugin/fil/fil0fil.c 2011-02-21 20:32:39.528914782 +0900
@@ -324,7 +826,20 @@
324diff -ruN a/storage/innodb_plugin/include/buf0buf.h b/storage/innodb_plugin/include/buf0buf.h826diff -ruN a/storage/innodb_plugin/include/buf0buf.h b/storage/innodb_plugin/include/buf0buf.h
325--- a/storage/innodb_plugin/include/buf0buf.h 2011-02-21 20:31:57.863983187 +0900827--- a/storage/innodb_plugin/include/buf0buf.h 2011-02-21 20:31:57.863983187 +0900
326+++ b/storage/innodb_plugin/include/buf0buf.h 2011-02-21 20:32:39.537912716 +0900828+++ b/storage/innodb_plugin/include/buf0buf.h 2011-02-21 20:32:39.537912716 +0900
327@@ -1156,6 +1156,7 @@829@@ -141,12 +141,6 @@
830 BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_ZIP_PAGE */
831 buf_page_t* dpage) /*!< in/out: destination control block */
832 __attribute__((nonnull));
833-/********************************************************************//**
834-Resizes the buffer pool. */
835-UNIV_INTERN
836-void
837-buf_pool_resize(void);
838-/*=================*/
839 /*********************************************************************//**
840 Gets the current size of buffer buf_pool in bytes.
841 @return size in bytes */
842@@ -1156,6 +1150,7 @@
328 0 if the block was never accessed843 0 if the block was never accessed
329 in the buffer pool */844 in the buffer pool */
330 /* @} */845 /* @} */
@@ -332,6 +847,17 @@
332 ibool is_corrupt;847 ibool is_corrupt;
333 # if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG848 # if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
334 ibool file_page_was_freed;849 ibool file_page_was_freed;
850@@ -1450,8 +1445,10 @@
851 frames and buf_page_t descriptors of blocks that exist
852 in the buffer pool only in compressed form. */
853 /* @{ */
854+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
855 UT_LIST_BASE_NODE_T(buf_page_t) zip_clean;
856 /*!< unmodified compressed pages */
857+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
858 UT_LIST_BASE_NODE_T(buf_page_t) zip_free[BUF_BUDDY_SIZES_MAX];
859 /*!< buddy free lists */
860 //#if BUF_BUDDY_HIGH != UNIV_PAGE_SIZE
335diff -ruN a/storage/innodb_plugin/include/buf0buf.ic b/storage/innodb_plugin/include/buf0buf.ic861diff -ruN a/storage/innodb_plugin/include/buf0buf.ic b/storage/innodb_plugin/include/buf0buf.ic
336--- a/storage/innodb_plugin/include/buf0buf.ic 2011-02-21 20:31:57.725983812 +0900862--- a/storage/innodb_plugin/include/buf0buf.ic 2011-02-21 20:31:57.725983812 +0900
337+++ b/storage/innodb_plugin/include/buf0buf.ic 2011-02-21 20:32:39.538913061 +0900863+++ b/storage/innodb_plugin/include/buf0buf.ic 2011-02-21 20:32:39.538913061 +0900
@@ -346,7 +872,7 @@
346diff -ruN a/storage/innodb_plugin/include/buf0lru.h b/storage/innodb_plugin/include/buf0lru.h872diff -ruN a/storage/innodb_plugin/include/buf0lru.h b/storage/innodb_plugin/include/buf0lru.h
347--- a/storage/innodb_plugin/include/buf0lru.h 2011-02-21 20:31:57.480924269 +0900873--- a/storage/innodb_plugin/include/buf0lru.h 2011-02-21 20:31:57.480924269 +0900
348+++ b/storage/innodb_plugin/include/buf0lru.h 2011-02-21 20:32:39.539912965 +0900874+++ b/storage/innodb_plugin/include/buf0lru.h 2011-02-21 20:32:39.539912965 +0900
349@@ -84,6 +84,13 @@875@@ -84,6 +84,14 @@
350 buf_LRU_invalidate_tablespace(876 buf_LRU_invalidate_tablespace(
351 /*==========================*/877 /*==========================*/
352 ulint id); /*!< in: space id */878 ulint id); /*!< in: space id */
@@ -357,9 +883,18 @@
357+buf_LRU_mark_space_was_deleted(883+buf_LRU_mark_space_was_deleted(
358+/*===========================*/884+/*===========================*/
359+ ulint id); /*!< in: space id */885+ ulint id); /*!< in: space id */
886+#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
360 /********************************************************************//**887 /********************************************************************//**
361 Insert a compressed block into buf_pool->zip_clean in the LRU order. */888 Insert a compressed block into buf_pool->zip_clean in the LRU order. */
362 UNIV_INTERN889 UNIV_INTERN
890@@ -91,6 +99,7 @@
891 buf_LRU_insert_zip_clean(
892 /*=====================*/
893 buf_page_t* bpage); /*!< in: pointer to the block in question */
894+#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
895
896 /******************************************************************//**
897 Try to free a block. If bpage is a descriptor of a compressed-only
363diff -ruN a/storage/innodb_plugin/include/os0file.h b/storage/innodb_plugin/include/os0file.h898diff -ruN a/storage/innodb_plugin/include/os0file.h b/storage/innodb_plugin/include/os0file.h
364--- a/storage/innodb_plugin/include/os0file.h 2011-02-21 20:31:57.870987755 +0900899--- a/storage/innodb_plugin/include/os0file.h 2011-02-21 20:31:57.870987755 +0900
365+++ b/storage/innodb_plugin/include/os0file.h 2011-02-21 20:32:39.540912738 +0900900+++ b/storage/innodb_plugin/include/os0file.h 2011-02-21 20:32:39.540912738 +0900

Subscribers

People subscribed via source and target branches