From 7c6595890db2739f94ebe3a63a563e855a831d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 24 May 2013 13:58:42 +0300 Subject: [PATCH] Bug#16859867 INNODB_BUG14529666 FAILS SPORADICALLY IN VALGRIND i_s_innodb_buffer_page_get_info(): Do not read the buffer block frame contents of read-fixed blocks, because it may be invalid or uninitialized. When we are going to decompress or read a block, we will put it into buf_pool->page_hash and buf_pool->LRU, read-fix the block and release the mutexes for the duration of the reading or decompression. rb#2500 approved by Jimmy Yang --- storage/innobase/handler/i_s.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc index 64b6e0bc540..4e108d4d438 100644 --- a/storage/innobase/handler/i_s.cc +++ b/storage/innobase/handler/i_s.cc @@ -2890,6 +2890,16 @@ i_s_innodb_buffer_page_get_info( page_info->freed_page_clock = bpage->freed_page_clock; + switch (buf_page_get_io_fix(bpage)) { + case BUF_IO_NONE: + case BUF_IO_WRITE: + case BUF_IO_PIN: + break; + case BUF_IO_READ: + page_info->page_type = I_S_PAGE_TYPE_UNKNOWN; + return; + } + if (page_info->page_state == BUF_BLOCK_FILE_PAGE) { const buf_block_t*block;