1
/******************************************************
6
Created 3/14/1997 Heikki Tuuri
7
*******************************************************/
13
#include "data0data.h"
14
#include "btr0types.h"
16
#include "dict0types.h"
17
#include "trx0types.h"
18
#include "que0types.h"
19
#include "row0types.h"
21
/************************************************************************
22
Creates a purge node to a query graph. */
25
row_purge_node_create(
26
/*==================*/
27
/* out, own: purge node */
28
que_thr_t* parent, /* in: parent node, i.e., a thr node */
29
mem_heap_t* heap); /* in: memory heap where created */
30
/***************************************************************
31
Does the purge operation for a single undo log record. This is a high-level
32
function used in an SQL execution graph. */
37
/* out: query thread to run next or NULL */
38
que_thr_t* thr); /* in: query thread */
40
/* Purge node structure */
42
struct purge_node_struct{
43
que_common_t common; /* node type: QUE_NODE_PURGE */
44
/*----------------------*/
45
/* Local storage for this graph node */
46
dulint roll_ptr;/* roll pointer to undo log record */
47
trx_undo_rec_t* undo_rec;/* undo log record */
48
trx_undo_inf_t* reservation;/* reservation for the undo log record in
50
dulint undo_no;/* undo number of the record */
51
ulint rec_type;/* undo log record type: TRX_UNDO_INSERT_REC,
53
btr_pcur_t pcur; /* persistent cursor used in searching the
54
clustered index record */
55
ibool found_clust;/* TRUE if the clustered index record
56
determined by ref was found in the clustered
57
index, and we were able to position pcur on
59
dict_table_t* table; /* table where purge is done */
60
ulint cmpl_info;/* compiler analysis info of an update */
61
upd_t* update; /* update vector for a clustered index
63
dtuple_t* ref; /* NULL, or row reference to the next row to
65
dtuple_t* row; /* NULL, or a copy (also fields copied to
66
heap) of the indexed fields of the row to
68
dict_index_t* index; /* NULL, or the next index whose record should
70
mem_heap_t* heap; /* memory heap used as auxiliary storage for
71
row; this must be emptied after a successful
76
#include "row0purge.ic"