diff options
Diffstat (limited to 'storage/xtradb/include/buf0buf.ic')
-rw-r--r-- | storage/xtradb/include/buf0buf.ic | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/storage/xtradb/include/buf0buf.ic b/storage/xtradb/include/buf0buf.ic index 10f0e02cb8f..b40285ae3f0 100644 --- a/storage/xtradb/include/buf0buf.ic +++ b/storage/xtradb/include/buf0buf.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -1193,7 +1193,7 @@ page_hash lock is acquired in the specified lock mode. Otherwise, mode value is ignored. It is up to the caller to release the lock. If the block is found and the lock is NULL then the page_hash lock is released by this function. -@return block, NULL if not found */ +@return block, NULL if not found, or watch sentinel (if watch is true) */ UNIV_INLINE buf_page_t* buf_page_hash_get_locked( @@ -1209,9 +1209,11 @@ buf_page_hash_get_locked( found. NULL otherwise. If NULL is passed then the hash_lock is released by this function */ - ulint lock_mode) /*!< in: RW_LOCK_EX or + ulint lock_mode, /*!< in: RW_LOCK_EX or RW_LOCK_SHARED. Ignored if lock == NULL */ + bool watch) /*!< in: if true, return watch + sentinel also. */ { buf_page_t* bpage = NULL; ulint fold; @@ -1242,7 +1244,9 @@ buf_page_hash_get_locked( bpage = buf_page_hash_get_low(buf_pool, space, offset, fold); if (!bpage || buf_pool_watch_is_sentinel(buf_pool, bpage)) { - bpage = NULL; + if (!watch) { + bpage = NULL; + } goto unlock_and_exit; } |