InnoDB Plugin
1.0
Main Page
Data Structures
Files
File List
Globals
include
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
43
undo_node_t
*
44
row_undo_node_create
(
45
/*=================*/
46
trx_t
* trx,
47
que_thr_t
* parent,
48
mem_heap_t
* heap);
49
/***********************************************************/
56
UNIV_INTERN
57
ibool
58
row_undo_search_clust_to_pcur
(
59
/*==========================*/
60
undo_node_t
* node);
61
/***********************************************************/
65
UNIV_INTERN
66
que_thr_t
*
67
row_undo_step
(
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
{
88
UNDO_NODE_FETCH_NEXT
= 1,
90
UNDO_NODE_INSERT
,
92
UNDO_NODE_MODIFY
95
};
96
98
struct
undo_node_t
{
99
que_common_t
common
;
100
enum
undo_exec
state
;
101
trx_t
*
trx
;
102
roll_ptr_t
roll_ptr
;
103
trx_undo_rec_t
*
undo_rec
;
104
undo_no_t
undo_no
;
105
ulint
rec_type
;
107
trx_id_t
new_trx_id
;
109
btr_pcur_t
pcur
;
111
dict_table_t
*
table
;
112
ulint
cmpl_info
;
113
upd_t
*
update
;
115
dtuple_t
*
ref
;
116
dtuple_t
*
row
;
118
row_ext_t
*
ext
;
120
dtuple_t
*
undo_row
;
121
row_ext_t
*
undo_ext
;
123
dict_index_t
*
index
;
125
mem_heap_t
*
heap
;
128
};
129
130
131
#ifndef UNIV_NONINL
132
#include "
row0undo.ic
"
133
#endif
134
135
#endif
Generated on Fri Aug 21 2015 19:14:24 for InnoDB Plugin by
1.8.1.2