drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
dict0load.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/**************************************************/
26
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
50typedef enum dict_system_table_id dict_system_id_t;
51
62
63typedef enum dict_table_info dict_table_info_t;
64
65/********************************************************************/
73UNIV_INTERN
74void
76/*====================================*/
77 ibool in_crash_recovery);
78/********************************************************************/
82UNIV_INTERN
83char*
85/*============================*/
86 const char* name);
87
88/********************************************************************/
92UNIV_INTERN
93const char*
95/*================*/
96 const char* name,
97 const rec_t* rec,
98 dict_table_t** table);
99/********************************************************************/
103UNIV_INTERN
104const 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/********************************************************************/
124UNIV_INTERN
125const 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/********************************************************************/
142UNIV_INTERN
143const 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/********************************************************************/
168UNIV_INTERN
169dict_table_t*
171/*============*/
172 const char* name,
174 ibool cached,
175 dict_err_ignore_t ignore_err);
178/***********************************************************************/
181UNIV_INTERN
182dict_table_t*
184/*==================*/
185 table_id_t table_id);
186/********************************************************************/
190UNIV_INTERN
191void
193/*================*/
194 dict_table_t* table);
195/***********************************************************************/
202UNIV_INTERN
203ulint
205/*===============*/
206 const char* table_name,
207 ibool check_recursive,
209 ibool check_charsets);
211/********************************************************************/
214UNIV_INTERN
215void
216dict_print(void);
217/*============*/
218
219typedef void (*dict_print_callback)(void *ptr, const char *);
220UNIV_INTERN void dict_print_with_callback(dict_print_callback, void *);
221
222
223/********************************************************************/
226UNIV_INTERN
227const rec_t*
229/*==================*/
230 btr_pcur_t* pcur,
232 mtr_t* mtr,
233 dict_system_id_t system_id);
234/********************************************************************/
237UNIV_INTERN
238const rec_t*
240/*================*/
241 btr_pcur_t* pcur,
243 mtr_t* mtr);
244/********************************************************************/
249UNIV_INTERN
250const char*
252/*========================*/
253 mem_heap_t* heap,
254 const rec_t* rec,
255 dict_table_t** table,
256 dict_table_info_t status);
260/********************************************************************/
265UNIV_INTERN
266const char*
268/*=========================*/
269 mem_heap_t* heap,
270 const rec_t* rec,
271 dict_index_t* index,
273 table_id_t* table_id);
274/********************************************************************/
278UNIV_INTERN
279const 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/********************************************************************/
291UNIV_INTERN
292const 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/********************************************************************/
307UNIV_INTERN
308const char*
310/*=========================*/
311 mem_heap_t* heap,
312 const rec_t* rec,
313 dict_foreign_t* foreign);
315/********************************************************************/
319UNIV_INTERN
320const 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
struct btr_pcur_struct btr_pcur_t
Definition btr0types.h:36
UNIV_INTERN void dict_load_sys_table(dict_table_t *table)
UNIV_INTERN dict_table_t * dict_load_table(const char *name, ibool cached, dict_err_ignore_t ignore_err)
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 char * dict_get_first_table_name_in_db(const char *name)
Definition dict0load.cc:84
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_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_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_load_table_low(const char *name, const rec_t *rec, dict_table_t **table)
dict_system_table_id
Definition dict0load.h:38
dict_table_info
Definition dict0load.h:53
@ DICT_TABLE_LOAD_FROM_RECORD
Definition dict0load.h:54
@ DICT_TABLE_UPDATE_STATS
Definition dict0load.h:59
@ DICT_TABLE_LOAD_FROM_CACHE
Definition dict0load.h:57
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 void dict_print(void)
Definition dict0load.cc:166
UNIV_INTERN const rec_t * dict_getnext_system(btr_pcur_t *pcur, mtr_t *mtr)
Definition dict0load.cc:290
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 dict_table_t * dict_load_table_on_id(table_id_t table_id)
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_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 ulint dict_load_foreigns(const char *table_name, ibool check_recursive, ibool check_charsets)
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)
UNIV_INTERN void dict_check_tablespaces_and_store_max_id(ibool in_crash_recovery)
Definition dict0load.cc:734
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)