purge

/** The control structure used in the purge operation */ struct trx_purge_struct{ ulint state; /*!< Purge system state */ sess_t* sess; /*!< System session running the purge query */ trx_t* trx; /*!< System transaction running the purge query: this trx is not in the trx list of the trx system and it never ends */ que_t* query; /*!< The query graph which will do the parallelized purge operation */ rw_lock_t latch; /*!< The latch protecting the purge view. A purge operation must acquire an x-latch here for the instant at which it changes the purge view: an undo log operation can prevent this by obtaining an s-latch here. */ read_view_t* view; /*!< The purge will not remove undo logs which are >= this view (purge view) */ ulint n_pages_handled;/*!< Approximate number of undo log pages processed in purge */ ulint handle_limit; /*!< Target of how many pages to get processed in the current purge */ /*------------------------------*/ /* The following two fields form the 'purge pointer' which advances during a purge, and which is used in history list truncation */ trx_id_t purge_trx_no; /*!< Purge has advanced past all transactions whose number is less than this */ undo_no_t purge_undo_no; /*!< Purge has advanced past all records whose undo number is less than this */ /*-----------------------------*/ ibool next_stored; /*!< TRUE if the info of the next record to purge is stored below: if yes, then the transaction number and the undo number of the record are stored in purge_trx_no and purge_undo_no above */ trx_rseg_t* rseg; /*!< Rollback segment for the next undo record to purge */ ulint page_no; /*!< Page number for the next undo record to purge, page number of the log header, if dummy record */ ulint offset; /*!< Page offset for the next undo record to purge, 0 if the dummy record */ ulint hdr_page_no; /*!< Header page of the undo log where the next record to purge belongs */ ulint hdr_offset; /*!< Header byte offset on the page */ /*-----------------------------*/ trx_undo_arr_t* arr; /*!< Array of transaction numbers and undo numbers of the undo records currently under processing in purge */ mem_heap_t* heap; /*!< Temporary storage used during a purge: can be emptied after purge completes */ /*-----------------------------*/ ib_bh_t* ib_bh; /*!< Binary min-heap, ordered on rseg_queue_t::trx_no. It is protected by the bh_mutex */ mutex_t bh_mutex; /*!< Mutex protecting ib_bh */ };

你可能感兴趣的:(header,System,Graph,processing,Numbers,structure)