From b5fb2639d8117701e0daeb1c9c952736b66b7132 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 1 Apr 2010 16:52:37 +0400 Subject: [PATCH] Applying InnoDB snapshot Detailed revision comments: r6830 | marko | 2010-03-18 09:48:18 +0200 (Thu, 18 Mar 2010) | 3 lines 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. --- storage/innodb_plugin/ChangeLog | 7 +++++++ storage/innodb_plugin/include/buf0buf.ic | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index a8b8c52908d..6aef312f7d0 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,10 @@ +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 * buf0buf.h, buf0buf.ic: diff --git a/storage/innodb_plugin/include/buf0buf.ic b/storage/innodb_plugin/include/buf0buf.ic index e5cbde73ff6..5ce9712c7fa 100644 --- a/storage/innodb_plugin/include/buf0buf.ic +++ b/storage/innodb_plugin/include/buf0buf.ic @@ -81,7 +81,7 @@ buf_page_peek_if_too_old( unsigned access_time = buf_page_is_accessed(bpage); if (access_time > 0 - && (ut_time_ms() - access_time) + && ((ib_uint32_t) (ut_time_ms() - access_time)) >= buf_LRU_old_threshold_ms) { return(TRUE); }