Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
trx0purge.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (C) 1996, 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., 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
44
extern
trx_undo_rec_t
trx_purge_dummy_rec
;
45
46
/********************************************************************/
50
UNIV_INLINE
51
fil_addr_t
52
trx_purge_get_log_from_hist
(
53
/*========================*/
54
fil_addr_t
node_addr);
56
/*****************************************************************/
62
UNIV_INTERN
63
ibool
64
trx_purge_update_undo_must_exist
(
65
/*=============================*/
66
trx_id_t
trx_id);
67
/********************************************************************/
70
UNIV_INTERN
71
void
72
trx_purge_sys_create
(
void
);
73
/*======================*/
74
/********************************************************************/
76
UNIV_INTERN
77
void
78
trx_purge_sys_close
(
void
);
79
/*======================*/
80
/************************************************************************
81
Adds the update undo log as the first log in the history list. Removes the
82
update undo log segment from the rseg slot if it is too big for reuse. */
83
UNIV_INTERN
84
void
85
trx_purge_add_update_undo_to_history
(
86
/*=================================*/
87
trx_t
* trx,
88
page_t
* undo_page,
90
mtr_t
* mtr);
91
/********************************************************************/
96
UNIV_INTERN
97
trx_undo_rec_t
*
98
trx_purge_fetch_next_rec
(
99
/*=====================*/
100
roll_ptr_t
* roll_ptr,
101
trx_undo_inf_t
** cell,
103
mem_heap_t
* heap);
104
/*******************************************************************/
106
UNIV_INTERN
107
void
108
trx_purge_rec_release
(
109
/*==================*/
110
trx_undo_inf_t
* cell);
111
/*******************************************************************/
114
UNIV_INTERN
115
ulint
116
trx_purge
(
117
/*======*/
118
ulint limit);
120
/******************************************************************/
122
UNIV_INTERN
123
void
124
trx_purge_sys_print
(
void
);
125
/*======================*/
126
128
struct
trx_purge_struct
{
129
ulint
state
;
130
sess_t
*
sess
;
132
trx_t
*
trx
;
135
que_t
*
query
;
137
rw_lock_t
latch
;
143
read_view_t
*
view
;
145
mutex_t
mutex
;
146
ulint
n_pages_handled
;
148
ulint
handle_limit
;
150
/*------------------------------*/
151
/* The following two fields form the 'purge pointer' which advances
152
during a purge, and which is used in history list truncation */
153
154
trx_id_t
purge_trx_no
;
157
undo_no_t
purge_undo_no
;
159
/*-----------------------------*/
160
ibool
next_stored
;
165
trx_rseg_t
*
rseg
;
167
ulint
page_no
;
170
ulint
offset
;
173
ulint
hdr_page_no
;
175
ulint
hdr_offset
;
176
/*-----------------------------*/
177
trx_undo_arr_t
*
arr
;
180
mem_heap_t
*
heap
;
183
};
184
185
#define TRX_PURGE_ON 1
/* purge operation is running */
186
#define TRX_STOP_PURGE 2
/* purge operation is stopped, or
187
it should be stopped */
188
#ifndef UNIV_NONINL
189
#include "trx0purge.ic"
190
#endif
191
192
#endif
plugin
innobase
include
trx0purge.h
Generated on Fri Mar 28 2014 08:14:31 for drizzle by
1.8.1.2