MySQL 5.6.14 Source Code Document
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
row0ins.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (c) 1996, 2012, 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 row0ins_h
27
#define row0ins_h
28
29
#include "univ.i"
30
#include "
data0data.h
"
31
#include "
que0types.h
"
32
#include "
dict0types.h
"
33
#include "
trx0types.h
"
34
#include "
row0types.h
"
35
36
/***************************************************************/
42
UNIV_INTERN
43
dberr_t
44
row_ins_check_foreign_constraint
(
45
/*=============================*/
46
ibool check_ref,
49
dict_foreign_t
* foreign,
52
dict_table_t
*
table
,
54
dtuple_t
*
entry
,
55
que_thr_t
*
thr
)
56
__attribute__((nonnull, warn_unused_result));
57
/*********************************************************************/
60
UNIV_INTERN
61
ins_node_t
*
62
ins_node_create
(
63
/*============*/
64
ulint ins_type,
65
dict_table_t
*
table
,
66
mem_heap_t
*
heap
);
67
/*********************************************************************/
71
UNIV_INTERN
72
void
73
ins_node_set_new_row
(
74
/*=================*/
75
ins_node_t
* node,
76
dtuple_t
* row);
77
/***************************************************************/
88
UNIV_INTERN
89
dberr_t
90
row_ins_clust_index_entry_low
(
91
/*==========================*/
92
ulint
flags
,
93
ulint
mode
,
96
dict_index_t
*
index
,
97
ulint n_uniq,
98
dtuple_t
*
entry
,
99
ulint
n_ext
,
100
que_thr_t
*
thr
)
101
__attribute__((nonnull, warn_unused_result));
102
/***************************************************************/
110
UNIV_INTERN
111
dberr_t
112
row_ins_sec_index_entry_low
(
113
/*========================*/
114
ulint
flags
,
115
ulint
mode
,
118
dict_index_t
*
index
,
119
mem_heap_t
*
offsets_heap
,
121
mem_heap_t
*
heap
,
122
dtuple_t
*
entry
,
123
trx_id_t
trx_id
,
125
que_thr_t
*
thr
)
126
__attribute__((nonnull, warn_unused_result));
127
/***************************************************************/
131
UNIV_INTERN
132
dberr_t
133
row_ins_index_entry_big_rec_func
(
134
/*=============================*/
135
const
dtuple_t
*
entry
,
136
const
big_rec_t
* big_rec,
137
ulint*
offsets
,
138
mem_heap_t
**
heap
,
139
dict_index_t
*
index
,
140
const
char
*
file
,
141
#ifndef DBUG_OFF
142
const
void
* thd,
143
#endif
/* DBUG_OFF */
144
ulint line)
145
__attribute__((nonnull(1,2,3,4,5,6), warn_unused_result));
146
#ifdef DBUG_OFF
147
# define row_ins_index_entry_big_rec(e,big,ofs,heap,index,thd,file,line) \
148
row_ins_index_entry_big_rec_func(e,big,ofs,heap,index,file,line)
149
#else
/* DBUG_OFF */
150
# define row_ins_index_entry_big_rec(e,big,ofs,heap,index,thd,file,line) \
151
row_ins_index_entry_big_rec_func(e,big,ofs,heap,index,file,thd,line)
152
#endif
/* DBUG_OFF */
153
/***************************************************************/
159
UNIV_INTERN
160
dberr_t
161
row_ins_clust_index_entry
(
162
/*======================*/
163
dict_index_t
*
index
,
164
dtuple_t
*
entry
,
165
que_thr_t
*
thr
,
166
ulint
n_ext
)
167
__attribute__((nonnull, warn_unused_result));
168
/***************************************************************/
174
UNIV_INTERN
175
dberr_t
176
row_ins_sec_index_entry
(
177
/*====================*/
178
dict_index_t
*
index
,
179
dtuple_t
*
entry
,
180
que_thr_t
*
thr
)
181
__attribute__((nonnull, warn_unused_result));
182
/***********************************************************/
186
UNIV_INTERN
187
que_thr_t
*
188
row_ins_step
(
189
/*=========*/
190
que_thr_t
*
thr
);
192
/* Insert node structure */
193
194
struct
ins_node_t
{
195
que_common_t
common
;
196
ulint ins_type;
/* INS_VALUES, INS_SEARCHED, or INS_DIRECT */
197
dtuple_t
*
row
;
198
dict_table_t
*
table
;
199
sel_node_t
*
select
;
200
que_node_t* values_list;
/* list of expressions to evaluate and
201
insert in an INS_VALUES insert */
202
ulint
state
;
203
dict_index_t
*
index
;
205
dtuple_t
*
entry
;
208
UT_LIST_BASE_NODE_T(
dtuple_t
)
209
entry_list;
/* list of entries, one for each index */
210
byte* row_id_buf;
/* buffer for the row id sys field in row */
211
trx_id_t
trx_id
;
213
byte* trx_id_buf;
/* buffer for the trx id sys field in row */
214
mem_heap_t
* entry_sys_heap;
215
/* memory heap used as auxiliary storage;
216
entry_list and sys fields are stored here;
217
if this is NULL, entry list should be created
218
and buffers for sys fields in row allocated */
219
ulint magic_n;
220
};
221
222
#define INS_NODE_MAGIC_N 15849075
223
224
/* Insert node types */
225
#define INS_SEARCHED 0
/* INSERT INTO ... SELECT ... */
226
#define INS_VALUES 1
/* INSERT INTO ... VALUES ... */
227
#define INS_DIRECT 2
/* this is for internal use in dict0crea:
228
insert the row directly */
229
230
/* Node execution states */
231
#define INS_NODE_SET_IX_LOCK 1
/* we should set an IX lock on table */
232
#define INS_NODE_ALLOC_ROW_ID 2
/* row id should be allocated */
233
#define INS_NODE_INSERT_ENTRIES 3
/* index entries should be built and
234
inserted */
235
236
#ifndef UNIV_NONINL
237
#include "row0ins.ic"
238
#endif
239
240
#endif
storage
innobase
include
row0ins.h
Generated on Sat Nov 9 2013 01:26:35 for MySQL 5.6.14 Source Code Document by
1.8.1.2