Commit 7aeb05d8 authored by marko's avatar marko

branches/innodb+: buf_page_get_gen(): Correct some ut_ad() assertions.

zip_size should always equal fil_space_get_zip_size(space), even when called
from ibuf.

ibuf_page() should be called with mtr=NULL to be equivalent to the original
implementation.  We cannot assume that mtr holds an x-latch on the insert
buffer bitmap page that covers the page that is being requested.
parent 93fdc0e4
......@@ -1877,18 +1877,14 @@ buf_page_get_gen(
|| (rw_latch == RW_X_LATCH)
|| (rw_latch == RW_NO_LATCH));
ut_ad((mode != BUF_GET_NO_LATCH) || (rw_latch == RW_NO_LATCH));
/* Check for acceptable modes. */
ut_ad(mode == BUF_GET
|| mode == BUF_GET_IF_IN_POOL
|| mode == BUF_GET_NO_LATCH
|| mode == BUF_GET_NOWAIT
|| mode == BUF_GET_IF_IN_POOL_OR_WATCH);
/* zip_size can be zero if called from ibuf. */
ut_ad(zip_size == 0 || zip_size == fil_space_get_zip_size(space));
ut_ad(zip_size == fil_space_get_zip_size(space));
#ifndef UNIV_LOG_DEBUG
ut_ad(!ibuf_inside() || ibuf_page(space, zip_size, offset, mtr));
ut_ad(!ibuf_inside() || ibuf_page(space, zip_size, offset, NULL));
#endif
buf_pool->n_page_gets++;
loop:
......
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