Drizzled Public API Documentation

row0undo.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (C) 1997, 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 row0undo_h
28 #define row0undo_h
29 
30 #include "univ.i"
31 #include "mtr0mtr.h"
32 #include "trx0sys.h"
33 #include "btr0types.h"
34 #include "btr0pcur.h"
35 #include "dict0types.h"
36 #include "trx0types.h"
37 #include "que0types.h"
38 #include "row0types.h"
39 
40 /********************************************************************/
43 UNIV_INTERN
46 /*=================*/
47  trx_t* trx,
48  que_thr_t* parent,
49  mem_heap_t* heap);
50 /***********************************************************/
57 UNIV_INTERN
58 ibool
60 /*==========================*/
61  undo_node_t* node);
62 /***********************************************************/
66 UNIV_INTERN
67 que_thr_t*
69 /*==========*/
70  que_thr_t* thr);
72 /* A single query thread will try to perform the undo for all successive
73 versions of a clustered index record, if the transaction has modified it
74 several times during the execution which is rolled back. It may happen
75 that the task is transferred to another query thread, if the other thread
76 is assigned to handle an undo log record in the chain of different versions
77 of the record, and the other thread happens to get the x-latch to the
78 clustered index record at the right time.
79  If a query thread notices that the clustered index record it is looking
80 for is missing, or the roll ptr field in the record doed not point to the
81 undo log record the thread was assigned to handle, then it gives up the undo
82 task for that undo log record, and fetches the next. This situation can occur
83 just in the case where the transaction modified the same record several times
84 and another thread is currently doing the undo for successive versions of
85 that index record. */
86 
88 enum undo_exec {
100 };
101 
110  ulint rec_type;
120  ulint cmpl_info;
136 };
137 
138 
139 #ifndef UNIV_NONINL
140 #include "row0undo.ic"
141 #endif
142 
143 #endif
dict_index_t * index
Definition: row0undo.h:131
byte trx_undo_rec_t
Definition: trx0types.h:112
roll_ptr_t new_roll_ptr
Definition: row0undo.h:112
ib_id_t roll_ptr_t
Definition: trx0types.h:87
trx_undo_rec_t * undo_rec
Definition: row0undo.h:108
trx_id_t new_trx_id
Definition: row0undo.h:115
UNIV_INTERN que_thr_t * row_undo_step(que_thr_t *thr)
Definition: row0undo.cc:349
que_common_t common
Definition: row0undo.h:104
dtuple_t * undo_row
Definition: row0undo.h:128
row_ext_t * ext
Definition: row0undo.h:126
mem_heap_t * heap
Definition: row0undo.h:133
dtuple_t * row
Definition: row0undo.h:124
dict_table_t * table
Definition: row0undo.h:119
roll_ptr_t roll_ptr
Definition: row0undo.h:107
row_ext_t * undo_ext
Definition: row0undo.h:129
undo_exec
Definition: row0undo.h:88
ib_id_t trx_id_t
Definition: trx0types.h:85
dtuple_t * ref
Definition: row0undo.h:123
btr_pcur_t pcur
Definition: row0undo.h:117
undo_no_t undo_no
Definition: row0undo.h:109
UNIV_INTERN undo_node_t * row_undo_node_create(trx_t *trx, que_thr_t *parent, mem_heap_t *heap)
Definition: row0undo.cc:128
UNIV_INTERN ibool row_undo_search_clust_to_pcur(undo_node_t *node)
Definition: row0undo.cc:162
ib_id_t undo_no_t
Definition: trx0types.h:89
upd_t * update
Definition: row0undo.h:121
enum undo_exec state
Definition: row0undo.h:105