Commit 27ded6f7 authored by marko's avatar marko

branches/zip: Support compressed-only pages in buf_page_create().

buf_page_get_gen(): Note that buf_read_page() may uncompress
a compressed-only page.

buf_page_create(): Test buf_page_in_file() instead of BUF_BLOCK_FILE_PAGE.
parent 13d63556
...@@ -1517,11 +1517,12 @@ loop: ...@@ -1517,11 +1517,12 @@ loop:
if (block == NULL if (block == NULL
|| UNIV_UNLIKELY(buf_block_get_state(block) || UNIV_UNLIKELY(buf_block_get_state(block)
!= BUF_BLOCK_FILE_PAGE)) { != BUF_BLOCK_FILE_PAGE)) {
/* Page not in buf_pool: needs to be read from file */ /* Uncompressed page not in buf_pool: needs to be
decompressed or read from file */
mutex_exit(&(buf_pool->mutex)); mutex_exit(&(buf_pool->mutex));
if (mode == BUF_GET_IF_IN_POOL) { if (!block && mode == BUF_GET_IF_IN_POOL) {
return(NULL); return(NULL);
} }
...@@ -2247,11 +2248,9 @@ buf_page_create( ...@@ -2247,11 +2248,9 @@ buf_page_create(
block = (buf_block_t*) buf_page_hash_get(space, offset); block = (buf_block_t*) buf_page_hash_get(space, offset);
if (block != NULL if (block && buf_page_in_file(&block->page)) {
&& buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE) {
#ifdef UNIV_IBUF_DEBUG #ifdef UNIV_IBUF_DEBUG
ut_a(ibuf_count_get(buf_block_get_space(block), ut_a(ibuf_count_get(space, offset) == 0);
buf_block_get_page_no(block)) == 0);
#endif #endif
#ifdef UNIV_DEBUG_FILE_ACCESSES #ifdef UNIV_DEBUG_FILE_ACCESSES
block->page.file_page_was_freed = FALSE; block->page.file_page_was_freed = FALSE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment