From 82d93a5237d393938c97ad17c5a78ba1b14490a4 Mon Sep 17 00:00:00 2001 From: mmakela <> Date: Tue, 23 Mar 2010 11:50:18 +0000 Subject: [PATCH] branches/innodb+: Merge revisions 6801:6853 from branches/zip: ------------------------------------------------------------------------ r6805 | inaam | 2010-03-11 23:15:17 +0200 (Thu, 11 Mar 2010) | 6 lines Changed paths: M /branches/zip/os/os0file.c branches/zip issue#463 Fixed compiler warning about uninitialized variable. Non-functional change. ------------------------------------------------------------------------ r6828 | calvin | 2010-03-17 17:16:38 +0200 (Wed, 17 Mar 2010) | 7 lines Changed paths: M /branches/zip/CMakeLists.txt branches/zip: rename IB_HAVE_PAUSE_INSTRUCTION to HAVE_IB_PAUSE_INSTRUCTION in CMakeLists.txt. The rename was done as r5871, but CMakeLists.txt was forgotten. Also, add INNODB_RW_LOCKS_USE_ATOMICS to CMake. ------------------------------------------------------------------------ r6830 | marko | 2010-03-18 09:48:18 +0200 (Thu, 18 Mar 2010) | 3 lines Changed paths: M /branches/zip/ChangeLog M /branches/zip/include/buf0buf.ic 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. ------------------------------------------------------------------------ r6840 | calvin | 2010-03-19 00:32:23 +0200 (Fri, 19 Mar 2010) | 6 lines Changed paths: M /branches/zip/CMakeLists.txt M /branches/zip/ChangeLog branches/zip: Fix Bug #52102 InnoDB Plugin shows performance drop comparing to builtin InnoDB (Windows only). Disable Windows atomics by default. Approved by: Inaam ------------------------------------------------------------------------ r6853 | marko | 2010-03-22 13:35:29 +0200 (Mon, 22 Mar 2010) | 1 line Changed paths: M /branches/zip/include/sync0rw.h M /branches/zip/include/sync0sync.h branches/zip: mutex_own(), rw_lock_own(): Add attribute((warn_unused_result)). ------------------------------------------------------------------------ --- CMakeLists.txt | 4 ++++ ChangeLog | 14 ++++++++++++++ include/buf0buf.ic | 2 +- include/sync0rw.h | 3 ++- include/sync0sync.h | 3 ++- os/os0file.c | 3 +++ 6 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d10a6aaf3e..2bbaa094df6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,6 +234,10 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c usr/usr0sess.c ut/ut0byte.c ut/ut0dbg.c ut/ut0list.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c) +# Windows atomics do not perform well. Disable Windows atomics by default. +# See bug#52102 for details. +#ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DINNODB_RW_LOCKS_USE_ATOMICS -DHAVE_IB_PAUSE_INSTRUCTION) +ADD_DEFINITIONS(-DHAVE_IB_PAUSE_INSTRUCTION) IF(WITH_INNODB) # Legacy option diff --git a/ChangeLog b/ChangeLog index a8b8c52908d..3dc29ce1321 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-03-18 The InnoDB Team + + * CMakeLists.txt: + Fix Bug #52102 InnoDB Plugin shows performance drop comparing to + builtin InnoDB (Windows only). + Disable Windows atomics by default. + +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/include/buf0buf.ic b/include/buf0buf.ic index 0a3572e3e49..5a47c08ace7 100644 --- a/include/buf0buf.ic +++ b/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); } diff --git a/include/sync0rw.h b/include/sync0rw.h index aedfd5f3f86..630f6c30138 100644 --- a/include/sync0rw.h +++ b/include/sync0rw.h @@ -429,8 +429,9 @@ ibool rw_lock_own( /*========*/ rw_lock_t* lock, /*!< in: rw-lock */ - ulint lock_type); /*!< in: lock type: RW_LOCK_SHARED, + ulint lock_type) /*!< in: lock type: RW_LOCK_SHARED, RW_LOCK_EX */ + __attribute__((warn_unused_result)); #endif /* UNIV_SYNC_DEBUG */ /******************************************************************//** Checks if somebody has locked the rw-lock in the specified mode. */ diff --git a/include/sync0sync.h b/include/sync0sync.h index 09cab4ef4b7..a96edd3c361 100644 --- a/include/sync0sync.h +++ b/include/sync0sync.h @@ -206,7 +206,8 @@ UNIV_INTERN ibool mutex_own( /*======*/ - const mutex_t* mutex); /*!< in: mutex */ + const mutex_t* mutex) /*!< in: mutex */ + __attribute__((warn_unused_result)); #endif /* UNIV_DEBUG */ #ifdef UNIV_SYNC_DEBUG /******************************************************************//** diff --git a/os/os0file.c b/os/os0file.c index db81e23d90d..ae52bf3c6d5 100644 --- a/os/os0file.c +++ b/os/os0file.c @@ -4548,6 +4548,9 @@ os_aio_simulated_handle( ulint n; ulint i; + /* Fix compiler warning */ + *consecutive_ios = NULL; + segment = os_aio_get_array_and_local_segment(&array, global_segment); restart: