summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2010-05-11 13:50:12 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2010-05-11 13:50:12 +0300
commit80142dd779c7d45b025417b71fd8bdbffab6840f (patch)
tree5189adfad065f27576e48fc4474bfaa32266b49a /storage
parentb7cf210256fbebc458c266d46c767e66cac61369 (diff)
downloadmariadb-git-80142dd779c7d45b025417b71fd8bdbffab6840f.tar.gz
Do not demand that buf_page_t be fully initialized on 64-bit systems.
There may be padding before buf_page_t::zip. (Bug #53307)
Diffstat (limited to 'storage')
-rw-r--r--storage/innodb_plugin/buf/buf0lru.c10
-rw-r--r--storage/innodb_plugin/include/buf0buf.ic5
2 files changed, 15 insertions, 0 deletions
diff --git a/storage/innodb_plugin/buf/buf0lru.c b/storage/innodb_plugin/buf/buf0lru.c
index 9cfa02ba3ac..1fa7c088297 100644
--- a/storage/innodb_plugin/buf/buf0lru.c
+++ b/storage/innodb_plugin/buf/buf0lru.c
@@ -1393,7 +1393,12 @@ buf_LRU_free_block(
ut_ad(buf_page_in_file(bpage));
ut_ad(bpage->in_LRU_list);
ut_ad(!bpage->in_flush_list == !bpage->oldest_modification);
+#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
if (!buf_page_can_relocate(bpage)) {
@@ -1688,7 +1693,12 @@ buf_LRU_block_remove_hashed_page(
ut_a(buf_page_get_io_fix(bpage) == BUF_IO_NONE);
ut_a(bpage->buf_fix_count == 0);
+#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
buf_LRU_remove_block(bpage);
diff --git a/storage/innodb_plugin/include/buf0buf.ic b/storage/innodb_plugin/include/buf0buf.ic
index 378c3590181..23db684806c 100644
--- a/storage/innodb_plugin/include/buf0buf.ic
+++ b/storage/innodb_plugin/include/buf0buf.ic
@@ -931,7 +931,12 @@ buf_page_hash_get(
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);