drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
dict0dict.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 dict0dict_h
28#define dict0dict_h
29
30#include "univ.i"
31#include "dict0types.h"
32#include "dict0mem.h"
33#include "data0type.h"
34#include "data0data.h"
35#include "mem0mem.h"
36#include "rem0types.h"
37#include "ut0mem.h"
38#include "ut0lst.h"
39#include "hash0hash.h"
40#include "ut0rnd.h"
41#include "ut0byte.h"
42#include "trx0types.h"
43
44#ifndef UNIV_HOTBACKUP
45# include "sync0sync.h"
46# include "sync0rw.h"
47/******************************************************************/
49UNIV_INTERN
50void
52/*============*/
53 char* a);
54/********************************************************************/
57UNIV_INTERN
58ulint
60/*=================*/
61 const char* name);
63/********************************************************************/
66
67const char*
69/*================*/
70 const char* name);
72/**********************************************************************/
75UNIV_INTERN
76dict_table_t*
78/*=================*/
79 table_id_t table_id,
80 trx_t* trx);
81/********************************************************************/
83UNIV_INTERN
84void
86/*==============================*/
87 dict_table_t* table,
88 ibool dict_locked);
89/**********************************************************************/
91UNIV_INTERN
92void
93dict_init(void);
94/*===========*/
95/********************************************************************/
101UNIV_INTERN
102void
104/*=========================*/
105/*********************************************************************/
108UNIV_INLINE
109ulint
111/*==================*/
112 const dict_col_t* col);
113/*********************************************************************/
116UNIV_INLINE
117ulint
119/*==================*/
120 const dict_col_t* col);
121/*********************************************************************/
123UNIV_INLINE
124void
126/*=====================*/
127 dict_col_t* col,
128 ulint mbminlen,
130 ulint mbmaxlen);
132/*********************************************************************/
134UNIV_INLINE
135void
137/*===============*/
138 const dict_col_t* col,
139 dtype_t* type);
140#endif /* !UNIV_HOTBACKUP */
141#ifdef UNIV_DEBUG
142/*********************************************************************/
145UNIV_INLINE
146ibool
147dict_col_type_assert_equal(
148/*=======================*/
149 const dict_col_t* col,
150 const dtype_t* type);
151#endif /* UNIV_DEBUG */
152#ifndef UNIV_HOTBACKUP
153/***********************************************************************/
156UNIV_INLINE
157ulint
159/*==================*/
160 const dict_col_t* col);
161/***********************************************************************/
164UNIV_INLINE
165ulint
167/*==================*/
168 const dict_col_t* col);
169/***********************************************************************/
172UNIV_INLINE
173ulint
175/*====================*/
176 const dict_col_t* col,
177 ulint comp);
178/***********************************************************************/
182UNIV_INLINE
183ulint
185/*=======================*/
186 const dict_col_t* col,
187 ulint comp);
188
189/*********************************************************************/
192UNIV_INLINE
193ulint
195/*============*/
196 const dict_col_t* col);
197/*********************************************************************/
199UNIV_INLINE
200ulint
202/*===================*/
203 const dict_col_t* col,
204 const dict_index_t* clust_index);
205/****************************************************************/
209UNIV_INTERN
210ibool
212/*======================*/
213 const char* name);
214/********************************************************************/
216UNIV_INTERN
217void
219/*====================*/
220 dict_table_t* table);
221/********************************************************************/
223UNIV_INTERN
224void
226/*==========================*/
227 dict_table_t* table,
228 ib_uint64_t value);
229/********************************************************************/
233UNIV_INTERN
234ib_uint64_t
236/*====================*/
237 const dict_table_t* table);
238/********************************************************************/
241UNIV_INTERN
242void
244/*=================================*/
245
246 dict_table_t* table,
247 ib_uint64_t value);
248/********************************************************************/
250UNIV_INTERN
251void
253/*======================*/
254 dict_table_t* table);
255#endif /* !UNIV_HOTBACKUP */
256/**********************************************************************/
258UNIV_INTERN
259void
261/*==========================*/
262 dict_table_t* table,
263 mem_heap_t* heap);
264#ifndef UNIV_HOTBACKUP
265/**********************************************************************/
267UNIV_INTERN
268void
270/*====================*/
271 dict_table_t* table,
272 mem_heap_t* heap);
273/**********************************************************************/
275UNIV_INTERN
276void
278/*=========================*/
279 dict_table_t* table);
280/**********************************************************************/
283UNIV_INTERN
284ibool
286/*=======================*/
287 dict_table_t* table,
288 const char* new_name,
289 ibool rename_also_foreigns);
292/**********************************************************************/
295UNIV_INTERN
296void
298/*==========================*/
299 dict_table_t* table,
300 table_id_t new_id);
301/**********************************************************************/
307UNIV_INTERN
308ulint
310/*======================*/
311 dict_foreign_t* foreign,
312 ibool check_charsets);
314/*********************************************************************/
319UNIV_INTERN
320dict_foreign_t*
322/*=================================*/
323 dict_table_t* table,
324 dict_index_t* index);
325/*********************************************************************/
328UNIV_INTERN
329ibool
331/*====================================*/
332 const dict_table_t* table);
333/**********************************************************************/
336UNIV_INTERN
337void
339/*=====================================*/
340 dict_table_t* table,
341 dict_index_t* index,
342 const trx_t* trx);
343/*********************************************************************/
349UNIV_INTERN
350dict_foreign_t*
352/*==============================*/
353 dict_table_t* table,
354 dict_index_t* index);
355/*********************************************************************/
363UNIV_INTERN
364ulint
366/*============================*/
367 trx_t* trx,
368 const char* sql_string,
376 size_t sql_length,
377 const char* name,
380 ibool reject_fks);
383/**********************************************************************/
387UNIV_INTERN
388ulint
390/*================================*/
391 mem_heap_t* heap,
393 trx_t* trx,
394 dict_table_t* table,
395 ulint* n,
397 const char*** constraints_to_drop);
399/**********************************************************************/
405UNIV_INTERN
406dict_table_t*
408/*===========*/
409 const char* table_name,
410 ibool inc_mysql_count);
413/**********************************************************************/
416UNIV_INTERN
417dict_index_t*
419/*=====================*/
420 dict_table_t* table,
421 index_id_t index_id);
422/**********************************************************************/
425
426UNIV_INLINE
427dict_table_t*
429/*=============================*/
430 const char* table_name);
431/**********************************************************************/
435UNIV_INLINE
436dict_table_t*
438/*===========================*/
439 const char* table_name,
440 dict_err_ignore_t
441 ignore_err);
443/**********************************************************************/
447UNIV_INLINE
448dict_table_t*
450/*===============*/
451 const char* table_name);
452/**********************************************************************/
455UNIV_INLINE
456dict_table_t*
458/*=====================*/
459 table_id_t table_id);
460/**********************************************************************/
464UNIV_INTERN
465dict_index_t*
467/*==========================*/
468 dict_foreign_t* foreign);
469/**********************************************************************/
473UNIV_INTERN
474dict_index_t*
476/*===========================*/
477 dict_table_t* table,
478 const char* name,
479 const char** columns,
480 ulint n_cols);
481/**********************************************************************/
485UNIV_INTERN
486const char*
488/*====================*/
489 const dict_table_t* table,
490 ulint col_nr);
491
492/**********************************************************************/
494UNIV_INTERN
495void
497/*=============*/
498 dict_table_t* table);
499/**********************************************************************/
501UNIV_INTERN
502void
504/*=================*/
505 dict_table_t* table);
506/**********************************************************************/
508UNIV_INTERN
509void
511/*=====================*/
512 const char* name);
513/**********************************************************************/
515UNIV_INTERN
516void
518/*============================*/
519 ibool create_table_format,
523 FILE* file,
524 trx_t* trx,
525 dict_table_t* table);
526/**********************************************************************/
529UNIV_INTERN
530void
532/*============================================*/
533 FILE* file,
534 trx_t* trx,
535 dict_foreign_t* foreign,
536 ibool add_newline);
537/********************************************************************/
539UNIV_INTERN
540void
542/*==================*/
543 FILE* file,
544 trx_t* trx,
545 const dict_index_t* index);
546#ifdef UNIV_DEBUG
547/********************************************************************/
550UNIV_INLINE
551dict_index_t*
552dict_table_get_first_index(
553/*=======================*/
554 const dict_table_t* table);
555/********************************************************************/
558UNIV_INLINE
559dict_index_t*
560dict_table_get_next_index(
561/*======================*/
562 const dict_index_t* index);
563#else /* UNIV_DEBUG */
564# define dict_table_get_first_index(table) UT_LIST_GET_FIRST((table)->indexes)
565# define dict_table_get_next_index(index) UT_LIST_GET_NEXT(indexes, index)
566#endif /* UNIV_DEBUG */
567#endif /* !UNIV_HOTBACKUP */
568/********************************************************************/
571UNIV_INLINE
572ulint
574/*================*/
575 const dict_index_t* index)
576 __attribute__((pure));
577/********************************************************************/
580UNIV_INLINE
581ulint
583/*=================*/
584 const dict_index_t* index)
585 __attribute__((pure));
586/********************************************************************/
589UNIV_INLINE
590ulint
592/*===============*/
593 const dict_index_t* index)
594 __attribute__((pure));
595/********************************************************************/
598UNIV_INLINE
599ulint
601/*======================*/
602 const dict_index_t* index)
603 __attribute__((pure));
604
605/********************************************************************/
609UNIV_INLINE
610ulint
612/*=======================*/
613 const dict_table_t* table);
614/********************************************************************/
617UNIV_INLINE
618ulint
620/*======================*/
621 const dict_table_t* table);
622/********************************************************************/
626UNIV_INLINE
627ulint
629/*==================*/
630 const dict_table_t* table);
631#ifdef UNIV_DEBUG
632/********************************************************************/
635UNIV_INLINE
636dict_col_t*
637dict_table_get_nth_col(
638/*===================*/
639 const dict_table_t* table,
640 ulint pos);
641/********************************************************************/
644UNIV_INLINE
645dict_col_t*
646dict_table_get_sys_col(
647/*===================*/
648 const dict_table_t* table,
649 ulint sys);
650#else /* UNIV_DEBUG */
651#define dict_table_get_nth_col(table, pos) \
652((table)->cols + (pos))
653#define dict_table_get_sys_col(table, sys) \
654((table)->cols + (table)->n_cols + (sys) - DATA_N_SYS_COLS)
655#endif /* UNIV_DEBUG */
656/********************************************************************/
659UNIV_INLINE
660ulint
662/*======================*/
663 const dict_table_t* table,
664 ulint sys);
665#ifndef UNIV_HOTBACKUP
666/********************************************************************/
669UNIV_INLINE
670ulint
672/*====================*/
673 const dict_index_t* index);
674#endif /* !UNIV_HOTBACKUP */
675/********************************************************************/
678UNIV_INLINE
679ibool
681/*===============*/
682 const dict_table_t* table);
683/********************************************************************/
686UNIV_INLINE
687ulint
689/*==================*/
690 const dict_table_t* table);
691/********************************************************************/
693UNIV_INLINE
694void
696/*==================*/
697 dict_table_t* table,
698 ulint format);
699/********************************************************************/
702UNIV_INLINE
703ulint
705/*=========================*/
706 ulint flags)
707 __attribute__((const));
708/********************************************************************/
711UNIV_INLINE
712ulint
714/*================*/
715 const dict_table_t* table);
716/*********************************************************************/
720UNIV_INLINE
721void
723/*======================*/
724 dict_table_t* table);
725/*********************************************************************/
727UNIV_INLINE
728void
730/*========================*/
731 dict_table_t* table);
732/********************************************************************/
736UNIV_INTERN
737ibool
739/*============================*/
740 const dict_table_t* table,
741 ulint n);
742#ifndef UNIV_HOTBACKUP
743/*******************************************************************/
747UNIV_INTERN
748void
750/*==================*/
751 dtuple_t* tuple,
752 const dict_table_t* table);
753/**********************************************************************/
758UNIV_INTERN
759dict_index_t*
761/*======================*/
762 index_id_t id);
763/**********************************************************************/
766UNIV_INTERN
767ulint
769/*====================*/
770 dict_table_t* table,
771 dict_index_t* index,
773 ulint page_no,
774 ibool strict);
777#endif /* !UNIV_HOTBACKUP */
778/********************************************************************/
782UNIV_INLINE
783ulint
785/*====================*/
786 const dict_index_t* index);
789/********************************************************************/
795UNIV_INLINE
796ulint
798/*====================*/
799 const dict_index_t* index);
801/********************************************************************/
806UNIV_INLINE
807ulint
809/*============================*/
810 const dict_index_t* index);
812/********************************************************************/
818UNIV_INLINE
819ulint
821/*======================================*/
822 const dict_index_t* index);
824#ifdef UNIV_DEBUG
825/********************************************************************/
828UNIV_INLINE
829dict_field_t*
830dict_index_get_nth_field(
831/*=====================*/
832 const dict_index_t* index,
833 ulint pos);
834#else /* UNIV_DEBUG */
835# define dict_index_get_nth_field(index, pos) ((index)->fields + (pos))
836#endif /* UNIV_DEBUG */
837/********************************************************************/
840UNIV_INLINE
841const dict_col_t*
843/*===================*/
844 const dict_index_t* index,
845 ulint pos);
846/********************************************************************/
849UNIV_INLINE
850ulint
852/*======================*/
853 const dict_index_t* index,
854 ulint pos);
855/********************************************************************/
859UNIV_INTERN
860ulint
862/*=======================*/
863 const dict_index_t* index,
864 ulint n);
865/********************************************************************/
868UNIV_INTERN
869ibool
871/*==============================*/
872 const dict_index_t* index,
873 ulint n);
874/********************************************************************/
881UNIV_INTERN
882ulint
884/*=========================*/
885 const dict_index_t* index,
886 const dict_index_t* index2,
887 ulint n);
888/********************************************************************/
891UNIV_INTERN
892ulint
894/*=======================*/
895 const dict_table_t* table,
896 ulint n);
897/********************************************************************/
900UNIV_INLINE
901ulint
903/*=======================*/
904 const dict_index_t* index,
905 ulint type);
906/*******************************************************************/
908UNIV_INTERN
909void
911/*===============*/
912 dict_index_t* index,
913 const dict_table_t* table,
914 dict_col_t* col,
915 ulint prefix_len);
916#ifndef UNIV_HOTBACKUP
917/*******************************************************************/
919UNIV_INTERN
920void
922/*==================*/
923 dtuple_t* tuple,
924 const dict_index_t* index,
925 ulint n_fields);
927#endif /* !UNIV_HOTBACKUP */
928/*********************************************************************/
931UNIV_INLINE
932const dict_col_t*
934/*===============*/
935 const dict_field_t* field);
936#ifndef UNIV_HOTBACKUP
937/**********************************************************************/
941UNIV_INTERN
942dict_index_t*
944/*===========================*/
945 index_id_t index_id);
946#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
947/**********************************************************************/
950UNIV_INTERN
951dict_index_t*
952dict_index_get_if_in_cache(
953/*=======================*/
954 index_id_t index_id);
955#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
956#ifdef UNIV_DEBUG
957/**********************************************************************/
961UNIV_INTERN
962ibool
963dict_index_check_search_tuple(
964/*==========================*/
965 const dict_index_t* index,
966 const dtuple_t* tuple);
967/**********************************************************************/
969UNIV_INTERN
970void
971dict_table_check_for_dup_indexes(
972/*=============================*/
973 const dict_table_t* table,
975 ibool tmp_ok);
977#endif /* UNIV_DEBUG */
978/**********************************************************************/
981UNIV_INTERN
982dtuple_t*
984/*======================*/
985 const dict_index_t* index,
986 const rec_t* rec,
988 ulint page_no,
990 mem_heap_t* heap,
992 ulint level);
994/**********************************************************************/
998UNIV_INTERN
999rec_t*
1001/*=============================*/
1002 const dict_index_t* index,
1003 const rec_t* rec,
1005 ulint* n_fields,
1006 byte** buf,
1008 ulint* buf_size);
1009/**********************************************************************/
1012UNIV_INTERN
1013dtuple_t*
1015/*========================*/
1016 dict_index_t* index,
1017 rec_t* rec,
1018 ulint n_fields,
1019 mem_heap_t* heap);
1020/*********************************************************************/
1023UNIV_INLINE
1024ulint
1026/*=================*/
1027 const dict_index_t* index);
1028/*********************************************************************/
1030UNIV_INLINE
1031void
1033/*=================*/
1034 dict_index_t* index,
1035 ulint space);
1036/*********************************************************************/
1039UNIV_INLINE
1040ulint
1042/*================*/
1043 const dict_index_t* tree);
1044/*********************************************************************/
1046UNIV_INLINE
1047void
1049/*================*/
1050 dict_index_t* index,
1051 ulint page);
1052/*********************************************************************/
1055UNIV_INLINE
1056rw_lock_t*
1058/*================*/
1059 dict_index_t* index);
1060/********************************************************************/
1065UNIV_INLINE
1066ulint
1068/*==============================*/
1069/*********************************************************************/
1071UNIV_INTERN
1072ulint
1074/*========================*/
1075 const dict_index_t* index);
1076/*********************************************************************/
1079UNIV_INTERN
1080void
1082/*===================*/
1083 dict_table_t* table,
1084 ibool only_calc_if_missing_stats);
1088/********************************************************************/
1090UNIV_INTERN
1091void
1093/*============================*/
1094/********************************************************************/
1096UNIV_INTERN
1097void
1099/*===========================*/
1100/**********************************************************************/
1104UNIV_INTERN
1105void
1107/*==================*/
1108 const dict_table_t* table,
1109 ulint latch_mode);
1111/**********************************************************************/
1113UNIV_INTERN
1114void
1116/*====================*/
1117 const dict_table_t* table,
1118 ulint latch_mode);
1120/********************************************************************/
1123UNIV_INTERN
1124ibool
1126/*=====================*/
1127 const char* name1,
1129 const char* name2);
1131/*********************************************************************/
1133UNIV_INTERN
1134void
1136/*=========================*/
1137 dict_table_t* table,
1138 dict_index_t* index);
1139/**********************************************************************/
1142UNIV_INTERN
1143dict_index_t*
1145/*=========================*/
1146 dict_table_t* table,
1147 const char* name);
1148/**********************************************************************/
1152UNIV_INTERN
1153dict_index_t*
1155/*====================================*/
1156 dict_table_t* table,
1157 const char* name);
1158/* Buffers for storing detailed information about the latest foreign key
1159and unique key errors */
1160extern FILE* dict_foreign_err_file;
1161extern mutex_t dict_foreign_err_mutex; /* mutex protecting the buffers */
1162
1164extern dict_sys_t* dict_sys;
1166extern rw_lock_t dict_operation_lock;
1167
1168/* Dictionary system struct */
1183 hash_table_t* table_hash;
1185 hash_table_t* table_id_hash;
1187 UT_LIST_BASE_NODE_T(dict_table_t)
1189 ulint size;
1192 dict_table_t* sys_tables;
1193 dict_table_t* sys_columns;
1194 dict_table_t* sys_indexes;
1195 dict_table_t* sys_fields;
1196};
1197#endif /* !UNIV_HOTBACKUP */
1198
1200extern dict_index_t* dict_ind_redundant;
1202extern dict_index_t* dict_ind_compact;
1203
1204/**********************************************************************/
1206UNIV_INTERN
1207void
1208dict_ind_init(void);
1209/*===============*/
1210
1211/**********************************************************************/
1213UNIV_INTERN
1214void
1215dict_close(void);
1216/*============*/
1217
1218#ifndef UNIV_NONINL
1219#include "dict0dict.ic"
1220#endif
1221
1222#endif
UNIV_INLINE void dict_table_x_lock_indexes(dict_table_t *table)
UNIV_INLINE void dict_table_set_format(dict_table_t *table, ulint format)
UNIV_INTERN const char * dict_table_get_col_name(const dict_table_t *table, ulint col_nr)
Definition dict0dict.cc:371
UNIV_INLINE ulint dict_index_get_nth_col_no(const dict_index_t *index, ulint pos)
UNIV_INTERN ibool dict_table_col_in_clustered_key(const dict_table_t *table, ulint n)
Definition dict0dict.cc:666
UNIV_INTERN dict_table_t * dict_table_get_on_id(table_id_t table_id, trx_t *trx)
Definition dict0dict.cc:620
UNIV_INLINE ulint dict_table_zip_size(const dict_table_t *table)
const char * dict_remove_db_name(const char *name)
Definition dict0dict.cc:222
UNIV_INTERN ibool dict_tables_have_same_db(const char *name1, const char *name2)
Definition dict0dict.cc:201
UNIV_INTERN void dict_table_print_low(dict_table_t *table)
UNIV_INLINE ulint dict_index_get_n_unique(const dict_index_t *index)
UNIV_INLINE ulint dict_index_is_sec_or_ibuf(const dict_index_t *index) __attribute__((pure))
UNIV_INTERN void dict_table_stats_lock(const dict_table_t *table, ulint latch_mode)
Definition dict0dict.cc:291
UNIV_INTERN void dict_update_statistics(dict_table_t *table, ibool only_calc_if_missing_stats)
UNIV_INTERN void dict_index_name_print(FILE *file, trx_t *trx, const dict_index_t *index)
UNIV_INLINE ulint dict_index_is_unique(const dict_index_t *index) __attribute__((pure))
UNIV_INLINE ulint dict_index_get_space_reserve(void)
UNIV_INLINE void dict_index_set_page(dict_index_t *index, ulint page)
UNIV_INTERN dtuple_t * dict_index_build_data_tuple(dict_index_t *index, rec_t *rec, ulint n_fields, mem_heap_t *heap)
UNIV_INLINE ulint dict_index_get_space(const dict_index_t *index)
UNIV_INTERN ibool dict_table_rename_in_cache(dict_table_t *table, const char *new_name, ibool rename_also_foreigns)
Definition dict0dict.cc:952
UNIV_INLINE const dict_col_t * dict_index_get_nth_col(const dict_index_t *index, ulint pos)
UNIV_INTERN dict_index_t * dict_index_get_if_in_cache_low(index_id_t index_id)
UNIV_INLINE ulint dict_col_get_fixed_size(const dict_col_t *col, ulint comp)
UNIV_INLINE ulint dict_index_get_min_size(const dict_index_t *index)
UNIV_INLINE rw_lock_t * dict_index_get_lock(dict_index_t *index)
UNIV_INTERN void dict_table_change_id_in_cache(dict_table_t *table, table_id_t new_id)
UNIV_INLINE ulint dict_col_get_clust_pos(const dict_col_t *col, const dict_index_t *clust_index)
UNIV_INTERN ulint dict_index_calc_min_rec_len(const dict_index_t *index)
UNIV_INLINE dict_table_t * dict_table_check_if_in_cache_low(const char *table_name)
UNIV_INLINE ulint dict_table_flags_to_zip_size(ulint flags) __attribute__((const))
UNIV_INTERN ulint dict_create_foreign_constraints(trx_t *trx, const char *sql_string, size_t sql_length, const char *name, ibool reject_fks)
UNIV_INTERN ib_uint64_t dict_table_autoinc_read(const dict_table_t *table)
Definition dict0dict.cc:425
UNIV_INTERN dict_index_t * dict_index_get_on_id_low(dict_table_t *table, index_id_t index_id)
Definition dict0dict.cc:470
UNIV_INTERN void dict_table_remove_from_cache(dict_table_t *table)
UNIV_INLINE ulint dict_index_get_page(const dict_index_t *tree)
UNIV_INTERN dict_index_t * dict_table_get_index_on_name_and_min_id(dict_table_t *table, const char *name)
UNIV_INTERN void dict_casedn_str(char *a)
Definition dict0dict.cc:189
UNIV_INLINE ulint dict_index_is_clust(const dict_index_t *index) __attribute__((pure))
UNIV_INTERN dict_index_t * dict_table_get_index_on_name(dict_table_t *table, const char *name)
UNIV_INTERN void dict_print_info_on_foreign_keys(ibool create_table_format, FILE *file, trx_t *trx, dict_table_t *table)
UNIV_INTERN dict_index_t * dict_foreign_find_equiv_index(dict_foreign_t *foreign)
UNIV_INTERN void dict_table_print_by_name(const char *name)
UNIV_INTERN ibool dict_table_is_referenced_by_foreign_key(const dict_table_t *table)
UNIV_INLINE void dict_table_x_unlock_indexes(dict_table_t *table)
UNIV_INTERN void dict_table_replace_index_in_foreign_list(dict_table_t *table, dict_index_t *index, const trx_t *trx)
UNIV_INTERN ulint dict_foreign_parse_drop_constraints(mem_heap_t *heap, trx_t *trx, dict_table_t *table, ulint *n, const char ***constraints_to_drop)
UNIV_INTERN void dict_init(void)
Definition dict0dict.cc:701
UNIV_INLINE dict_table_t * dict_table_get_low(const char *table_name)
UNIV_INTERN dict_table_t * dict_table_get(const char *table_name, ibool inc_mysql_count)
Definition dict0dict.cc:743
UNIV_INTERN void dict_table_autoinc_unlock(dict_table_t *table)
Definition dict0dict.cc:457
UNIV_INTERN ulint dict_index_get_nth_col_pos(const dict_index_t *index, ulint n)
Definition dict0dict.cc:499
UNIV_INTERN dict_index_t * dict_index_find_on_id_low(index_id_t id)
Definition dict0dict.cc:919
UNIV_INTERN dtuple_t * dict_index_build_node_ptr(const dict_index_t *index, const rec_t *rec, ulint page_no, mem_heap_t *heap, ulint level)
UNIV_INTERN ulint dict_get_db_name_len(const char *name)
Definition dict0dict.cc:243
UNIV_INTERN dict_foreign_t * dict_table_get_referenced_constraint(dict_table_t *table, dict_index_t *index)
UNIV_INTERN void dict_table_stats_unlock(const dict_table_t *table, ulint latch_mode)
Definition dict0dict.cc:318
UNIV_INTERN ulint dict_index_get_nth_field_pos(const dict_index_t *index, const dict_index_t *index2, ulint n)
Definition dict0dict.cc:582
UNIV_INLINE ulint dict_col_get_sql_null_size(const dict_col_t *col, ulint comp)
UNIV_INLINE dict_table_t * dict_table_get_low_ignore_err(const char *table_name, dict_err_ignore_t ignore_err)
dict_index_t * dict_ind_redundant
Definition dict0dict.cc:33
UNIV_INLINE dict_table_t * dict_table_get_on_id_low(table_id_t table_id)
UNIV_INTERN ibool dict_index_contains_col_or_prefix(const dict_index_t *index, ulint n)
Definition dict0dict.cc:539
UNIV_INTERN void dict_index_remove_from_cache(dict_table_t *table, dict_index_t *index)
UNIV_INLINE void dict_col_set_mbminmaxlen(dict_col_t *col, ulint mbminlen, ulint mbmaxlen)
UNIV_INTERN void dict_table_add_system_columns(dict_table_t *table, mem_heap_t *heap)
Definition dict0dict.cc:777
UNIV_INLINE const dict_col_t * dict_field_get_col(const dict_field_t *field)
UNIV_INTERN void dict_print_info_on_foreign_key_in_create_format(FILE *file, trx_t *trx, dict_foreign_t *foreign, ibool add_newline)
UNIV_INLINE ulint dict_table_get_sys_col_no(const dict_table_t *table, ulint sys)
UNIV_INLINE ulint dict_col_get_max_size(const dict_col_t *col)
UNIV_INLINE ulint dict_index_get_n_fields(const dict_index_t *index)
UNIV_INLINE ulint dict_table_get_n_user_cols(const dict_table_t *table)
UNIV_INTERN rec_t * dict_index_copy_rec_order_prefix(const dict_index_t *index, const rec_t *rec, ulint *n_fields, byte **buf, ulint *buf_size)
UNIV_INTERN void dict_table_autoinc_lock(dict_table_t *table)
Definition dict0dict.cc:398
UNIV_INTERN ulint dict_index_add_to_cache(dict_table_t *table, dict_index_t *index, ulint page_no, ibool strict)
UNIV_INTERN void dict_table_print(dict_table_t *table)
UNIV_INLINE ulint dict_table_get_n_cols(const dict_table_t *table)
UNIV_INTERN void dict_close(void)
UNIV_INLINE ulint dict_index_get_sys_col_pos(const dict_index_t *index, ulint type)
UNIV_INLINE void dict_col_copy_type(const dict_col_t *col, dtype_t *type)
UNIV_INTERN void dict_ind_init(void)
UNIV_INTERN void dict_table_add_to_cache(dict_table_t *table, mem_heap_t *heap)
Definition dict0dict.cc:824
UNIV_INTERN void dict_table_autoinc_initialize(dict_table_t *table, ib_uint64_t value)
Definition dict0dict.cc:409
UNIV_INTERN ulint dict_foreign_add_to_cache(dict_foreign_t *foreign, ibool check_charsets)
UNIV_INTERN void dict_mutex_exit_for_mysql(void)
Definition dict0dict.cc:274
UNIV_INLINE ulint dict_col_get_no(const dict_col_t *col)
UNIV_INLINE ulint dict_index_get_n_ordering_defined_by_user(const dict_index_t *index)
UNIV_INLINE ulint dict_table_get_format(const dict_table_t *table)
UNIV_INTERN dict_index_t * dict_table_get_index_by_max_id(dict_table_t *table, const char *name, const char **columns, ulint n_cols)
UNIV_INLINE ulint dict_col_get_min_size(const dict_col_t *col)
UNIV_INTERN void dict_index_add_col(dict_index_t *index, const dict_table_t *table, dict_col_t *col, ulint prefix_len)
UNIV_INLINE ulint dict_table_get_n_sys_cols(const dict_table_t *table)
UNIV_INTERN void dict_mutex_enter_for_mysql(void)
Definition dict0dict.cc:264
UNIV_INTERN ulint dict_table_get_nth_col_pos(const dict_table_t *table, ulint n)
Definition dict0dict.cc:651
UNIV_INTERN ibool dict_col_name_is_reserved(const char *name)
dict_index_t * dict_ind_compact
Definition dict0dict.cc:35
UNIV_INTERN dict_foreign_t * dict_table_get_foreign_constraint(dict_table_t *table, dict_index_t *index)
UNIV_INLINE ulint dict_col_get_mbminlen(const dict_col_t *col)
UNIV_INTERN void dict_table_decrement_handle_count(dict_table_t *table, ibool dict_locked)
Definition dict0dict.cc:345
UNIV_INLINE ulint dict_index_get_n_unique_in_tree(const dict_index_t *index)
UNIV_INLINE void dict_index_set_space(dict_index_t *index, ulint space)
UNIV_INTERN void dict_table_autoinc_update_if_greater(dict_table_t *table, ib_uint64_t value)
Definition dict0dict.cc:439
UNIV_INTERN void dict_table_copy_types(dtuple_t *tuple, const dict_table_t *table)
UNIV_INLINE ulint dict_col_get_mbmaxlen(const dict_col_t *col)
UNIV_INTERN void dict_load_space_id_list(void)
UNIV_INLINE ulint dict_index_is_ibuf(const dict_index_t *index) __attribute__((pure))
UNIV_INTERN void dict_index_copy_types(dtuple_t *tuple, const dict_index_t *index, ulint n_fields)
UNIV_INLINE ibool dict_table_is_comp(const dict_table_t *table)
hash_table_t * table_hash
Definition dict0dict.h:1183
row_id_t row_id
Definition dict0dict.h:1177
dict_table_t * sys_indexes
Definition dict0dict.h:1194
hash_table_t * table_id_hash
Definition dict0dict.h:1185
dict_table_t * sys_fields
Definition dict0dict.h:1195
dict_table_t * sys_tables
Definition dict0dict.h:1192
dict_table_t * sys_columns
Definition dict0dict.h:1193
#define mutex_t
Definition sync0types.h:31
ib_id_t row_id_t
Definition trx0types.h:83
#define UT_LIST_BASE_NODE_T(TYPE)
Definition ut0lst.h:54