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
dict0crea.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 dict0crea_h
27
#define dict0crea_h
28
29
#include "univ.i"
30
#include "
dict0types.h
"
31
#include "
dict0dict.h
"
32
#include "
que0types.h
"
33
#include "
row0types.h
"
34
#include "
mtr0mtr.h
"
35
36
/*********************************************************************/
39
UNIV_INTERN
40
tab_node_t
*
41
tab_create_graph_create
(
42
/*====================*/
43
dict_table_t
*
table
,
45
mem_heap_t
*
heap
,
46
bool
commit);
48
/*********************************************************************/
51
UNIV_INTERN
52
ind_node_t
*
53
ind_create_graph_create
(
54
/*====================*/
55
dict_index_t
*
index
,
57
mem_heap_t
*
heap
,
58
bool
commit);
60
/***********************************************************/
63
UNIV_INTERN
64
que_thr_t
*
65
dict_create_table_step
(
66
/*===================*/
67
que_thr_t
*
thr
);
68
/***********************************************************/
72
UNIV_INTERN
73
que_thr_t
*
74
dict_create_index_step
(
75
/*===================*/
76
que_thr_t
*
thr
);
77
/*******************************************************************/
80
UNIV_INTERN
81
ulint
82
dict_truncate_index_tree
(
83
/*=====================*/
84
dict_table_t
*
table
,
85
ulint
space
,
88
btr_pcur_t
*
pcur
,
92
mtr_t
*
mtr
);
95
/*******************************************************************/
97
UNIV_INTERN
98
void
99
dict_drop_index_tree
(
100
/*=================*/
101
rec_t*
rec
,
103
mtr_t
*
mtr
);
104
/****************************************************************/
109
UNIV_INTERN
110
dberr_t
111
dict_create_or_check_foreign_constraint_tables
(
void
);
112
/*================================================*/
113
/********************************************************************/
118
UNIV_INLINE
119
dberr_t
120
dict_create_add_foreign_id
(
121
/*=======================*/
122
ulint* id_nr,
124
const
char
*
name
,
125
dict_foreign_t
* foreign)
126
__attribute__((nonnull));
127
/********************************************************************/
135
UNIV_INTERN
136
dberr_t
137
dict_create_add_foreigns_to_dictionary
(
138
/*===================================*/
139
ulint start_id,
147
dict_table_t
*
table
,
148
trx_t
*
trx
)
149
__attribute__((nonnull, warn_unused_result));
150
/****************************************************************/
155
UNIV_INTERN
156
dberr_t
157
dict_create_or_check_sys_tablespace
(
void
);
158
/*=====================================*/
159
/********************************************************************/
163
UNIV_INTERN
164
dberr_t
165
dict_create_add_tablespace_to_dictionary
(
166
/*=====================================*/
167
ulint
space
,
168
const
char
*
name
,
169
ulint
flags
,
170
const
char
* path,
171
trx_t
*
trx
,
172
bool
commit);
174
/********************************************************************/
177
UNIV_INTERN
178
dberr_t
179
dict_create_add_foreign_to_dictionary
(
180
/*==================================*/
181
const
char
*
name
,
182
const
dict_foreign_t
* foreign,
183
trx_t
*
trx
)
184
__attribute__((nonnull, warn_unused_result));
185
186
/* Table create node structure */
187
struct
tab_node_t
{
188
que_common_t
common
;
189
dict_table_t
*
table
;
191
ins_node_t
* tab_def;
/* child node which does the insert of
192
the table definition; the row to be inserted
193
is built by the parent node */
194
ins_node_t
* col_def;
/* child node which does the inserts of
195
the column definitions; the row to be inserted
196
is built by the parent node */
197
commit_node_t
* commit_node;
198
/* child node which performs a commit after
199
a successful table creation */
200
/*----------------------*/
201
/* Local storage for this graph node */
202
ulint
state
;
203
ulint
col_no
;
204
mem_heap_t
*
heap
;
205
};
206
207
/* Table create node states */
208
#define TABLE_BUILD_TABLE_DEF 1
209
#define TABLE_BUILD_COL_DEF 2
210
#define TABLE_COMMIT_WORK 3
211
#define TABLE_ADD_TO_CACHE 4
212
#define TABLE_COMPLETED 5
213
214
/* Index create node struct */
215
216
struct
ind_node_t
{
217
que_common_t
common
;
218
dict_index_t
*
index
;
220
ins_node_t
* ind_def;
/* child node which does the insert of
221
the index definition; the row to be inserted
222
is built by the parent node */
223
ins_node_t
* field_def;
/* child node which does the inserts of
224
the field definitions; the row to be inserted
225
is built by the parent node */
226
commit_node_t
* commit_node;
227
/* child node which performs a commit after
228
a successful index creation */
229
/*----------------------*/
230
/* Local storage for this graph node */
231
ulint
state
;
232
ulint page_no;
/* root page number of the index */
233
dict_table_t
*
table
;
234
dtuple_t
* ind_row;
/* index definition row built */
235
ulint field_no;
/* next field definition to insert */
236
mem_heap_t
*
heap
;
237
};
238
239
/* Index create node states */
240
#define INDEX_BUILD_INDEX_DEF 1
241
#define INDEX_BUILD_FIELD_DEF 2
242
#define INDEX_CREATE_INDEX_TREE 3
243
#define INDEX_COMMIT_WORK 4
244
#define INDEX_ADD_TO_CACHE 5
245
246
#ifndef UNIV_NONINL
247
#include "dict0crea.ic"
248
#endif
249
250
#endif
storage
innobase
include
dict0crea.h
Generated on Sat Nov 9 2013 01:26:34 for MySQL 5.6.14 Source Code Document by
1.8.1.2