InnoDB Plugin
1.0
Main Page
Data Structures
Files
File List
Globals
include
trx0rec.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (c) 1996, 2013, Oracle and/or its affiliates. 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.,
15
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16
17
*****************************************************************************/
18
19
/**************************************************/
26
#ifndef trx0rec_h
27
#define trx0rec_h
28
29
#include "
univ.i
"
30
#include "
trx0types.h
"
31
#include "
row0types.h
"
32
#include "
mtr0mtr.h
"
33
#include "
dict0types.h
"
34
#include "
data0data.h
"
35
#include "
rem0types.h
"
36
37
#ifndef UNIV_HOTBACKUP
38
# include "
que0types.h
"
39
40
/***********************************************************************/
43
UNIV_INLINE
44
trx_undo_rec_t
*
45
trx_undo_rec_copy
(
46
/*==============*/
47
const
trx_undo_rec_t
* undo_rec,
48
mem_heap_t
* heap);
49
/**********************************************************************/
52
UNIV_INLINE
53
ulint
54
trx_undo_rec_get_type
(
55
/*==================*/
56
const
trx_undo_rec_t
* undo_rec);
57
/**********************************************************************/
60
UNIV_INLINE
61
ulint
62
trx_undo_rec_get_cmpl_info
(
63
/*=======================*/
64
const
trx_undo_rec_t
* undo_rec);
65
/**********************************************************************/
68
UNIV_INLINE
69
ibool
70
trx_undo_rec_get_extern_storage
(
71
/*============================*/
72
const
trx_undo_rec_t
* undo_rec);
73
/**********************************************************************/
76
UNIV_INLINE
77
undo_no_t
78
trx_undo_rec_get_undo_no
(
79
/*=====================*/
80
const
trx_undo_rec_t
* undo_rec);
81
/**********************************************************************/
84
UNIV_INLINE
85
ulint
86
trx_undo_rec_get_offset
(
87
/*====================*/
88
undo_no_t
undo_no)
89
__attribute__((
const
));
90
91
/**********************************************************************/
93
#define trx_undo_rec_get_ptr(undo_rec, undo_no) \
94
((undo_rec) + trx_undo_rec_get_offset(undo_no))
95
96
/**********************************************************************/
99
UNIV_INTERN
100
byte*
101
trx_undo_rec_get_pars
(
102
/*==================*/
103
trx_undo_rec_t
* undo_rec,
104
ulint* type,
106
ulint* cmpl_info,
108
bool
* updated_extern,
110
undo_no_t
* undo_no,
111
table_id_t* table_id)
112
__attribute__((nonnull));
113
/*******************************************************************/
116
UNIV_INTERN
117
byte*
118
trx_undo_rec_get_row_ref
(
119
/*=====================*/
120
byte* ptr,
126
dict_index_t
* index,
127
dtuple_t
** ref,
128
mem_heap_t
* heap);
130
/*******************************************************************/
133
UNIV_INTERN
134
byte*
135
trx_undo_rec_skip_row_ref
(
136
/*======================*/
137
byte* ptr,
139
dict_index_t
* index);
140
/**********************************************************************/
144
UNIV_INTERN
145
byte*
146
trx_undo_update_rec_get_sys_cols
(
147
/*=============================*/
148
byte* ptr,
151
trx_id_t
* trx_id,
152
roll_ptr_t
* roll_ptr,
153
ulint* info_bits);
154
/*******************************************************************/
158
UNIV_INTERN
159
byte*
160
trx_undo_update_rec_get_update
(
161
/*===========================*/
162
byte* ptr,
168
dict_index_t
* index,
169
ulint type,
174
trx_id_t
trx_id,
175
roll_ptr_t
roll_ptr,
176
ulint info_bits,
177
trx_t
* trx,
178
mem_heap_t
* heap,
180
upd_t
** upd);
181
/*******************************************************************/
186
UNIV_INTERN
187
byte*
188
trx_undo_rec_get_partial_row
(
189
/*=========================*/
190
byte* ptr,
197
dict_index_t
* index,
198
dtuple_t
** row,
199
ibool
ignore_prefix,
202
mem_heap_t
* heap)
204
__attribute__((nonnull, warn_unused_result));
205
/***********************************************************************/
211
UNIV_INTERN
212
dberr_t
213
trx_undo_report_row_operation
(
214
/*==========================*/
215
ulint flags,
217
ulint op_type,
219
que_thr_t
* thr,
220
dict_index_t
* index,
221
const
dtuple_t
* clust_entry,
224
const
upd_t
* update,
226
ulint cmpl_info,
228
const
rec_t* rec,
231
const
ulint* offsets,
232
roll_ptr_t
* roll_ptr)
236
__attribute__((nonnull(3,4,10), warn_unused_result));
237
/******************************************************************/
241
UNIV_INTERN
242
trx_undo_rec_t
*
243
trx_undo_get_undo_rec_low
(
244
/*======================*/
245
roll_ptr_t
roll_ptr,
246
mem_heap_t
* heap)
247
__attribute__((nonnull, warn_unused_result));
248
/*******************************************************************/
255
UNIV_INTERN
256
bool
257
trx_undo_prev_version_build
(
258
/*========================*/
259
const
rec_t* index_rec,
261
mtr_t
* index_mtr,
263
const
rec_t* rec,
264
dict_index_t
* index,
265
ulint* offsets,
266
mem_heap_t
* heap,
268
rec_t** old_vers)
271
__attribute__((nonnull));
272
#endif
/* !UNIV_HOTBACKUP */
273
/***********************************************************/
276
UNIV_INTERN
277
byte*
278
trx_undo_parse_add_undo_rec
(
279
/*========================*/
280
byte* ptr,
281
byte* end_ptr,
282
page_t
* page);
283
/***********************************************************/
286
UNIV_INTERN
287
byte*
288
trx_undo_parse_erase_page_end
(
289
/*==========================*/
290
byte* ptr,
291
byte* end_ptr,
292
page_t
* page,
293
mtr_t
* mtr);
295
#ifndef UNIV_HOTBACKUP
296
297
/* Types of an undo log record: these have to be smaller than 16, as the
298
compilation info multiplied by 16 is ORed to this value in an undo log
299
record */
300
301
#define TRX_UNDO_INSERT_REC 11
/* fresh insert into clustered index */
302
#define TRX_UNDO_UPD_EXIST_REC 12
/* update of a non-delete-marked
303
record */
304
#define TRX_UNDO_UPD_DEL_REC 13
/* update of a delete marked record to
305
a not delete marked record; also the
306
fields of the record can change */
307
#define TRX_UNDO_DEL_MARK_REC 14
/* delete marking of a record; fields
308
do not change */
309
#define TRX_UNDO_CMPL_INFO_MULT 16
/* compilation info is multiplied by
310
this and ORed to the type above */
311
#define TRX_UNDO_UPD_EXTERN 128
/* This bit can be ORed to type_cmpl
312
to denote that we updated external
313
storage fields: used by purge to
314
free the external storage */
315
316
/* Operation type flags used in trx_undo_report_row_operation */
317
#define TRX_UNDO_INSERT_OP 1
318
#define TRX_UNDO_MODIFY_OP 2
319
320
#ifndef UNIV_NONINL
321
#include "
trx0rec.ic
"
322
#endif
323
324
#endif
/* !UNIV_HOTBACKUP */
325
326
#endif
/* trx0rec_h */
Generated on Fri Aug 21 2015 19:14:24 for InnoDB Plugin by
1.8.1.2