diff options
Diffstat (limited to 'storage/xtradb/buf/buf0buf.c')
-rw-r--r-- | storage/xtradb/buf/buf0buf.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/storage/xtradb/buf/buf0buf.c b/storage/xtradb/buf/buf0buf.c index ae4b2fba98d..b294c88497e 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 @@ -1998,7 +1998,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 +2556,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 +2581,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 +2597,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 +2608,6 @@ got_block: srv_pass_corrupt_table <= 1)) { mutex_exit(block_mutex); - return(NULL); } @@ -2622,6 +2626,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 +3791,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), |