drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
trx0rec.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/**************************************************/
25
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/***********************************************************************/
44UNIV_INLINE
47/*==============*/
48 const trx_undo_rec_t* undo_rec,
49 mem_heap_t* heap);
50/**********************************************************************/
53UNIV_INLINE
54ulint
56/*==================*/
57 const trx_undo_rec_t* undo_rec);
58/**********************************************************************/
61UNIV_INLINE
62ulint
64/*=======================*/
65 const trx_undo_rec_t* undo_rec);
66/**********************************************************************/
69UNIV_INLINE
70ibool
72/*============================*/
73 const trx_undo_rec_t* undo_rec);
74/**********************************************************************/
77UNIV_INLINE
80/*=====================*/
81 const trx_undo_rec_t* undo_rec);
82/**********************************************************************/
85UNIV_INLINE
86ulint
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/**********************************************************************/
100UNIV_INTERN
101byte*
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/*******************************************************************/
116UNIV_INTERN
117byte*
119/*=====================*/
120 byte* ptr,
126 dict_index_t* index,
127 dtuple_t** ref,
128 mem_heap_t* heap);
130/*******************************************************************/
133UNIV_INTERN
134byte*
136/*======================*/
137 byte* ptr,
139 dict_index_t* index);
140/**********************************************************************/
144UNIV_INTERN
145byte*
147/*=============================*/
148 byte* ptr,
151 trx_id_t* trx_id,
152 roll_ptr_t* roll_ptr,
153 ulint* info_bits);
154/*******************************************************************/
158UNIV_INTERN
159byte*
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/*******************************************************************/
185UNIV_INTERN
186byte*
188/*=========================*/
189 byte* ptr,
196 dict_index_t* index,
197 dtuple_t** row,
198 ibool ignore_prefix,
201 mem_heap_t* heap);
203/***********************************************************************/
209UNIV_INTERN
210ulint
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/******************************************************************/
237UNIV_INTERN
240/*======================*/
241 roll_ptr_t roll_ptr,
242 mem_heap_t* heap);
243/******************************************************************/
251UNIV_INTERN
252ulint
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/*******************************************************************/
269UNIV_INTERN
270ulint
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/***********************************************************/
289UNIV_INTERN
290byte*
292/*========================*/
293 byte* ptr,
294 byte* end_ptr,
295 page_t* page);
296/***********************************************************/
299UNIV_INTERN
300byte*
302/*==========================*/
303 byte* ptr,
304 byte* end_ptr,
305 page_t* page,
306 mtr_t* mtr);
307
308#ifndef UNIV_HOTBACKUP
309
310/* Types of an undo log record: these have to be smaller than 16, as the
311compilation info multiplied by 16 is ORed to this value in an undo log
312record */
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 */
#define page_t
Definition page0types.h:35
UNIV_INTERN ulint trx_undo_prev_version_build(const rec_t *index_rec, mtr_t *index_mtr, const rec_t *rec, dict_index_t *index, ulint *offsets, mem_heap_t *heap, rec_t **old_vers)
Definition trx0rec.cc:1413
UNIV_INLINE undo_no_t trx_undo_rec_get_undo_no(const trx_undo_rec_t *undo_rec)
UNIV_INLINE ulint trx_undo_rec_get_cmpl_info(const trx_undo_rec_t *undo_rec)
UNIV_INTERN ulint trx_undo_report_row_operation(ulint flags, ulint op_type, que_thr_t *thr, dict_index_t *index, const dtuple_t *clust_entry, const upd_t *update, ulint cmpl_info, const rec_t *rec, roll_ptr_t *roll_ptr)
Definition trx0rec.cc:1151
UNIV_INTERN byte * trx_undo_rec_get_row_ref(byte *ptr, dict_index_t *index, dtuple_t **ref, mem_heap_t *heap)
Definition trx0rec.cc:380
UNIV_INTERN byte * trx_undo_update_rec_get_sys_cols(byte *ptr, trx_id_t *trx_id, roll_ptr_t *roll_ptr, ulint *info_bits)
Definition trx0rec.cc:836
UNIV_INLINE ibool trx_undo_rec_get_extern_storage(const trx_undo_rec_t *undo_rec)
UNIV_INTERN byte * trx_undo_update_rec_get_update(byte *ptr, dict_index_t *index, ulint type, trx_id_t trx_id, roll_ptr_t roll_ptr, ulint info_bits, trx_t *trx, mem_heap_t *heap, upd_t **upd)
Definition trx0rec.cc:898
UNIV_INTERN trx_undo_rec_t * trx_undo_get_undo_rec_low(roll_ptr_t roll_ptr, mem_heap_t *heap)
Definition trx0rec.cc:1337
UNIV_INTERN ulint trx_undo_get_undo_rec(roll_ptr_t roll_ptr, trx_id_t trx_id, trx_undo_rec_t **undo_rec, mem_heap_t *heap)
Definition trx0rec.cc:1377
UNIV_INTERN byte * trx_undo_parse_add_undo_rec(byte *ptr, byte *end_ptr, page_t *page)
Definition trx0rec.cc:94
UNIV_INTERN byte * trx_undo_parse_erase_page_end(byte *ptr, byte *end_ptr, page_t *page, mtr_t *mtr)
Definition trx0rec.cc:1123
UNIV_INTERN byte * trx_undo_rec_get_partial_row(byte *ptr, dict_index_t *index, dtuple_t **row, ibool ignore_prefix, mem_heap_t *heap)
Definition trx0rec.cc:1020
UNIV_INLINE ulint trx_undo_rec_get_type(const trx_undo_rec_t *undo_rec)
UNIV_INTERN byte * trx_undo_rec_get_pars(trx_undo_rec_t *undo_rec, ulint *type, ulint *cmpl_info, ibool *updated_extern, undo_no_t *undo_no, table_id_t *table_id)
Definition trx0rec.cc:282
UNIV_INLINE trx_undo_rec_t * trx_undo_rec_copy(const trx_undo_rec_t *undo_rec, mem_heap_t *heap)
UNIV_INTERN byte * trx_undo_rec_skip_row_ref(byte *ptr, dict_index_t *index)
Definition trx0rec.cc:426
UNIV_INLINE ulint trx_undo_rec_get_offset(undo_no_t undo_no) __attribute__((const))
byte trx_undo_rec_t
Definition trx0types.h:112
ib_id_t undo_no_t
Definition trx0types.h:89
ib_id_t trx_id_t
Definition trx0types.h:85
ib_id_t roll_ptr_t
Definition trx0types.h:87