~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/buf0buf.ic

Merge Stewart - update to innodb 1.0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
4
4
Copyright (c) 2008, Google Inc.
5
5
 
6
6
Portions of this file contain modifications contributed and copyrighted by
81
81
                unsigned        access_time = buf_page_is_accessed(bpage);
82
82
 
83
83
                if (access_time > 0
84
 
                    && (ut_time_ms() - access_time)
 
84
                    && ((ib_uint32_t) (ut_time_ms() - access_time))
85
85
                    >= buf_LRU_old_threshold_ms) {
86
86
                        return(TRUE);
87
87
                }
705
705
/*========================*/
706
706
        const buf_block_t*      block)  /*!< in: block */
707
707
{
 
708
        ut_ad(block);
 
709
        ut_ad(buf_page_in_file(&block->page));
 
710
#ifdef UNIV_SYNC_DEBUG
 
711
        ut_ad(rw_lock_own(&(((buf_block_t*) block)->lock), RW_LOCK_EXCLUSIVE)
 
712
              || rw_lock_own(&(((buf_block_t*) block)->lock), RW_LOCK_SHARED));
 
713
#endif /* UNIV_SYNC_DEBUG */
708
714
        return(block->lock_hash_val);
709
715
}
710
716
 
925
931
                ut_a(buf_page_in_file(bpage));
926
932
                ut_ad(bpage->in_page_hash);
927
933
                ut_ad(!bpage->in_zip_hash);
 
934
#if UNIV_WORD_SIZE == 4
 
935
                /* On 32-bit systems, there is no padding in
 
936
                buf_page_t.  On other systems, Valgrind could complain
 
937
                about uninitialized pad bytes. */
928
938
                UNIV_MEM_ASSERT_RW(bpage, sizeof *bpage);
 
939
#endif
929
940
        }
930
941
 
931
942
        return(bpage);