Commit 9b12ed37 authored by marko's avatar marko

branches/zip: buf_page_peek_if_too_old(): Use 32-bit arithmetics

when comparing the age of access_time to buf_LRU_old_threshold_ms.
This fixes a bug on 64-bit systems.
parent 28b2767c
2010-03-18 The InnoDB Team
* buf0buf.ic:
When comparing the time of the first access to a block against
innodb_old_blocks_time, use 32-bit arithmetics. The comparison
was incorrect on 64-bit systems.
2010-03-11 The InnoDB Team 2010-03-11 The InnoDB Team
* buf0buf.h, buf0buf.ic: * buf0buf.h, buf0buf.ic:
......
...@@ -81,7 +81,7 @@ buf_page_peek_if_too_old( ...@@ -81,7 +81,7 @@ buf_page_peek_if_too_old(
unsigned access_time = buf_page_is_accessed(bpage); unsigned access_time = buf_page_is_accessed(bpage);
if (access_time > 0 if (access_time > 0
&& (ut_time_ms() - access_time) && ((ib_uint32_t) (ut_time_ms() - access_time))
>= buf_LRU_old_threshold_ms) { >= buf_LRU_old_threshold_ms) {
return(TRUE); return(TRUE);
} }
......
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