Drizzled Public API Documentation

dict0load.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 /**************************************************/
27 #pragma once
28 #ifndef dict0load_h
29 #define dict0load_h
30 
31 #include "univ.i"
32 #include "dict0types.h"
33 #include "ut0byte.h"
34 #include "mem0mem.h"
35 #include "btr0types.h"
36 
39  SYS_TABLES = 0,
40  SYS_INDEXES,
41  SYS_COLUMNS,
42  SYS_FIELDS,
43  SYS_FOREIGN,
44  SYS_FOREIGN_COLS,
45 
46  /* This must be last item. Defines the number of system tables. */
47  SYS_NUM_SYSTEM_TABLES
48 };
49 
50 typedef enum dict_system_table_id dict_system_id_t;
51 
61 };
62 
63 typedef enum dict_table_info dict_table_info_t;
64 
65 /********************************************************************/
73 UNIV_INTERN
74 void
76 /*====================================*/
77  ibool in_crash_recovery);
78 /********************************************************************/
82 UNIV_INTERN
83 char*
85 /*============================*/
86  const char* name);
88 /********************************************************************/
92 UNIV_INTERN
93 const char*
95 /*================*/
96  const char* name,
97  const rec_t* rec,
98  dict_table_t** table);
99 /********************************************************************/
103 UNIV_INTERN
104 const char*
106 /*=================*/
107  dict_table_t* table,
111  mem_heap_t* heap,
113  dict_col_t* column,
115  table_id_t* table_id,
116  const char** col_name,
117  const rec_t* rec);
118 /********************************************************************/
124 UNIV_INTERN
125 const char*
127 /*================*/
128  byte* table_id,
131  const char* table_name,
132  mem_heap_t* heap,
133  const rec_t* rec,
134  ibool allocate,
137  dict_index_t** index);
138 /********************************************************************/
142 UNIV_INTERN
143 const char*
145 /*================*/
146  byte* index_id,
149  dict_index_t* index,
153  dict_field_t* sys_field,
155  ulint* pos,
156  byte* last_index_id,
157  mem_heap_t* heap,
159  const rec_t* rec);
160 /********************************************************************/
168 UNIV_INTERN
171 /*============*/
172  const char* name,
174  ibool cached,
175  dict_err_ignore_t ignore_err);
178 /***********************************************************************/
181 UNIV_INTERN
184 /*==================*/
185  table_id_t table_id);
186 /********************************************************************/
190 UNIV_INTERN
191 void
193 /*================*/
194  dict_table_t* table);
195 /***********************************************************************/
202 UNIV_INTERN
203 ulint
205 /*===============*/
206  const char* table_name,
207  ibool check_recursive,
209  ibool check_charsets);
211 /********************************************************************/
214 UNIV_INTERN
215 void
216 dict_print(void);
217 /*============*/
218 
219 typedef void (*dict_print_callback)(void *ptr, const char *);
220 UNIV_INTERN void dict_print_with_callback(dict_print_callback, void *);
221 
222 
223 /********************************************************************/
226 UNIV_INTERN
227 const rec_t*
229 /*==================*/
230  btr_pcur_t* pcur,
232  mtr_t* mtr,
233  dict_system_id_t system_id);
234 /********************************************************************/
237 UNIV_INTERN
238 const rec_t*
240 /*================*/
241  btr_pcur_t* pcur,
243  mtr_t* mtr);
244 /********************************************************************/
249 UNIV_INTERN
250 const char*
252 /*========================*/
253  mem_heap_t* heap,
254  const rec_t* rec,
255  dict_table_t** table,
256  dict_table_info_t status);
260 /********************************************************************/
265 UNIV_INTERN
266 const char*
268 /*=========================*/
269  mem_heap_t* heap,
270  const rec_t* rec,
271  dict_index_t* index,
273  table_id_t* table_id);
274 /********************************************************************/
278 UNIV_INTERN
279 const char*
281 /*=========================*/
282  mem_heap_t* heap,
283  const rec_t* rec,
284  dict_col_t* column,
285  table_id_t* table_id,
286  const char** col_name);
287 /********************************************************************/
291 UNIV_INTERN
292 const char*
294 /*========================*/
295  mem_heap_t* heap,
296  const rec_t* rec,
297  dict_field_t* sys_field,
299  ulint* pos,
300  index_id_t* index_id,
301  index_id_t last_id);
302 /********************************************************************/
307 UNIV_INTERN
308 const char*
310 /*=========================*/
311  mem_heap_t* heap,
312  const rec_t* rec,
313  dict_foreign_t* foreign);
315 /********************************************************************/
319 UNIV_INTERN
320 const char*
322 /*=============================*/
323  mem_heap_t* heap,
324  const rec_t* rec,
325  const char** name,
326  const char** for_col_name,
327  const char** ref_col_name,
329  ulint* pos);
330 #ifndef UNIV_NONINL
331 #include "dict0load.ic"
332 #endif
333 
334 #endif
dict_table_info
Definition: dict0load.h:53
UNIV_INTERN const char * dict_load_table_low(const char *name, const rec_t *rec, dict_table_t **table)
Definition: dict0load.cc:1558
UNIV_INTERN const char * dict_process_sys_foreign_rec(mem_heap_t *heap, const rec_t *rec, dict_foreign_t *foreign)
Definition: dict0load.cc:454
UNIV_INTERN const char * dict_load_column_low(dict_table_t *table, mem_heap_t *heap, dict_col_t *column, table_id_t *table_id, const char **col_name, const rec_t *rec)
Definition: dict0load.cc:877
UNIV_INTERN dict_table_t * dict_load_table_on_id(table_id_t table_id)
Definition: dict0load.cc:1890
UNIV_INTERN const char * dict_process_sys_fields_rec(mem_heap_t *heap, const rec_t *rec, dict_field_t *sys_field, ulint *pos, index_id_t *index_id, index_id_t last_id)
Definition: dict0load.cc:419
UNIV_INTERN const char * dict_process_sys_foreign_col_rec(mem_heap_t *heap, const rec_t *rec, const char **name, const char **for_col_name, const char **ref_col_name, ulint *pos)
Definition: dict0load.cc:529
UNIV_INTERN void dict_load_sys_table(dict_table_t *table)
Definition: dict0load.cc:1984
UNIV_INTERN dict_table_t * dict_load_table(const char *name, ibool cached, dict_err_ignore_t ignore_err)
Definition: dict0load.cc:1710
UNIV_INTERN const char * dict_load_field_low(byte *index_id, dict_index_t *index, dict_field_t *sys_field, ulint *pos, byte *last_index_id, mem_heap_t *heap, const rec_t *rec)
Definition: dict0load.cc:1081
dict_system_table_id
Definition: dict0load.h:38
UNIV_INTERN void dict_check_tablespaces_and_store_max_id(ibool in_crash_recovery)
Definition: dict0load.cc:734
UNIV_INTERN char * dict_get_first_table_name_in_db(const char *name)
Definition: dict0load.cc:84
UNIV_INTERN const char * dict_load_index_low(byte *table_id, const char *table_name, mem_heap_t *heap, const rec_t *rec, ibool allocate, dict_index_t **index)
Definition: dict0load.cc:1279
UNIV_INTERN const rec_t * dict_startscan_system(btr_pcur_t *pcur, mtr_t *mtr, dict_system_id_t system_id)
Definition: dict0load.cc:260
UNIV_INTERN const rec_t * dict_getnext_system(btr_pcur_t *pcur, mtr_t *mtr)
Definition: dict0load.cc:290
UNIV_INTERN void dict_print(void)
Definition: dict0load.cc:166
UNIV_INTERN const char * dict_process_sys_columns_rec(mem_heap_t *heap, const rec_t *rec, dict_col_t *column, table_id_t *table_id, const char **col_name)
Definition: dict0load.cc:397
UNIV_INTERN const char * dict_process_sys_tables_rec(mem_heap_t *heap, const rec_t *rec, dict_table_t **table, dict_table_info_t status)
Definition: dict0load.cc:313
UNIV_INTERN const char * dict_process_sys_indexes_rec(mem_heap_t *heap, const rec_t *rec, dict_index_t *index, table_id_t *table_id)
Definition: dict0load.cc:371
UNIV_INTERN ulint dict_load_foreigns(const char *table_name, ibool check_recursive, ibool check_charsets)
Definition: dict0load.cc:2257