Drizzled Public API Documentation

trx0purge.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (C) 1996, 2011, 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., 51 Franklin
15 St, Fifth Floor, Boston, MA 02110-1301 USA
16 
17 *****************************************************************************/
18 
19 /**************************************************/
26 #pragma once
27 #ifndef trx0purge_h
28 #define trx0purge_h
29 
30 #include "univ.i"
31 #include "trx0types.h"
32 #include "mtr0mtr.h"
33 #include "trx0sys.h"
34 #include "que0types.h"
35 #include "page0page.h"
36 #include "usr0sess.h"
37 #include "fil0fil.h"
38 
40 extern trx_purge_t* purge_sys;
41 
45 
46 /********************************************************************/
50 UNIV_INLINE
53 /*========================*/
54  fil_addr_t node_addr);
56 /*****************************************************************/
62 UNIV_INTERN
63 ibool
65 /*=============================*/
66  trx_id_t trx_id);
67 /********************************************************************/
70 UNIV_INTERN
71 void
73 /*=================*/
74  ib_bh_t* ib_bh);
75 /********************************************************************/
77 UNIV_INTERN
78 void
80 /*======================*/
81 /************************************************************************
82 Adds the update undo log as the first log in the history list. Removes the
83 update undo log segment from the rseg slot if it is too big for reuse. */
84 UNIV_INTERN
85 void
87 /*=================================*/
88  trx_t* trx,
89  page_t* undo_page,
91  mtr_t* mtr);
92 /********************************************************************/
97 UNIV_INTERN
100 /*=====================*/
101  roll_ptr_t* roll_ptr,
102  trx_undo_inf_t** cell,
104  mem_heap_t* heap);
105 /*******************************************************************/
107 UNIV_INTERN
108 void
110 /*==================*/
111  trx_undo_inf_t* cell);
112 /*******************************************************************/
115 UNIV_INTERN
116 ulint
117 trx_purge(
118 /*======*/
119  ulint limit);
121 /******************************************************************/
123 UNIV_INTERN
124 void
125 trx_purge_sys_print(void);
126 /*======================*/
127 
130  ulint state;
149  ulint handle_limit;
151  /*------------------------------*/
152  /* The following two fields form the 'purge pointer' which advances
153  during a purge, and which is used in history list truncation */
154 
160  /*-----------------------------*/
161  ibool next_stored;
168  ulint page_no;
171  ulint offset;
174  ulint hdr_page_no;
176  ulint hdr_offset;
177  /*-----------------------------*/
184  /*-----------------------------*/
189 };
190 
191 #define TRX_PURGE_ON 1 /* purge operation is running */
192 #define TRX_STOP_PURGE 2 /* purge operation is stopped, or
193  it should be stopped */
194 #ifndef UNIV_NONINL
195 #include "trx0purge.ic"
196 #endif
197 
198 #endif