Commit 6b2c92e1 authored by marko's avatar marko

branches/zip: Improve Valgrind instrumentation.

btr_cur_optimistic_insert(): On compressed tablespaces, check that both
the compressed and the uncompressed page are completely initialized in
the beginning of the function.

page_zip_compress(): After successful compression, check that the compressed
page is completely initialized.
parent 0a0f1720
......@@ -1029,6 +1029,12 @@ btr_cur_optimistic_insert(
page = buf_block_get_frame(block);
index = cursor->index;
zip_size = buf_block_get_zip_size(block);
#ifdef UNIV_DEBUG_VALGRIND
if (zip_size) {
UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE);
UNIV_MEM_ASSERT_RW(buf_block_get_page_zip(block), zip_size);
}
#endif /* UNIV_DEBUG_VALGRIND */
if (!dtuple_check_typed_no_assert(entry)) {
fputs("InnoDB: Error in a tuple to insert into ", stderr);
......
......@@ -1253,6 +1253,8 @@ zlib_error:
page_zip_compress_ok[page_zip->ssize]++;
UNIV_MEM_ASSERT_RW(page_zip, page_zip_get_size(page_zip));
return(TRUE);
}
......
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