/********************************************************************//**
Creates a row undo node to a query graph.
@return own: undo node */
undo_node_t*
row_undo_node_create( /*=================*/
trx_t* trx, /*!< in: transaction */
que_thr_t* parent, /*!< in: parent node, i.e., a thr node */
mem_heap_t* heap); /*!< in: memory heap where created */ /***********************************************************//**
Looks for the clustered index record when node has the row reference.
The pcur in node is used in the search. If found, stores the row to node, and stores the position of pcur, and detaches it. The pcur must be closed
by the caller in any case.
@returntrueif found; NOTE the node->pcur must be closed by the
caller, regardless of the return value */ bool
row_undo_search_clust_to_pcur( /*==========================*/
undo_node_t* node) /*!< in/out: row undo node */
MY_ATTRIBUTE((warn_unused_result)); /***********************************************************//**
Undoes a row operation in a table. This is a high-level function used
in SQL execution graphs.
@return query thread to run next or NULL */
que_thr_t*
row_undo_step( /*==========*/
que_thr_t* thr); /*!< in: query thread */
/* A single query thread will try to perform the undo for all successive versionsofaclusteredindexrecord,ifthetransactionhasmodifiedit severaltimesduringtheexecutionwhichisrolledback.Itmayhappen thatthetaskistransferredtoanotherquerythread,iftheotherthread isassignedtohandleanundologrecordinthechainofdifferentversions oftherecord,andtheotherthreadhappenstogetthex-latchtothe clusteredindexrecordattherighttime. Ifaquerythreadnoticesthattheclusteredindexrecorditislooking forismissing,ortherollptrfieldintherecorddoesnotpointtothe undologrecordthethreadwasassignedtohandle,thenitgivesuptheundo taskforthatundologrecord,andfetchesthenext.Thissituationcanoccur justinthecasewherethetransactionmodifiedthesamerecordseveraltimes andanotherthreadiscurrentlydoingtheundoforsuccessiveversionsof
that index record. */
/** Undo node structure */ struct undo_node_t{
que_common_t common; /*!< node type: QUE_NODE_UNDO */ bool is_temp;/*!< whether this is a temporary table */
trx_t* trx; /*!< trx for which undo is done */
roll_ptr_t roll_ptr;/*!< roll pointer to undo log record */
trx_undo_rec_t* undo_rec;/*!< undo log record */
undo_no_t undo_no;/*!< undo number of the record */
byte rec_type;/*!< undo log record type: TRX_UNDO_INSERT_REC,
... */
trx_id_t new_trx_id; /*!< trx id to restore to clustered index
record */
btr_pcur_t pcur; /*!< persistent cursor used in searching the
clustered index record */
dict_table_t* table; /*!< table where undo is done */
ulint cmpl_info;/*!< compiler analysis of an update */
upd_t* update; /*!< update vector for a clustered index
record */ const dtuple_t* ref; /*!< row reference to the next row to handle */
dtuple_t* row; /*!< a copy (also fields copied to heap) of the
row to handle */
row_ext_t* ext; /*!< NULL, or prefixes of the externally
stored columns of the row */
dtuple_t* undo_row;/*!< NULL, or the row after undo */
row_ext_t* undo_ext;/*!< NULL, or prefixes of the externally
stored columns of undo_row */
dict_index_t* index; /*!< the next index whose record should be
handled */
mem_heap_t* heap; /*!< memory heap used as auxiliary storage for row;thismustbeemptiedafterundoistried
on a row */
};
#endif
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.