~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/row0purge.h

  • Committer: Brian Aker
  • Date: 2010-01-22 00:53:13 UTC
  • Revision ID: brian@gaz-20100122005313-jmizcbcdi1lt4tcx
Revert db patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/******************************************************
2
 
Purge obsolete records
3
 
 
4
 
(c) 1997 Innobase Oy
5
 
 
6
 
Created 3/14/1997 Heikki Tuuri
7
 
*******************************************************/
8
 
 
9
 
#ifndef row0purge_h
10
 
#define row0purge_h
11
 
 
12
 
#include "univ.i"
13
 
#include "data0data.h"
14
 
#include "btr0types.h"
15
 
#include "btr0pcur.h"
16
 
#include "dict0types.h"
17
 
#include "trx0types.h"
18
 
#include "que0types.h"
19
 
#include "row0types.h"
20
 
 
21
 
/************************************************************************
22
 
Creates a purge node to a query graph. */
23
 
 
24
 
purge_node_t*
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. */
33
 
 
34
 
que_thr_t*
35
 
row_purge_step(
36
 
/*===========*/
37
 
                                /* out: query thread to run next or NULL */
38
 
        que_thr_t*      thr);   /* in: query thread */
39
 
 
40
 
/* Purge node structure */
41
 
 
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
49
 
                                the purge array */
50
 
        dulint          undo_no;/* undo number of the record */
51
 
        ulint           rec_type;/* undo log record type: TRX_UNDO_INSERT_REC,
52
 
                                ... */
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
58
 
                                it */
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
62
 
                                record */
63
 
        dtuple_t*       ref;    /* NULL, or row reference to the next row to
64
 
                                handle */
65
 
        dtuple_t*       row;    /* NULL, or a copy (also fields copied to
66
 
                                heap) of the indexed fields of the row to
67
 
                                handle */
68
 
        dict_index_t*   index;  /* NULL, or the next index whose record should
69
 
                                be handled */
70
 
        mem_heap_t*     heap;   /* memory heap used as auxiliary storage for
71
 
                                row; this must be emptied after a successful
72
 
                                purge of a row */
73
 
};
74
 
 
75
 
#ifndef UNIV_NONINL
76
 
#include "row0purge.ic"
77
 
#endif
78
 
 
79
 
#endif