Commit 583a4fb4 authored by marko's avatar marko

branches/innodb+: buf0buf.c: Fix some assertions.

buf_page_get_gen(): Once again, zip_size must always match the
compressed page size of the tablespace where the page is requested from.
This seems to hold also for all calls from the insert buffer.

buf_page_optimistic_get_func(): Do not pass mtr to ibuf_page(), because
there is no guarantee that mtr would contain an x-latch to the insert
buffer bitmap page that covers (block->page.space, block->page.offset).
parent 7aeb05d8
...@@ -1940,9 +1940,7 @@ buf_page_get_gen( ...@@ -1940,9 +1940,7 @@ buf_page_get_gen(
goto loop; goto loop;
} }
/* zip_size can be 0 if called from ibuf */ ut_ad(page_zip_get_size(&block->page.zip) == zip_size);
ut_ad(zip_size == 0
|| page_zip_get_size(&block->page.zip) == zip_size);
must_read = buf_block_get_io_fix(block) == BUF_IO_READ; must_read = buf_block_get_io_fix(block) == BUF_IO_READ;
...@@ -1950,8 +1948,8 @@ buf_page_get_gen( ...@@ -1950,8 +1948,8 @@ buf_page_get_gen(
&& (mode == BUF_GET_IF_IN_POOL && (mode == BUF_GET_IF_IN_POOL
|| mode == BUF_GET_IF_IN_POOL_OR_WATCH)) { || mode == BUF_GET_IF_IN_POOL_OR_WATCH)) {
/* The page is being read to bufer pool, /* The page is being read to buffer pool,
but we can't wait around for the read to but we cannot wait around for the read to
complete. */ complete. */
if (mode == BUF_GET_IF_IN_POOL_OR_WATCH) { if (mode == BUF_GET_IF_IN_POOL_OR_WATCH) {
...@@ -2265,7 +2263,7 @@ buf_page_optimistic_get_func( ...@@ -2265,7 +2263,7 @@ buf_page_optimistic_get_func(
ut_ad(!ibuf_inside() ut_ad(!ibuf_inside()
|| ibuf_page(buf_block_get_space(block), || ibuf_page(buf_block_get_space(block),
buf_block_get_zip_size(block), buf_block_get_zip_size(block),
buf_block_get_page_no(block), mtr)); buf_block_get_page_no(block), NULL));
if (rw_latch == RW_S_LATCH) { if (rw_latch == RW_S_LATCH) {
success = rw_lock_s_lock_func_nowait(&(block->lock), success = rw_lock_s_lock_func_nowait(&(block->lock),
......
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