Drizzled Public API Documentation

trx0rec.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 trx0rec_h
28 #define trx0rec_h
29 
30 #include "univ.i"
31 #include "trx0types.h"
32 #include "row0types.h"
33 #include "mtr0mtr.h"
34 #include "dict0types.h"
35 #include "data0data.h"
36 #include "rem0types.h"
37 
38 #ifndef UNIV_HOTBACKUP
39 # include "que0types.h"
40 
41 /***********************************************************************/
44 UNIV_INLINE
47 /*==============*/
48  const trx_undo_rec_t* undo_rec,
49  mem_heap_t* heap);
50 /**********************************************************************/
53 UNIV_INLINE
54 ulint
56 /*==================*/
57  const trx_undo_rec_t* undo_rec);
58 /**********************************************************************/
61 UNIV_INLINE
62 ulint
64 /*=======================*/
65  const trx_undo_rec_t* undo_rec);
66 /**********************************************************************/
69 UNIV_INLINE
70 ibool
72 /*============================*/
73  const trx_undo_rec_t* undo_rec);
74 /**********************************************************************/
77 UNIV_INLINE
80 /*=====================*/
81  const trx_undo_rec_t* undo_rec);
82 /**********************************************************************/
85 UNIV_INLINE
86 ulint
88 /*====================*/
89  undo_no_t undo_no)
90  __attribute__((const));
91 
92 /**********************************************************************/
94 #define trx_undo_rec_get_ptr(undo_rec, undo_no) \
95  ((undo_rec) + trx_undo_rec_get_offset(undo_no))
96 
97 /**********************************************************************/
100 UNIV_INTERN
101 byte*
103 /*==================*/
104  trx_undo_rec_t* undo_rec,
105  ulint* type,
107  ulint* cmpl_info,
109  ibool* updated_extern,
111  undo_no_t* undo_no,
112  table_id_t* table_id);
113 /*******************************************************************/
116 UNIV_INTERN
117 byte*
119 /*=====================*/
120  byte* ptr,
126  dict_index_t* index,
127  dtuple_t** ref,
128  mem_heap_t* heap);
130 /*******************************************************************/
133 UNIV_INTERN
134 byte*
136 /*======================*/
137  byte* ptr,
139  dict_index_t* index);
140 /**********************************************************************/
144 UNIV_INTERN
145 byte*
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*
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 /*******************************************************************/
185 UNIV_INTERN
186 byte*
188 /*=========================*/
189  byte* ptr,
196  dict_index_t* index,
197  dtuple_t** row,
198  ibool ignore_prefix,
201  mem_heap_t* heap);
203 /***********************************************************************/
209 UNIV_INTERN
210 ulint
212 /*==========================*/
213  ulint flags,
215  ulint op_type,
217  que_thr_t* thr,
218  dict_index_t* index,
219  const dtuple_t* clust_entry,
222  const upd_t* update,
224  ulint cmpl_info,
226  const rec_t* rec,
229  roll_ptr_t* roll_ptr);
233 /******************************************************************/
237 UNIV_INTERN
240 /*======================*/
241  roll_ptr_t roll_ptr,
242  mem_heap_t* heap);
243 /******************************************************************/
251 UNIV_INTERN
252 ulint
254 /*==================*/
255  roll_ptr_t roll_ptr,
256  trx_id_t trx_id,
259  trx_undo_rec_t** undo_rec,
260  mem_heap_t* heap);
261 /*******************************************************************/
269 UNIV_INTERN
270 ulint
272 /*========================*/
273  const rec_t* index_rec,
275  mtr_t* index_mtr,
277  const rec_t* rec,
278  dict_index_t* index,
279  ulint* offsets,
280  mem_heap_t* heap,
282  rec_t** old_vers);
285 #endif /* !UNIV_HOTBACKUP */
286 /***********************************************************/
289 UNIV_INTERN
290 byte*
292 /*========================*/
293  byte* ptr,
294  byte* end_ptr,
295  page_t* page);
296 /***********************************************************/
299 UNIV_INTERN
300 byte*
302 /*==========================*/
303  byte* ptr,
304  byte* end_ptr,
305  page_t* page,
306  mtr_t* mtr);
308 #ifndef UNIV_HOTBACKUP
309 
310 /* Types of an undo log record: these have to be smaller than 16, as the
311 compilation info multiplied by 16 is ORed to this value in an undo log
312 record */
313 
314 #define TRX_UNDO_INSERT_REC 11 /* fresh insert into clustered index */
315 #define TRX_UNDO_UPD_EXIST_REC 12 /* update of a non-delete-marked
316  record */
317 #define TRX_UNDO_UPD_DEL_REC 13 /* update of a delete marked record to
318  a not delete marked record; also the
319  fields of the record can change */
320 #define TRX_UNDO_DEL_MARK_REC 14 /* delete marking of a record; fields
321  do not change */
322 #define TRX_UNDO_CMPL_INFO_MULT 16 /* compilation info is multiplied by
323  this and ORed to the type above */
324 #define TRX_UNDO_UPD_EXTERN 128 /* This bit can be ORed to type_cmpl
325  to denote that we updated external
326  storage fields: used by purge to
327  free the external storage */
328 
329 /* Operation type flags used in trx_undo_report_row_operation */
330 #define TRX_UNDO_INSERT_OP 1
331 #define TRX_UNDO_MODIFY_OP 2
332 
333 #ifndef UNIV_NONINL
334 #include "trx0rec.ic"
335 #endif
336 
337 #endif /* !UNIV_HOTBACKUP */
338 
339 #endif /* trx0rec_h */