Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
44
undo_node_t
*
45
row_undo_node_create
(
46
/*=================*/
47
trx_t
* trx,
48
que_thr_t
* parent,
49
mem_heap_t
* heap);
50
/***********************************************************/
57
UNIV_INTERN
58
ibool
59
row_undo_search_clust_to_pcur
(
60
/*==========================*/
61
undo_node_t
* node);
62
/***********************************************************/
66
UNIV_INTERN
67
que_thr_t
*
68
row_undo_step
(
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
{
89
UNDO_NODE_FETCH_NEXT
= 1,
91
UNDO_NODE_PREV_VERS
,
95
UNDO_NODE_INSERT
,
97
UNDO_NODE_MODIFY
100
};
101
103
struct
undo_node_struct
{
104
que_common_t
common
;
105
enum
undo_exec
state
;
106
trx_t
*
trx
;
107
roll_ptr_t
roll_ptr
;
108
trx_undo_rec_t
*
undo_rec
;
109
undo_no_t
undo_no
;
110
ulint
rec_type
;
112
roll_ptr_t
new_roll_ptr
;
115
trx_id_t
new_trx_id
;
117
btr_pcur_t
pcur
;
119
dict_table_t
*
table
;
120
ulint
cmpl_info
;
121
upd_t
*
update
;
123
dtuple_t
*
ref
;
124
dtuple_t
*
row
;
126
row_ext_t
*
ext
;
128
dtuple_t
*
undo_row
;
129
row_ext_t
*
undo_ext
;
131
dict_index_t
*
index
;
133
mem_heap_t
*
heap
;
136
};
137
138
139
#ifndef UNIV_NONINL
140
#include "row0undo.ic"
141
#endif
142
143
#endif
dtuple_struct
Definition:
data0data.h:442
UNDO_NODE_INSERT
Definition:
row0undo.h:95
undo_node_struct::rec_type
ulint rec_type
Definition:
row0undo.h:110
undo_node_struct::index
dict_index_t * index
Definition:
row0undo.h:131
trx_undo_rec_t
byte trx_undo_rec_t
Definition:
trx0types.h:112
upd_struct
Definition:
row0upd.h:389
undo_node_struct::new_roll_ptr
roll_ptr_t new_roll_ptr
Definition:
row0undo.h:112
roll_ptr_t
ib_id_t roll_ptr_t
Definition:
trx0types.h:87
dict_table_struct
Definition:
dict0mem.h:476
undo_node_struct::undo_rec
trx_undo_rec_t * undo_rec
Definition:
row0undo.h:108
undo_node_struct::new_trx_id
trx_id_t new_trx_id
Definition:
row0undo.h:115
row_undo_step
UNIV_INTERN que_thr_t * row_undo_step(que_thr_t *thr)
Definition:
row0undo.cc:349
undo_node_struct::common
que_common_t common
Definition:
row0undo.h:104
btr_pcur_struct
Definition:
btr0pcur.h:458
undo_node_struct::cmpl_info
ulint cmpl_info
Definition:
row0undo.h:120
UNDO_NODE_MODIFY
Definition:
row0undo.h:97
row_ext_struct
Definition:
row0ext.h:85
undo_node_struct::undo_row
dtuple_t * undo_row
Definition:
row0undo.h:128
que0types.h
undo_node_struct::ext
row_ext_t * ext
Definition:
row0undo.h:126
undo_node_struct::heap
mem_heap_t * heap
Definition:
row0undo.h:133
btr0types.h
UNDO_NODE_FETCH_NEXT
Definition:
row0undo.h:89
dict0types.h
undo_node_struct::row
dtuple_t * row
Definition:
row0undo.h:124
undo_node_struct
Definition:
row0undo.h:103
row0types.h
undo_node_struct::table
dict_table_t * table
Definition:
row0undo.h:119
mem_block_info_struct
Definition:
mem0mem.h:351
btr0pcur.h
undo_node_struct::roll_ptr
roll_ptr_t roll_ptr
Definition:
row0undo.h:107
trx0types.h
undo_node_struct::undo_ext
row_ext_t * undo_ext
Definition:
row0undo.h:129
que_common_struct
Definition:
que0types.h:47
dict_index_struct
Definition:
dict0mem.h:336
undo_exec
undo_exec
Definition:
row0undo.h:88
trx_id_t
ib_id_t trx_id_t
Definition:
trx0types.h:85
trx0sys.h
undo_node_struct::ref
dtuple_t * ref
Definition:
row0undo.h:123
undo_node_struct::pcur
btr_pcur_t pcur
Definition:
row0undo.h:117
que_thr_struct
Definition:
que0que.h:351
mtr0mtr.h
undo_node_struct::trx
trx_t * trx
Definition:
row0undo.h:106
undo_node_struct::undo_no
undo_no_t undo_no
Definition:
row0undo.h:109
row_undo_node_create
UNIV_INTERN undo_node_t * row_undo_node_create(trx_t *trx, que_thr_t *parent, mem_heap_t *heap)
Definition:
row0undo.cc:128
row_undo_search_clust_to_pcur
UNIV_INTERN ibool row_undo_search_clust_to_pcur(undo_node_t *node)
Definition:
row0undo.cc:162
UNDO_NODE_PREV_VERS
Definition:
row0undo.h:91
undo_no_t
ib_id_t undo_no_t
Definition:
trx0types.h:89
trx_struct
Definition:
trx0trx.h:473
undo_node_struct::update
upd_t * update
Definition:
row0undo.h:121
undo_node_struct::state
enum undo_exec state
Definition:
row0undo.h:105
plugin
innobase
include
row0undo.h
Generated on Mon Apr 28 2014 10:07:08 for drizzle by
1.8.6