InnoDB Plugin  1.0
row0undo.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (c) 1997, 2009, 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 row0undo_h
27 #define row0undo_h
28 
29 #include "univ.i"
30 #include "mtr0mtr.h"
31 #include "trx0sys.h"
32 #include "btr0types.h"
33 #include "btr0pcur.h"
34 #include "dict0types.h"
35 #include "trx0types.h"
36 #include "que0types.h"
37 #include "row0types.h"
38 
39 /********************************************************************/
42 UNIV_INTERN
45 /*=================*/
46  trx_t* trx,
47  que_thr_t* parent,
48  mem_heap_t* heap);
49 /***********************************************************/
56 UNIV_INTERN
57 ibool
59 /*==========================*/
60  undo_node_t* node);
61 /***********************************************************/
65 UNIV_INTERN
66 que_thr_t*
68 /*==========*/
69  que_thr_t* thr);
71 /* A single query thread will try to perform the undo for all successive
72 versions of a clustered index record, if the transaction has modified it
73 several times during the execution which is rolled back. It may happen
74 that the task is transferred to another query thread, if the other thread
75 is assigned to handle an undo log record in the chain of different versions
76 of the record, and the other thread happens to get the x-latch to the
77 clustered index record at the right time.
78  If a query thread notices that the clustered index record it is looking
79 for is missing, or the roll ptr field in the record doed not point to the
80 undo log record the thread was assigned to handle, then it gives up the undo
81 task for that undo log record, and fetches the next. This situation can occur
82 just in the case where the transaction modified the same record several times
83 and another thread is currently doing the undo for successive versions of
84 that index record. */
85 
87 enum undo_exec {
95 };
96 
98 struct undo_node_t{
105  ulint rec_type;
112  ulint cmpl_info;
128 };
129 
130 
131 #ifndef UNIV_NONINL
132 #include "row0undo.ic"
133 #endif
134 
135 #endif