Drizzled Public API Documentation

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