Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
trx0roll.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 trx0roll_h
28
#define trx0roll_h
29
30
#include "univ.i"
31
#include "
trx0trx.h
"
32
#include "
trx0types.h
"
33
#include "
mtr0mtr.h
"
34
#include "
trx0sys.h
"
35
36
#define trx_roll_free_all_savepoints(s) trx_roll_savepoints_free((s), NULL)
37
38
/*******************************************************************/
43
UNIV_INTERN
44
ibool
45
trx_is_recv
(
46
/*========*/
47
const
trx_t
* trx);
48
/*******************************************************************/
51
UNIV_INTERN
52
trx_savept_t
53
trx_savept_take
(
54
/*============*/
55
trx_t
* trx);
56
/*******************************************************************/
58
UNIV_INTERN
59
trx_undo_arr_t
*
60
trx_undo_arr_create
(
void
);
61
/*=====================*/
62
/*******************************************************************/
64
UNIV_INTERN
65
void
66
trx_undo_arr_free
(
67
/*==============*/
68
trx_undo_arr_t
* arr);
69
/*******************************************************************/
72
UNIV_INLINE
73
trx_undo_inf_t
*
74
trx_undo_arr_get_nth_info
(
75
/*======================*/
76
trx_undo_arr_t
* arr,
77
ulint n);
78
/***********************************************************************/
80
UNIV_INTERN
81
void
82
trx_roll_try_truncate
(
83
/*==================*/
84
trx_t
* trx);
85
/********************************************************************/
93
UNIV_INTERN
94
trx_undo_rec_t
*
95
trx_roll_pop_top_rec_of_trx
(
96
/*========================*/
97
trx_t
* trx,
98
undo_no_t
limit,
99
roll_ptr_t
* roll_ptr,
100
mem_heap_t
* heap);
101
/********************************************************************/
106
UNIV_INTERN
107
ibool
108
trx_undo_rec_reserve
(
109
/*=================*/
110
trx_t
* trx,
111
undo_no_t
undo_no);
112
/*******************************************************************/
114
UNIV_INTERN
115
void
116
trx_undo_rec_release
(
117
/*=================*/
118
trx_t
* trx,
119
undo_no_t
undo_no);
120
/*********************************************************************/
122
UNIV_INTERN
123
void
124
trx_rollback
(
125
/*=========*/
126
trx_t
* trx,
127
trx_sig_t
* sig,
128
que_thr_t
** next_thr);
133
/*******************************************************************/
138
UNIV_INTERN
139
void
140
trx_rollback_or_clean_recovered
(
141
/*============================*/
142
ibool all);
144
/*******************************************************************/
151
UNIV_INTERN
152
os_thread_ret_t
153
trx_rollback_or_clean_all_recovered
(
154
/*================================*/
155
void
* arg);
158
/****************************************************************/
160
UNIV_INTERN
161
void
162
trx_finish_rollback_off_kernel
(
163
/*===========================*/
164
que_t
* graph,
165
trx_t
* trx,
166
que_thr_t
** next_thr);
172
/****************************************************************/
178
UNIV_INTERN
179
que_t
*
180
trx_roll_graph_build
(
181
/*=================*/
182
trx_t
* trx);
183
/*********************************************************************/
186
UNIV_INTERN
187
roll_node_t
*
188
roll_node_create
(
189
/*=============*/
190
mem_heap_t
* heap);
191
/***********************************************************/
194
UNIV_INTERN
195
que_thr_t
*
196
trx_rollback_step
(
197
/*==============*/
198
que_thr_t
* thr);
199
/*******************************************************************/
202
UNIV_INTERN
203
int
204
trx_rollback_for_mysql
(
205
/*===================*/
206
trx_t
* trx);
207
/*******************************************************************/
210
UNIV_INTERN
211
int
212
trx_rollback_last_sql_stat_for_mysql
(
213
/*=================================*/
214
trx_t
* trx);
215
/*******************************************************************/
218
UNIV_INTERN
219
int
220
trx_general_rollback_for_mysql
(
221
/*===========================*/
222
trx_t
* trx,
223
trx_savept_t
* savept);
226
/*******************************************************************/
235
UNIV_INTERN
236
ulint
237
trx_rollback_to_savepoint_for_mysql
(
238
/*================================*/
239
trx_t
* trx,
240
const
char
* savepoint_name,
241
ib_int64_t* mysql_binlog_cache_pos);
247
/*******************************************************************/
253
UNIV_INTERN
254
ulint
255
trx_savepoint_for_mysql
(
256
/*====================*/
257
trx_t
* trx,
258
const
char
* savepoint_name,
259
ib_int64_t binlog_cache_pos);
264
/*******************************************************************/
269
UNIV_INTERN
270
ulint
271
trx_release_savepoint_for_mysql
(
272
/*============================*/
273
trx_t
* trx,
274
const
char
* savepoint_name);
276
/*******************************************************************/
278
UNIV_INTERN
279
void
280
trx_roll_savepoint_free
(
281
/*=====================*/
282
trx_t
* trx,
283
trx_named_savept_t
* savep);
285
/*******************************************************************/
288
UNIV_INTERN
289
void
290
trx_roll_savepoints_free
(
291
/*=====================*/
292
trx_t
* trx,
293
trx_named_savept_t
* savep);
298
struct
trx_undo_inf_struct
{
299
trx_id_t
trx_no
;
301
undo_no_t
undo_no
;
302
ibool
in_use
;
303
};
304
308
struct
trx_undo_arr_struct
{
309
ulint
n_cells
;
310
ulint
n_used
;
311
trx_undo_inf_t
*
infos
;
312
mem_heap_t
*
heap
;
313
};
314
316
enum
roll_node_state
{
317
ROLL_NODE_SEND
= 1,
319
ROLL_NODE_WAIT
321
};
322
324
struct
roll_node_struct
{
325
que_common_t
common
;
326
enum
roll_node_state
state
;
327
ibool
partial
;
329
trx_savept_t
savept
;
332
};
333
335
struct
trx_named_savept_struct
{
336
char
*
name
;
337
trx_savept_t
savept
;
339
ib_int64_t
mysql_binlog_cache_pos
;
344
UT_LIST_NODE_T
(
trx_named_savept_t
)
345
trx_savepoints
;
347
};
348
349
#ifndef UNIV_NONINL
350
#include "trx0roll.ic"
351
#endif
352
353
#endif
plugin
innobase
include
trx0roll.h
Generated on Wed Aug 21 2013 20:36:50 for drizzle by
1.8.4