~stewart/haildb/trunk

« back to all changes in this revision

Viewing changes to include/row0purge.h

  • Committer: Stewart Smith
  • Date: 2010-04-09 07:57:43 UTC
  • Revision ID: stewart@flamingspork.com-20100409075743-jfh1oml3el1uouvh
Embedded InnoDB 1.0.0 released

2009-04-21      The InnoDB Team

        Embedded InnoDB 1.0.0 released

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 
 
3
Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved.
 
4
 
 
5
This program is free software; you can redistribute it and/or modify it under
 
6
the terms of the GNU General Public License as published by the Free Software
 
7
Foundation; version 2 of the License.
 
8
 
 
9
This program is distributed in the hope that it will be useful, but WITHOUT
 
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
12
 
 
13
You should have received a copy of the GNU General Public License along with
 
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
15
Place, Suite 330, Boston, MA 02111-1307 USA
 
16
 
 
17
*****************************************************************************/
 
18
 
 
19
/******************************************************
 
20
Purge obsolete records
 
21
 
 
22
Created 3/14/1997 Heikki Tuuri
 
23
*******************************************************/
 
24
 
 
25
#ifndef row0purge_h
 
26
#define row0purge_h
 
27
 
 
28
#include "univ.i"
 
29
#include "data0data.h"
 
30
#include "btr0types.h"
 
31
#include "btr0pcur.h"
 
32
#include "dict0types.h"
 
33
#include "trx0types.h"
 
34
#include "que0types.h"
 
35
#include "row0types.h"
 
36
 
 
37
/************************************************************************
 
38
Creates a purge node to a query graph. */
 
39
UNIV_INTERN
 
40
purge_node_t*
 
41
row_purge_node_create(
 
42
/*==================*/
 
43
                                /* out, own: purge node */
 
44
        que_thr_t*      parent, /* in: parent node, i.e., a thr node */
 
45
        mem_heap_t*     heap);  /* in: memory heap where created */
 
46
/***************************************************************
 
47
Does the purge operation for a single undo log record. This is a high-level
 
48
function used in an SQL execution graph. */
 
49
UNIV_INTERN
 
50
que_thr_t*
 
51
row_purge_step(
 
52
/*===========*/
 
53
                                /* out: query thread to run next or NULL */
 
54
        que_thr_t*      thr);   /* in: query thread */
 
55
 
 
56
/* Purge node structure */
 
57
 
 
58
struct purge_node_struct{
 
59
        que_common_t    common; /* node type: QUE_NODE_PURGE */
 
60
        /*----------------------*/
 
61
        /* Local storage for this graph node */
 
62
        dulint          roll_ptr;/* roll pointer to undo log record */
 
63
        trx_undo_rec_t* undo_rec;/* undo log record */
 
64
        trx_undo_inf_t* reservation;/* reservation for the undo log record in
 
65
                                the purge array */
 
66
        dulint          undo_no;/* undo number of the record */
 
67
        ulint           rec_type;/* undo log record type: TRX_UNDO_INSERT_REC,
 
68
                                ... */
 
69
        btr_pcur_t      pcur;   /* persistent cursor used in searching the
 
70
                                clustered index record */
 
71
        ibool           found_clust;/* TRUE if the clustered index record
 
72
                                determined by ref was found in the clustered
 
73
                                index, and we were able to position pcur on
 
74
                                it */
 
75
        dict_table_t*   table;  /* table where purge is done */
 
76
        ulint           cmpl_info;/* compiler analysis info of an update */
 
77
        upd_t*          update; /* update vector for a clustered index
 
78
                                record */
 
79
        dtuple_t*       ref;    /* NULL, or row reference to the next row to
 
80
                                handle */
 
81
        dtuple_t*       row;    /* NULL, or a copy (also fields copied to
 
82
                                heap) of the indexed fields of the row to
 
83
                                handle */
 
84
        dict_index_t*   index;  /* NULL, or the next index whose record should
 
85
                                be handled */
 
86
        mem_heap_t*     heap;   /* memory heap used as auxiliary storage for
 
87
                                row; this must be emptied after a successful
 
88
                                purge of a row */
 
89
};
 
90
 
 
91
#ifndef UNIV_NONINL
 
92
#include "row0purge.ic"
 
93
#endif
 
94
 
 
95
#endif