drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
dict0crea.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/**************************************************/
25
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/*********************************************************************/
40UNIV_INTERN
41tab_node_t*
43/*====================*/
44 dict_table_t* table,
46 mem_heap_t* heap);
47/*********************************************************************/
50UNIV_INTERN
51ind_node_t*
53/*====================*/
54 dict_index_t* index,
56 mem_heap_t* heap);
57/***********************************************************/
60UNIV_INTERN
61que_thr_t*
63/*===================*/
64 que_thr_t* thr);
65/***********************************************************/
69UNIV_INTERN
70que_thr_t*
72/*===================*/
73 que_thr_t* thr);
74/*******************************************************************/
77UNIV_INTERN
78ulint
80/*=====================*/
81 dict_table_t* table,
82 ulint space,
85 btr_pcur_t* pcur,
89 mtr_t* mtr);
92/*******************************************************************/
94UNIV_INTERN
95void
97/*=================*/
98 rec_t* rec,
100 mtr_t* mtr);
101/****************************************************************/
106UNIV_INTERN
107ulint
109/*================================================*/
110/********************************************************************/
118UNIV_INTERN
119ulint
121/*===================================*/
122 ulint start_id,
130 dict_table_t* table,
131 trx_t* trx);
132
133/* Table create node structure */
134
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
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
struct btr_pcur_struct btr_pcur_t
Definition btr0types.h:36
UNIV_INTERN void dict_drop_index_tree(rec_t *rec, mtr_t *mtr)
Definition dict0crea.cc:680
UNIV_INTERN ulint dict_truncate_index_tree(dict_table_t *table, ulint space, btr_pcur_t *pcur, mtr_t *mtr)
Definition dict0crea.cc:744
UNIV_INTERN que_thr_t * dict_create_table_step(que_thr_t *thr)
Definition dict0crea.cc:951
UNIV_INTERN que_thr_t * dict_create_index_step(que_thr_t *thr)
UNIV_INTERN ulint dict_create_or_check_foreign_constraint_tables(void)
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_create_add_foreigns_to_dictionary(ulint start_id, dict_table_t *table, trx_t *trx)
UNIV_INTERN tab_node_t * tab_create_graph_create(dict_table_t *table, mem_heap_t *heap)
Definition dict0crea.cc:878
dict_index_t * index
Definition dict0crea.h:166
mem_heap_t * heap
Definition dict0crea.h:184
que_common_t common
Definition dict0crea.h:165
dict_table_t * table
Definition dict0crea.h:181
que_common_t common
Definition dict0crea.h:136
dict_table_t * table
Definition dict0crea.h:137
mem_heap_t * heap
Definition dict0crea.h:152
struct commit_node_struct commit_node_t
Definition trx0types.h:62