Drizzled Public API Documentation

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
43 /*====================*/
44  dict_table_t* table,
46  mem_heap_t* heap);
47 /*********************************************************************/
50 UNIV_INTERN
53 /*====================*/
54  dict_index_t* index,
56  mem_heap_t* heap);
57 /***********************************************************/
60 UNIV_INTERN
61 que_thr_t*
63 /*===================*/
64  que_thr_t* thr);
65 /***********************************************************/
69 UNIV_INTERN
70 que_thr_t*
72 /*===================*/
73  que_thr_t* thr);
74 /*******************************************************************/
77 UNIV_INTERN
78 ulint
80 /*=====================*/
81  dict_table_t* table,
82  ulint space,
85  btr_pcur_t* pcur,
89  mtr_t* mtr);
92 /*******************************************************************/
94 UNIV_INTERN
95 void
97 /*=================*/
98  rec_t* rec,
100  mtr_t* mtr);
101 /****************************************************************/
106 UNIV_INTERN
107 ulint
109 /*================================================*/
110 /********************************************************************/
118 UNIV_INTERN
119 ulint
121 /*===================================*/
122  ulint start_id,
130  dict_table_t* table,
131  trx_t* trx);
133 /* Table create node structure */
134 
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;
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 
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 */
182  dtuple_t* ind_row;/* index definition row built */
183  ulint field_no;/* next field definition to insert */
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
UNIV_INTERN ulint dict_create_or_check_foreign_constraint_tables(void)
Definition: dict0crea.cc:1193
UNIV_INTERN ulint dict_create_add_foreigns_to_dictionary(ulint start_id, dict_table_t *table, trx_t *trx)
Definition: dict0crea.cc:1488
UNIV_INTERN ind_node_t * ind_create_graph_create(dict_index_t *index, mem_heap_t *heap)
Definition: dict0crea.cc:914
UNIV_INTERN ulint dict_truncate_index_tree(dict_table_t *table, ulint space, btr_pcur_t *pcur, mtr_t *mtr)
Definition: dict0crea.cc:744
que_common_t common
Definition: dict0crea.h:136
dict_table_t * table
Definition: dict0crea.h:137
UNIV_INTERN que_thr_t * dict_create_index_step(que_thr_t *thr)
Definition: dict0crea.cc:1058
mem_heap_t * heap
Definition: dict0crea.h:152
UNIV_INTERN que_thr_t * dict_create_table_step(que_thr_t *thr)
Definition: dict0crea.cc:951
UNIV_INTERN tab_node_t * tab_create_graph_create(dict_table_t *table, mem_heap_t *heap)
Definition: dict0crea.cc:878
dict_table_t * table
Definition: dict0crea.h:181
mem_heap_t * heap
Definition: dict0crea.h:184
que_common_t common
Definition: dict0crea.h:165
dict_index_t * index
Definition: dict0crea.h:166
UNIV_INTERN void dict_drop_index_tree(rec_t *rec, mtr_t *mtr)
Definition: dict0crea.cc:680