summaryrefslogtreecommitdiff
path: root/innobase/buf/buf0buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/buf/buf0buf.c')
-rw-r--r--innobase/buf/buf0buf.c42
1 files changed, 37 insertions, 5 deletions
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c
index ee8e8b91f8d..c9a5ec5307f 100644
--- a/innobase/buf/buf0buf.c
+++ b/innobase/buf/buf0buf.c
@@ -331,6 +331,11 @@ buf_page_print(
index->table_name,
index->name);
}
+ } else if (fil_page_get_type(read_buf) == FIL_PAGE_INODE) {
+ fprintf(stderr, "InnoDB: Page may be an 'inode' page\n");
+ } else if (fil_page_get_type(read_buf) == FIL_PAGE_IBUF_FREE_LIST) {
+ fprintf(stderr,
+ "InnoDB: Page may be an insert buffer free list page\n");
}
}
@@ -351,6 +356,8 @@ buf_block_init(
block->file_page_was_freed = FALSE;
+ block->check_index_page_at_flush = FALSE;
+
rw_lock_create(&(block->lock));
ut_ad(rw_lock_validate(&(block->lock)));
@@ -617,6 +624,29 @@ buf_page_peek_block(
}
/************************************************************************
+Resets the check_index_page_at_flush field of a page if found in the buffer
+pool. */
+
+void
+buf_reset_check_index_page_at_flush(
+/*================================*/
+ ulint space, /* in: space id */
+ ulint offset) /* in: page number */
+{
+ buf_block_t* block;
+
+ mutex_enter_fast(&(buf_pool->mutex));
+
+ block = buf_page_hash_get(space, offset);
+
+ if (block) {
+ block->check_index_page_at_flush = FALSE;
+ }
+
+ mutex_exit(&(buf_pool->mutex));
+}
+
+/************************************************************************
Returns the current state of is_hashed of a page. FALSE if the page is
not in the pool. NOTE that this operation does not fix the page in the
pool if it is found there. */
@@ -1185,6 +1215,8 @@ buf_page_init(
block->space = space;
block->offset = offset;
+ block->check_index_page_at_flush = FALSE;
+
block->lock_hash_val = lock_rec_hash(space, offset);
block->lock_mutex = NULL;
@@ -1325,11 +1357,6 @@ buf_page_create(
ut_ad(mtr);
free_block = buf_LRU_get_free_block();
-
- /* Delete possible entries for the page from the insert buffer:
- such can exist if the page belonged to an index which was dropped */
-
- ibuf_merge_or_delete_for_page(NULL, space, offset);
mutex_enter(&(buf_pool->mutex));
@@ -1378,6 +1405,11 @@ buf_page_create(
mutex_exit(&(buf_pool->mutex));
+ /* Delete possible entries for the page from the insert buffer:
+ such can exist if the page belonged to an index which was dropped */
+
+ ibuf_merge_or_delete_for_page(NULL, space, offset);
+
/* Flush pages from the end of the LRU list if necessary */
buf_flush_free_margin();