ut_d(bpage->in_page_hash = FALSE);
/* relocate buf_pool->LRU */
-@@ -3729,8 +3729,8 @@
+@@ -3730,8 +3730,8 @@
bpage->in_zip_hash = FALSE;
bpage->in_flush_list = FALSE;
bpage->in_free_list = FALSE;
ut_d(bpage->in_page_hash = TRUE);
-@@ -3893,7 +3893,7 @@
+@@ -3894,7 +3894,7 @@
ibuf_merge_or_delete_for_page(NULL, space, offset, zip_size, TRUE);
/* Flush pages from the end of the LRU list if necessary */
diff -ruN a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
--- a/storage/innobase/buf/buf0flu.c 2010-12-03 15:18:48.868953442 +0900
+++ b/storage/innobase/buf/buf0flu.c 2010-12-03 15:20:49.599986956 +0900
-@@ -403,19 +403,21 @@
+@@ -431,19 +431,21 @@
buf_page_in_file(bpage) and in the LRU list */
{
#ifdef UNIV_DEBUG
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Error: buffer block state %lu"
-@@ -423,6 +425,7 @@
+@@ -451,6 +453,7 @@
(ulong) buf_page_get_state(bpage));
ut_print_buf(stderr, bpage, sizeof(buf_page_t));
putc('\n', stderr);
return(FALSE);
}
-@@ -1955,8 +1958,14 @@
+@@ -1983,8 +1986,14 @@
buf_page_t* bpage;
ulint n_replaceable;
ulint distance = 0;
n_replaceable = UT_LIST_GET_LEN(buf_pool->free);
-@@ -1967,7 +1976,13 @@
+@@ -1995,7 +2004,13 @@
+ BUF_FLUSH_EXTRA_MARGIN(buf_pool))
&& (distance < BUF_LRU_FREE_SEARCH_LEN(buf_pool))) {
mutex_enter(block_mutex);
-@@ -1982,11 +1997,18 @@
+@@ -2010,11 +2025,18 @@
bpage = UT_LIST_GET_PREV(LRU, bpage);
}
}
return(BUF_FLUSH_FREE_BLOCK_MARGIN(buf_pool)
-@@ -2004,7 +2026,8 @@
+@@ -2032,7 +2054,8 @@
void
buf_flush_free_margin(
/*==================*/
{
ulint n_to_flush;
-@@ -2015,7 +2038,7 @@
+@@ -2043,7 +2066,7 @@
n_flushed = buf_flush_LRU(buf_pool, n_to_flush);
/* There was an LRU type flush batch already running;
let us wait for it to end */
-@@ -2028,8 +2051,9 @@
+@@ -2056,8 +2079,9 @@
Flushes pages from the end of all the LRU lists. */
UNIV_INTERN
void
{
ulint i;
-@@ -2038,7 +2062,7 @@
+@@ -2066,7 +2090,7 @@
buf_pool = buf_pool_from_array(i);
diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
--- a/storage/innobase/buf/buf0lru.c 2010-11-03 07:01:13.000000000 +0900
+++ b/storage/innobase/buf/buf0lru.c 2010-12-03 15:20:49.602952786 +0900
-@@ -1016,7 +1016,7 @@
+@@ -992,7 +992,7 @@
/* No free block was found: try to flush the LRU list */
++srv_buf_pool_wait_free;
os_aio_simulated_wake_handler_threads();
-@@ -1213,7 +1213,7 @@
+@@ -1189,7 +1189,7 @@
/* Remove the block from the LRU list */
UT_LIST_REMOVE(LRU, buf_pool->LRU, bpage);
buf_unzip_LRU_remove_block_if_needed(bpage);
-@@ -1292,7 +1292,7 @@
+@@ -1268,7 +1268,7 @@
ut_ad(!bpage->in_LRU_list);
UT_LIST_ADD_LAST(LRU, buf_pool->LRU, bpage);
if (UT_LIST_GET_LEN(buf_pool->LRU) > BUF_LRU_OLD_MIN_LEN) {
-@@ -1362,7 +1362,7 @@
+@@ -1338,7 +1338,7 @@
buf_pool->LRU_old_len++;
}
if (UT_LIST_GET_LEN(buf_pool->LRU) > BUF_LRU_OLD_MIN_LEN) {
-@@ -1617,7 +1617,7 @@
+@@ -1589,7 +1589,7 @@
buf_page_set_old(b, buf_page_is_old(b));
#endif /* UNIV_LRU_DEBUG */
} else {
diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
--- a/storage/innobase/include/buf0buf.h 2010-11-03 07:01:13.000000000 +0900
+++ b/storage/innobase/include/buf0buf.h 2010-12-03 15:20:49.608986590 +0900
-@@ -1314,11 +1314,11 @@
+@@ -1385,11 +1385,11 @@
UT_LIST_NODE_T(buf_page_t) LRU;
/*!< node of the LRU list */