summaryrefslogtreecommitdiff
path: root/storage/xtradb/buf/buf0buddy.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/buf/buf0buddy.c')
-rw-r--r--storage/xtradb/buf/buf0buddy.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/storage/xtradb/buf/buf0buddy.c b/storage/xtradb/buf/buf0buddy.c
index e4a79026d3a..e6b80bcda55 100644
--- a/storage/xtradb/buf/buf0buddy.c
+++ b/storage/xtradb/buf/buf0buddy.c
@@ -452,6 +452,8 @@ buf_buddy_relocate(
buf_page_t* bpage;
const ulint size = BUF_BUDDY_LOW << i;
ullint usec = ut_time_us(NULL);
+ ulint space;
+ ulint page_no;
//ut_ad(buf_pool_mutex_own());
ut_ad(mutex_own(&zip_free_mutex));
@@ -490,11 +492,15 @@ buf_buddy_relocate(
pool), so there is nothing wrong about this. The
mach_read_from_4() calls here will only trigger bogus
Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */
- bpage = buf_page_hash_get(
- mach_read_from_4((const byte*) src
- + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID),
- mach_read_from_4((const byte*) src
- + FIL_PAGE_OFFSET));
+ space = mach_read_from_4(
+ (const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
+ page_no = mach_read_from_4(
+ (const byte*) src + FIL_PAGE_OFFSET);
+ /* Suppress Valgrind warnings about conditional jump
+ on uninitialized value. */
+ UNIV_MEM_VALID(&space, sizeof space);
+ UNIV_MEM_VALID(&page_no, sizeof page_no);
+ bpage = buf_page_hash_get(space, page_no);
if (!bpage || bpage->zip.data != src) {
/* The block has probably been freshly