diff options
Diffstat (limited to 'storage/innobase/include/trx0undo.ic')
-rw-r--r-- | storage/innobase/include/trx0undo.ic | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/storage/innobase/include/trx0undo.ic b/storage/innobase/include/trx0undo.ic index 577759d6c3d..f8e74d0fb03 100644 --- a/storage/innobase/include/trx0undo.ic +++ b/storage/innobase/include/trx0undo.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -29,7 +29,7 @@ Created 3/26/1996 Heikki Tuuri #ifndef UNIV_HOTBACKUP /***********************************************************************//** Builds a roll pointer. -@return roll pointer */ +@return roll pointer */ UNIV_INLINE roll_ptr_t trx_undo_build_roll_ptr( @@ -85,7 +85,7 @@ trx_undo_decode_roll_ptr( /***********************************************************************//** Returns TRUE if the roll pointer is of the insert type. -@return TRUE if insert undo log */ +@return TRUE if insert undo log */ UNIV_INLINE ibool trx_undo_roll_ptr_is_insert( @@ -104,7 +104,7 @@ trx_undo_roll_ptr_is_insert( /***********************************************************************//** Returns true if the record is of the insert type. -@return true if the record was freshly inserted (not updated). */ +@return true if the record was freshly inserted (not updated). */ UNIV_INLINE bool trx_undo_trx_id_is_insert( @@ -140,7 +140,7 @@ trx_write_roll_ptr( Reads a roll ptr from an index page. In case that the roll ptr size changes in some future version, this function should be used instead of mach_read_... -@return roll ptr */ +@return roll ptr */ UNIV_INLINE roll_ptr_t trx_read_roll_ptr( @@ -154,41 +154,42 @@ trx_read_roll_ptr( } #ifndef UNIV_HOTBACKUP -/******************************************************************//** -Gets an undo log page and x-latches it. -@return pointer to page x-latched */ + +/** Gets an undo log page and x-latches it. +@param[in] page_id page id +@param[in] page_size page size +@param[in,out] mtr mini-transaction +@return pointer to page x-latched */ UNIV_INLINE page_t* trx_undo_page_get( -/*==============*/ - ulint space, /*!< in: space where placed */ - ulint zip_size, /*!< in: compressed page size in bytes - or 0 for uncompressed pages */ - ulint page_no, /*!< in: page number */ - mtr_t* mtr) /*!< in: mtr */ + const page_id_t& page_id, + const page_size_t& page_size, + mtr_t* mtr) { - buf_block_t* block = buf_page_get(space, zip_size, page_no, + buf_block_t* block = buf_page_get(page_id, page_size, RW_X_LATCH, mtr); + buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE); return(buf_block_get_frame(block)); } -/******************************************************************//** -Gets an undo log page and s-latches it. -@return pointer to page s-latched */ +/** Gets an undo log page and s-latches it. +@param[in] page_id page id +@param[in] page_size page size +@param[in,out] mtr mini-transaction +@return pointer to page s-latched */ UNIV_INLINE page_t* trx_undo_page_get_s_latched( -/*========================*/ - ulint space, /*!< in: space where placed */ - ulint zip_size, /*!< in: compressed page size in bytes - or 0 for uncompressed pages */ - ulint page_no, /*!< in: page number */ - mtr_t* mtr) /*!< in: mtr */ + const page_id_t& page_id, + const page_size_t& page_size, + mtr_t* mtr) { - buf_block_t* block = buf_page_get(space, zip_size, page_no, + buf_block_t* block = buf_page_get(page_id, page_size, RW_S_LATCH, mtr); + buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE); return(buf_block_get_frame(block)); @@ -197,7 +198,7 @@ trx_undo_page_get_s_latched( /******************************************************************//** Returns the start offset of the undo log records of the specified undo log on the page. -@return start offset */ +@return start offset */ UNIV_INLINE ulint trx_undo_page_get_start( @@ -222,7 +223,7 @@ trx_undo_page_get_start( /******************************************************************//** Returns the end offset of the undo log records of the specified undo log on the page. -@return end offset */ +@return end offset */ UNIV_INLINE ulint trx_undo_page_get_end( @@ -255,7 +256,7 @@ trx_undo_page_get_end( /******************************************************************//** Returns the previous undo record on the page in the specified log, or NULL if none exists. -@return pointer to record, NULL if none */ +@return pointer to record, NULL if none */ UNIV_INLINE trx_undo_rec_t* trx_undo_page_get_prev_rec( @@ -282,7 +283,7 @@ trx_undo_page_get_prev_rec( /******************************************************************//** Returns the next undo log record on the page in the specified log, or NULL if none exists. -@return pointer to record, NULL if none */ +@return pointer to record, NULL if none */ UNIV_INLINE trx_undo_rec_t* trx_undo_page_get_next_rec( @@ -312,7 +313,7 @@ trx_undo_page_get_next_rec( /******************************************************************//** Returns the last undo record on the page in the specified undo log, or NULL if none exists. -@return pointer to record, NULL if none */ +@return pointer to record, NULL if none */ UNIV_INLINE trx_undo_rec_t* trx_undo_page_get_last_rec( @@ -338,7 +339,7 @@ trx_undo_page_get_last_rec( /******************************************************************//** Returns the first undo record on the page in the specified undo log, or NULL if none exists. -@return pointer to record, NULL if none */ +@return pointer to record, NULL if none */ UNIV_INLINE trx_undo_rec_t* trx_undo_page_get_first_rec( |