Commit 3e85f33c authored by unknown's avatar unknown

buf0buf.ic:

  Fix a bug: if buffer pool size > 2 GB on a 32-bit computer, we got an assertion failure because >> acted as a division operator (not as a register shift) for a wrapped-over integer value


innobase/include/buf0buf.ic:
  Fix a bug: if buffer pool size > 2 GB on a 32-bit computer, we got an assertion failure because >> acted as a division operator (not as a register shift) for a wrapped-over integer value
parent 82bd4dbd
......@@ -209,7 +209,7 @@ buf_block_align(
ut_ad((ulint)ptr >= (ulint)frame_zero);
block = buf_pool_get_nth_block(buf_pool, (ptr - frame_zero)
block = buf_pool_get_nth_block(buf_pool, ((ulint)(ptr - frame_zero))
>> UNIV_PAGE_SIZE_SHIFT);
ut_a(block >= buf_pool->blocks);
ut_a(block < buf_pool->blocks + buf_pool->max_size);
......@@ -236,7 +236,7 @@ buf_block_align_low(
ut_ad((ulint)ptr >= (ulint)frame_zero);
block = buf_pool_get_nth_block(buf_pool, (ptr - frame_zero)
block = buf_pool_get_nth_block(buf_pool, ((ulint)(ptr - frame_zero))
>> UNIV_PAGE_SIZE_SHIFT);
ut_a(block >= buf_pool->blocks);
ut_a(block < buf_pool->blocks + buf_pool->max_size);
......
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