/*************************************************************** Doesthepurgeoperation.
@return query thread to run next */
que_thr_t*
row_purge_step( /*===========*/
que_thr_t* thr) /*!< in: query thread */
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Table context for purge operations. Uses pointer to store eitherTABLE*orMDL_ticket*inasingleunion FortablesWITHindexedvirtualcolumns: -OpensTABLE*viaopen_purge_table() -StoresTABLE*withLSB=1flaginmariadb_table -MDL_ticket*isaccessedviaTABLE->mdl_ticket -get_ticket()returnsTABLE->mdl_ticket
FortablesWITHOUTindexedvirtualcolumns: -OnlyacquiresMDL_ticket*(noTABLE*needed) -StoresMDL_ticket*withLSB=0intheunion
- get_ticket() returns the stored ticket directly */ class purge_table
{ union
{ /** TABLE* with the least signficant bit set */
uintptr_t mariadb_table; /** metadata lock when !get_mariadb_table() */
MDL_ticket *ticket;
}; public: /** Pointer to the InnoDB table, or nullptr if the table
no longer exists, or -1 if we failed to acquire a metadata lock */
dict_table_t *table;
/** DB_TRX_ID of the undo log record */
trx_id_t trx_id; /** DB_ROLL_PTR pointing to undo log record */
roll_ptr_t roll_ptr;
/** undo number of the record */
undo_no_t undo_no;
/** record type: TRX_UNDO_INSERT_REC, ... */
byte rec_type; /** compiler analysis info of an update */
byte cmpl_info; /** whether the clustered index record determined by ref was found intheclusteredindexofthetable,andwewereabletoposition
pcur on it */ bool found_clust; #ifdef UNIV_DEBUG /** whether the operation is in progress */ bool in_progress= false; #endif /** purge table handle */
purge_table pt; /** update vector for a clustered index record */
upd_t *update; /** row reference to the next row to handle, or nullptr */ const dtuple_t *ref; /** nullptr, or a deep copy of the indexed fields of the row to handle */
dtuple_t *row; /** nullptr, or the next index of table whose record should be handled */
dict_index_t *index; /** dummy transaction associated with current_thd */
trx_t *trx; /** memory heap used as auxiliary storage; must be emptied between rows */
mem_heap_t *heap; /** persistent cursor to the clustered index record */
btr_pcur_t pcur;
/** Undo recs to purge */
std::queue<trx_purge_rec_t> undo_recs;
/** map of table identifiers to table handles and TABLE* object,
which is set by purge co-ordinator thread */
std::unordered_map<table_id_t, purge_table> tables;
#ifdef UNIV_DEBUG /** Validate the persistent cursor. The purge node has two references totheclusteredindexrecord:refandpcur,whichmustmatch eachotheriffound_clust.
@return whether pcur is consistent with ref */ bool validate_pcur(); #endif
/** Start processing an undo log record. */ inlinevoid start();
/** Reset the state at end
@return the query graph parent */ inline que_node_t *end(THD *);
};
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.