mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
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
This commit is contained in:
parent
7a94fdd405
commit
ded1170888
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue