diff options
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/mtr0types.h | 3 | ||||
-rw-r--r-- | storage/innobase/include/trx0rseg.h | 18 | ||||
-rw-r--r-- | storage/innobase/include/trx0trx.h | 6 | ||||
-rw-r--r-- | storage/innobase/include/trx0trx.ic | 3 | ||||
-rw-r--r-- | storage/innobase/include/trx0undo.h | 35 |
5 files changed, 17 insertions, 48 deletions
diff --git a/storage/innobase/include/mtr0types.h b/storage/innobase/include/mtr0types.h index 0725a5405a4..d61455f5c9f 100644 --- a/storage/innobase/include/mtr0types.h +++ b/storage/innobase/include/mtr0types.h @@ -112,9 +112,6 @@ enum mlog_id_t { /** discard an update undo log header */ MLOG_UNDO_HDR_DISCARD = 23, - /** reuse an insert undo log header */ - MLOG_UNDO_HDR_REUSE = 24, - /** create an undo log header */ MLOG_UNDO_HDR_CREATE = 25, diff --git a/storage/innobase/include/trx0rseg.h b/storage/innobase/include/trx0rseg.h index a3e770b4f21..5a36f8a3038 100644 --- a/storage/innobase/include/trx0rseg.h +++ b/storage/innobase/include/trx0rseg.h @@ -169,20 +169,12 @@ struct trx_rseg_t { ulint curr_size; /*--------------------------------------------------------*/ - /* Fields for update undo logs */ - /** List of update undo logs */ - UT_LIST_BASE_NODE_T(trx_undo_t) update_undo_list; + /* Fields for undo logs */ + /** List of undo logs */ + UT_LIST_BASE_NODE_T(trx_undo_t) undo_list; - /** List of update undo log segments cached for fast reuse */ - UT_LIST_BASE_NODE_T(trx_undo_t) update_undo_cached; - - /*--------------------------------------------------------*/ - /* Fields for insert undo logs */ - /** List of insert undo logs */ - UT_LIST_BASE_NODE_T(trx_undo_t) insert_undo_list; - - /** List of insert undo log segments cached for fast reuse */ - UT_LIST_BASE_NODE_T(trx_undo_t) insert_undo_cached; + /** List of undo log segments cached for fast reuse */ + UT_LIST_BASE_NODE_T(trx_undo_t) undo_cached; /*--------------------------------------------------------*/ diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 55f80f584c5..9e0c3401460 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -850,10 +850,8 @@ struct trx_undo_ptr_t { trx_rseg_t* rseg; /*!< rollback segment assigned to the transaction, or NULL if not assigned yet */ - trx_undo_t* insert_undo; /*!< pointer to the insert undo log, or - NULL if no inserts performed yet */ - trx_undo_t* update_undo; /*!< pointer to the update undo log, or - NULL if no update performed yet */ + trx_undo_t* undo; /*!< pointer to the undo log, or + NULL if nothing logged yet */ }; /** An instance of temporary rollback segment. */ diff --git a/storage/innobase/include/trx0trx.ic b/storage/innobase/include/trx0trx.ic index e5fdcec919a..e6ce7886345 100644 --- a/storage/innobase/include/trx0trx.ic +++ b/storage/innobase/include/trx0trx.ic @@ -221,8 +221,7 @@ trx_is_redo_rseg_updated( /*=====================*/ const trx_t* trx) /*!< in: transaction */ { - return(trx->rsegs.m_redo.insert_undo != 0 - || trx->rsegs.m_redo.update_undo != 0); + return(trx->rsegs.m_redo.undo != 0); } /********************************************************************//** diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h index dcfbaaa02de..82a88f2ae96 100644 --- a/storage/innobase/include/trx0undo.h +++ b/storage/innobase/include/trx0undo.h @@ -257,18 +257,13 @@ A new undo log is created or a cached undo log reused. @param[in,out] trx transaction @param[in] rseg rollback segment @param[out] undo the undo log -@param[in] type TRX_UNDO_INSERT or TRX_UNDO_UPDATE @retval DB_SUCCESS on success @retval DB_TOO_MANY_CONCURRENT_TRXS @retval DB_OUT_OF_FILE_SPACE @retval DB_READ_ONLY @retval DB_OUT_OF_MEMORY */ dberr_t -trx_undo_assign_undo( - trx_t* trx, - trx_rseg_t* rseg, - trx_undo_t** undo, - ulint type) +trx_undo_assign_undo(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** undo) MY_ATTRIBUTE((nonnull, warn_unused_result)); /******************************************************************//** Sets the state of the undo log segment at a transaction finish. @@ -281,7 +276,7 @@ trx_undo_set_state_at_finish( /** Set the state of the undo log segment at a XA PREPARE or XA ROLLBACK. @param[in,out] trx transaction -@param[in,out] undo insert_undo or update_undo log +@param[in,out] undo undo log @param[in] rollback false=XA PREPARE, true=XA ROLLBACK @param[in,out] mtr mini-transaction @return undo log segment header page, x-latched */ @@ -305,13 +300,12 @@ trx_undo_update_cleanup( x-latched */ mtr_t* mtr); /*!< in: mtr */ -/** Free an insert or temporary undo log after commit or rollback. +/** Free a temporary undo log after commit or rollback. The information is not needed after a commit or rollback, therefore the data can be discarded. -@param[in,out] undo undo log -@param[in] is_temp whether this is temporary undo log */ +@param[in,out] undo undo log */ void -trx_undo_commit_cleanup(trx_undo_t* undo, bool is_temp); +trx_undo_commit_cleanup(trx_undo_t* undo); /********************************************************************//** At shutdown, frees the undo logs of a PREPARED transaction. */ @@ -343,8 +337,7 @@ trx_undo_parse_page_init( const byte* end_ptr,/*!< in: buffer end */ page_t* page, /*!< in: page or NULL */ mtr_t* mtr); /*!< in: mtr or NULL */ -/** Parse the redo log entry of an undo log page header create or reuse. -@param[in] type MLOG_UNDO_HDR_CREATE or MLOG_UNDO_HDR_REUSE +/** Parse the redo log entry of an undo log page header create. @param[in] ptr redo log record @param[in] end_ptr end of log buffer @param[in,out] page page frame or NULL @@ -352,7 +345,6 @@ trx_undo_parse_page_init( @return end of log record or NULL */ byte* trx_undo_parse_page_header( - mlog_id_t type, const byte* ptr, const byte* end_ptr, page_t* page, @@ -376,17 +368,10 @@ trx_undo_mem_free( #endif /* !UNIV_INNOCHECKSUM */ -/* Types of an undo log segment */ -#define TRX_UNDO_INSERT 1 /* contains undo entries for inserts */ -#define TRX_UNDO_UPDATE 2 /* contains undo entries for updates - and delete markings: in short, - modifys (the name 'UPDATE' is a - historical relic) */ /* States of an undo log segment */ #define TRX_UNDO_ACTIVE 1 /* contains an undo log of an active transaction */ #define TRX_UNDO_CACHED 2 /* cached for quick reuse */ -#define TRX_UNDO_TO_FREE 3 /* insert undo segment can be freed */ #define TRX_UNDO_TO_PURGE 4 /* update undo segment will not be reused: it can be freed in purge when all undo data in it is removed */ @@ -402,8 +387,6 @@ struct trx_undo_t { /*-----------------------------*/ ulint id; /*!< undo log slot number within the rollback segment */ - ulint type; /*!< TRX_UNDO_INSERT or - TRX_UNDO_UPDATE */ ulint state; /*!< state of the corresponding undo log segment */ ibool del_marks; /*!< relevant only in an update undo @@ -460,8 +443,8 @@ struct trx_undo_t { /*-------------------------------------------------------------*/ /** Transaction undo log page header offsets */ /* @{ */ -#define TRX_UNDO_PAGE_TYPE 0 /*!< TRX_UNDO_INSERT or - TRX_UNDO_UPDATE */ +#define TRX_UNDO_PAGE_TYPE 0 /*!< unused (was: TRX_UNDO_INSERT or + TRX_UNDO_UPDATE) */ #define TRX_UNDO_PAGE_START 2 /*!< Byte offset where the undo log records for the LATEST transaction start on this page (remember that @@ -559,7 +542,7 @@ page of an update undo log segment. */ #define TRX_UNDO_LOG_OLD_HDR_SIZE (34 + FLST_NODE_SIZE) /* Note: the writing of the undo log old header is coded by a log record -MLOG_UNDO_HDR_CREATE or MLOG_UNDO_HDR_REUSE. The appending of an XID to the +MLOG_UNDO_HDR_CREATE. The appending of an XID to the header is logged separately. In this sense, the XID is not really a member of the undo log header. TODO: do not append the XID to the log header if XA is not needed by the user. The XID wastes about 150 bytes of space in every |