summaryrefslogtreecommitdiff
path: root/storage/xtradb/buf
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/buf')
-rw-r--r--storage/xtradb/buf/buf0buf.c28
-rw-r--r--storage/xtradb/buf/buf0rea.c2
2 files changed, 22 insertions, 8 deletions
diff --git a/storage/xtradb/buf/buf0buf.c b/storage/xtradb/buf/buf0buf.c
index ae4b2fba98d..1084dcdf344 100644
--- a/storage/xtradb/buf/buf0buf.c
+++ b/storage/xtradb/buf/buf0buf.c
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
@@ -581,6 +581,8 @@ UNIV_INTERN
ibool
buf_page_is_corrupted(
/*==================*/
+ ibool check_lsn, /*!< in: TRUE if we need to check
+ and complain about the LSN */
const byte* read_buf, /*!< in: a database page */
ulint zip_size) /*!< in: size of compressed page;
0 for uncompressed pages */
@@ -600,7 +602,7 @@ buf_page_is_corrupted(
}
#ifndef UNIV_HOTBACKUP
- if (recv_lsn_checks_on) {
+ if (check_lsn && recv_lsn_checks_on) {
ib_uint64_t current_lsn;
if (log_peek_lsn(&current_lsn)
@@ -1998,7 +2000,7 @@ lookup:
buf_read_page(space, zip_size, offset, trx);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
- ut_a(++buf_dbg_counter % 37 || buf_validate());
+ ut_a(++buf_dbg_counter % 5771 || buf_validate());
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
}
@@ -2556,6 +2558,10 @@ loop2:
retries = 0;
} else if (retries < BUF_PAGE_READ_MAX_RETRIES) {
++retries;
+ DBUG_EXECUTE_IF(
+ "innodb_page_corruption_retries",
+ retries = BUF_PAGE_READ_MAX_RETRIES;
+ );
} else {
fprintf(stderr, "InnoDB: Error: Unable"
" to read tablespace %lu page no"
@@ -2577,7 +2583,7 @@ loop2:
}
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
- ut_a(++buf_dbg_counter % 37 || buf_validate());
+ ut_a(++buf_dbg_counter % 5771 || buf_validate());
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
goto loop;
}
@@ -2593,6 +2599,7 @@ got_block:
/* The page is being read to buffer pool,
but we cannot wait around for the read to
complete. */
+null_exit:
//buf_pool_mutex_exit(buf_pool);
mutex_exit(block_mutex);
@@ -2603,7 +2610,6 @@ got_block:
srv_pass_corrupt_table <= 1)) {
mutex_exit(block_mutex);
-
return(NULL);
}
@@ -2622,6 +2628,14 @@ got_block:
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
ut_ad(block_mutex == &buf_pool->zip_mutex);
+ if (mode == BUF_PEEK_IF_IN_POOL) {
+ /* This mode is only used for dropping an
+ adaptive hash index. There cannot be an
+ adaptive hash index for a compressed-only
+ page, so do not bother decompressing the page. */
+ goto null_exit;
+ }
+
bpage = &block->page;
/* Protect bpage->buf_fix_count. */
//mutex_enter(&buf_pool->zip_mutex);
@@ -3779,7 +3793,7 @@ buf_page_create(
memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
- ut_a(++buf_dbg_counter % 357 || buf_validate());
+ ut_a(++buf_dbg_counter % 5771 || buf_validate());
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
#ifdef UNIV_IBUF_COUNT_DEBUG
ut_a(ibuf_count_get(buf_block_get_space(block),
@@ -3933,7 +3947,7 @@ buf_page_io_complete(
/* From version 3.23.38 up we store the page checksum
to the 4 first bytes of the page end lsn field */
- if (buf_page_is_corrupted(frame,
+ if (buf_page_is_corrupted(TRUE, frame,
buf_page_get_zip_size(bpage))) {
corrupt:
fprintf(stderr,
diff --git a/storage/xtradb/buf/buf0rea.c b/storage/xtradb/buf/buf0rea.c
index 5edbeadb64e..628107d64dc 100644
--- a/storage/xtradb/buf/buf0rea.c
+++ b/storage/xtradb/buf/buf0rea.c
@@ -220,7 +220,7 @@ not_to_recover:
ut_ad(buf_page_in_file(bpage));
- if(sync) {
+ if (sync) {
thd_wait_begin(NULL, THD_WAIT_DISKIO);
}