Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dict0crea.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (C) 1996, 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 dict0crea_h
28
#define dict0crea_h
29
30
#include "univ.i"
31
#include "
dict0types.h
"
32
#include "
dict0dict.h
"
33
#include "
que0types.h
"
34
#include "
row0types.h
"
35
#include "
mtr0mtr.h
"
36
37
/*********************************************************************/
40
UNIV_INTERN
41
tab_node_t
*
42
tab_create_graph_create(
43
/*====================*/
44
dict_table_t
* table,
46
mem_heap_t
* heap);
47
/*********************************************************************/
50
UNIV_INTERN
51
ind_node_t
*
52
ind_create_graph_create(
53
/*====================*/
54
dict_index_t
* index,
56
mem_heap_t
* heap);
57
/***********************************************************/
60
UNIV_INTERN
61
que_thr_t
*
62
dict_create_table_step(
63
/*===================*/
64
que_thr_t
* thr);
65
/***********************************************************/
69
UNIV_INTERN
70
que_thr_t
*
71
dict_create_index_step(
72
/*===================*/
73
que_thr_t
* thr);
74
/*******************************************************************/
77
UNIV_INTERN
78
ulint
79
dict_truncate_index_tree(
80
/*=====================*/
81
dict_table_t
* table,
82
ulint space,
85
btr_pcur_t
* pcur,
89
mtr_t
* mtr);
92
/*******************************************************************/
94
UNIV_INTERN
95
void
96
dict_drop_index_tree(
97
/*=================*/
98
rec_t* rec,
100
mtr_t
* mtr);
101
/****************************************************************/
106
UNIV_INTERN
107
ulint
108
dict_create_or_check_foreign_constraint_tables(
void
);
109
/*================================================*/
110
/********************************************************************/
118
UNIV_INTERN
119
ulint
120
dict_create_add_foreigns_to_dictionary(
121
/*===================================*/
122
ulint start_id,
130
dict_table_t
* table,
131
trx_t
* trx);
133
/* Table create node structure */
134
135
struct
tab_node_struct
{
136
que_common_t
common
;
137
dict_table_t
*
table
;
139
ins_node_t
* tab_def;
/* child node which does the insert of
140
the table definition; the row to be inserted
141
is built by the parent node */
142
ins_node_t
* col_def;
/* child node which does the inserts of
143
the column definitions; the row to be inserted
144
is built by the parent node */
145
commit_node_t
* commit_node;
146
/* child node which performs a commit after
147
a successful table creation */
148
/*----------------------*/
149
/* Local storage for this graph node */
150
ulint
state
;
151
ulint
col_no
;
152
mem_heap_t
*
heap
;
153
};
154
155
/* Table create node states */
156
#define TABLE_BUILD_TABLE_DEF 1
157
#define TABLE_BUILD_COL_DEF 2
158
#define TABLE_COMMIT_WORK 3
159
#define TABLE_ADD_TO_CACHE 4
160
#define TABLE_COMPLETED 5
161
162
/* Index create node struct */
163
164
struct
ind_node_struct
{
165
que_common_t
common
;
166
dict_index_t
*
index
;
168
ins_node_t
* ind_def;
/* child node which does the insert of
169
the index definition; the row to be inserted
170
is built by the parent node */
171
ins_node_t
* field_def;
/* child node which does the inserts of
172
the field definitions; the row to be inserted
173
is built by the parent node */
174
commit_node_t
* commit_node;
175
/* child node which performs a commit after
176
a successful index creation */
177
/*----------------------*/
178
/* Local storage for this graph node */
179
ulint
state
;
180
ulint page_no;
/* root page number of the index */
181
dict_table_t
*
table
;
182
dtuple_t
* ind_row;
/* index definition row built */
183
ulint field_no;
/* next field definition to insert */
184
mem_heap_t
*
heap
;
185
};
186
187
/* Index create node states */
188
#define INDEX_BUILD_INDEX_DEF 1
189
#define INDEX_BUILD_FIELD_DEF 2
190
#define INDEX_CREATE_INDEX_TREE 3
191
#define INDEX_COMMIT_WORK 4
192
#define INDEX_ADD_TO_CACHE 5
193
194
#ifndef UNIV_NONINL
195
#include "dict0crea.ic"
196
#endif
197
198
#endif
plugin
innobase
include
dict0crea.h
Generated on Tue Oct 29 2013 17:05:46 for drizzle by
1.8.4