diff options
Diffstat (limited to 'storage/innobase/include/fut0lst.ic')
-rw-r--r-- | storage/innobase/include/fut0lst.ic | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/storage/innobase/include/fut0lst.ic b/storage/innobase/include/fut0lst.ic index d18cf21378f..128dc77ed92 100644 --- a/storage/innobase/include/fut0lst.ic +++ b/storage/innobase/include/fut0lst.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -54,7 +54,9 @@ flst_write_addr( mtr_t* mtr) /*!< in: mini-transaction handle */ { ut_ad(faddr && mtr); - ut_ad(mtr_memo_contains_page(mtr, faddr, MTR_MEMO_PAGE_X_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, faddr, + MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_SX_FIX)); ut_a(addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA); ut_a(ut_align_offset(faddr, UNIV_PAGE_SIZE) >= FIL_PAGE_DATA); @@ -65,7 +67,7 @@ flst_write_addr( /********************************************************************//** Reads a file address. -@return file address */ +@return file address */ UNIV_INLINE fil_addr_t flst_read_addr( @@ -94,29 +96,29 @@ flst_init( flst_base_node_t* base, /*!< in: pointer to base node */ mtr_t* mtr) /*!< in: mini-transaction handle */ { - ut_ad(mtr_memo_contains_page(mtr, base, MTR_MEMO_PAGE_X_FIX)); + ut_ad(mtr_memo_contains_page_flagged(mtr, base, + MTR_MEMO_PAGE_X_FIX + | MTR_MEMO_PAGE_SX_FIX)); mlog_write_ulint(base + FLST_LEN, 0, MLOG_4BYTES, mtr); flst_write_addr(base + FLST_FIRST, fil_addr_null, mtr); flst_write_addr(base + FLST_LAST, fil_addr_null, mtr); } -/********************************************************************//** -Gets list length. -@return length */ +/** Get the length of a list. +@param[in] base base node +@return length */ UNIV_INLINE ulint flst_get_len( -/*=========*/ - const flst_base_node_t* base, /*!< in: pointer to base node */ - mtr_t* mtr) /*!< in: mini-transaction handle */ + const flst_base_node_t* base) { - return(mtr_read_ulint(base + FLST_LEN, MLOG_4BYTES, mtr)); + return(mach_read_from_4(base + FLST_LEN)); } /********************************************************************//** Gets list first node address. -@return file address */ +@return file address */ UNIV_INLINE fil_addr_t flst_get_first( @@ -129,7 +131,7 @@ flst_get_first( /********************************************************************//** Gets list last node address. -@return file address */ +@return file address */ UNIV_INLINE fil_addr_t flst_get_last( @@ -142,7 +144,7 @@ flst_get_last( /********************************************************************//** Gets list next node address. -@return file address */ +@return file address */ UNIV_INLINE fil_addr_t flst_get_next_addr( @@ -155,7 +157,7 @@ flst_get_next_addr( /********************************************************************//** Gets list prev node address. -@return file address */ +@return file address */ UNIV_INLINE fil_addr_t flst_get_prev_addr( |