summaryrefslogtreecommitdiff
path: root/innobase/include/buf0buf.ic
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2002-06-26 21:42:40 +0300
committerheikki@hundin.mysql.fi <>2002-06-26 21:42:40 +0300
commitded1170888f6f0133cd831eb23dd57e0e3a1f555 (patch)
tree8d11625d04470b87ef98e1758b68166027a03ea7 /innobase/include/buf0buf.ic
parent7a94fdd405d08eceefd4586d3b87e69be15f76de (diff)
downloadmariadb-git-ded1170888f6f0133cd831eb23dd57e0e3a1f555.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
Diffstat (limited to 'innobase/include/buf0buf.ic')
-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);