summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2002-06-26 21:42:40 +0300
committerunknown <heikki@hundin.mysql.fi>2002-06-26 21:42:40 +0300
commit36bcddf9a29e8b7a56ac6a7f689ef11ac6a72564 (patch)
tree8d11625d04470b87ef98e1758b68166027a03ea7 /innobase/include
parent0ae83cae796d1158f21605015fd47e1e4af652c8 (diff)
downloadmariadb-git-36bcddf9a29e8b7a56ac6a7f689ef11ac6a72564.tar.gz
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
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/buf0buf.ic4
1 files changed, 2 insertions, 2 deletions
diff --git a/innobase/include/buf0buf.ic b/innobase/include/buf0buf.ic
index 8f5443ad150..50248a7b2da 100644
--- a/innobase/include/buf0buf.ic
+++ b/innobase/include/buf0buf.ic
@@ -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);