标签:
/******************************************************************//** Returns the control block of a file page, NULL if not found. @return block, NULL if not found */ UNIV_INLINE buf_page_t* buf_page_hash_get_low( /*==================*/ buf_pool_t* buf_pool, /*!< buffer pool instance */ ulint space, /*!< in: space id */ ulint offset, /*!< in: offset of the page within space */ ulint fold) /*!< in: buf_page_address_fold( space, offset) */ { buf_page_t* bpage; ut_ad(buf_pool); ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(fold == buf_page_address_fold(space, offset)); /* Look for the page in the hash table */ HASH_SEARCH(hash, buf_pool->page_hash, fold, buf_page_t*, bpage, ut_ad(bpage->in_page_hash && !bpage->in_zip_hash && buf_page_in_file(bpage)), bpage->space == space && bpage->offset == offset); if (bpage) { ut_a(buf_page_in_file(bpage)); ut_ad(bpage->in_page_hash); ut_ad(!bpage->in_zip_hash); #if UNIV_WORD_SIZE == 4 /* On 32-bit systems, there is no padding in buf_page_t. On other systems, Valgrind could complain about uninitialized pad bytes. */ UNIV_MEM_ASSERT_RW(bpage, sizeof *bpage); #endif } return(bpage); }
标签:
原文地址:http://www.cnblogs.com/taek/p/4995756.html