~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/dict0dict.h

  • Committer: Jay Pipes
  • Date: 2009-09-21 14:33:44 UTC
  • mfrom: (1126.10.26 dtrace-probes)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: jpipes@serialcoder-20090921143344-jnarp7gcn6zmg19c
Merge fixes from Trond and Padraig on dtrace probes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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., 59 Temple
15
 
Place, Suite 330, Boston, MA 02111-1307 USA
16
 
 
17
 
*****************************************************************************/
18
 
 
19
 
/**************************************************//**
20
 
@file include/dict0dict.h
21
 
Data dictionary system
22
 
 
23
 
Created 1/8/1996 Heikki Tuuri
24
 
*******************************************************/
25
 
 
26
 
#ifndef dict0dict_h
27
 
#define dict0dict_h
28
 
 
29
 
#include "univ.i"
30
 
#include "dict0types.h"
31
 
#include "dict0mem.h"
32
 
#include "data0type.h"
33
 
#include "data0data.h"
34
 
#include "mem0mem.h"
35
 
#include "rem0types.h"
36
 
#include "ut0mem.h"
37
 
#include "ut0lst.h"
38
 
#include "hash0hash.h"
39
 
#include "ut0rnd.h"
40
 
#include "ut0byte.h"
41
 
#include "trx0types.h"
42
 
 
43
 
#ifndef UNIV_HOTBACKUP
44
 
# include "sync0sync.h"
45
 
# include "sync0rw.h"
46
 
/******************************************************************//**
47
 
Makes all characters in a NUL-terminated UTF-8 string lower case. */
48
 
UNIV_INTERN
49
 
void
50
 
dict_casedn_str(
51
 
/*============*/
52
 
        char*   a);     /*!< in/out: string to put in lower case */
53
 
/********************************************************************//**
54
 
Get the database name length in a table name.
55
 
@return database name length */
56
 
UNIV_INTERN
57
 
ulint
58
 
dict_get_db_name_len(
59
 
/*=================*/
60
 
        const char*     name);  /*!< in: table name in the form
61
 
                                dbname '/' tablename */
62
 
/********************************************************************//**
63
 
Return the end of table name where we have removed dbname and '/'.
64
 
@return table name */
65
 
 
66
 
const char*
67
 
dict_remove_db_name(
68
 
/*================*/
69
 
        const char*     name);  /*!< in: table name in the form
70
 
                                dbname '/' tablename */
71
 
/**********************************************************************//**
72
 
Returns a table object based on table id.
73
 
@return table, NULL if does not exist */
74
 
UNIV_INTERN
75
 
dict_table_t*
76
 
dict_table_get_on_id(
77
 
/*=================*/
78
 
        dulint  table_id,       /*!< in: table id */
79
 
        trx_t*  trx);           /*!< in: transaction handle */
80
 
/********************************************************************//**
81
 
Decrements the count of open MySQL handles to a table. */
82
 
UNIV_INTERN
83
 
void
84
 
dict_table_decrement_handle_count(
85
 
/*==============================*/
86
 
        dict_table_t*   table,          /*!< in/out: table */
87
 
        ibool           dict_locked);   /*!< in: TRUE=data dictionary locked */
88
 
/**********************************************************************//**
89
 
Inits the data dictionary module. */
90
 
UNIV_INTERN
91
 
void
92
 
dict_init(void);
93
 
/*===========*/
94
 
/********************************************************************//**
95
 
Gets the space id of every table of the data dictionary and makes a linear
96
 
list and a hash table of them to the data dictionary cache. This function
97
 
can be called at database startup if we did not need to do a crash recovery.
98
 
In crash recovery we must scan the space id's from the .ibd files in MySQL
99
 
database directories. */
100
 
UNIV_INTERN
101
 
void
102
 
dict_load_space_id_list(void);
103
 
/*=========================*/
104
 
/*********************************************************************//**
105
 
Gets the column data type. */
106
 
UNIV_INLINE
107
 
void
108
 
dict_col_copy_type(
109
 
/*===============*/
110
 
        const dict_col_t*       col,    /*!< in: column */
111
 
        dtype_t*                type);  /*!< out: data type */
112
 
#endif /* !UNIV_HOTBACKUP */
113
 
#ifdef UNIV_DEBUG
114
 
/*********************************************************************//**
115
 
Assert that a column and a data type match.
116
 
@return TRUE */
117
 
UNIV_INLINE
118
 
ibool
119
 
dict_col_type_assert_equal(
120
 
/*=======================*/
121
 
        const dict_col_t*       col,    /*!< in: column */
122
 
        const dtype_t*          type);  /*!< in: data type */
123
 
#endif /* UNIV_DEBUG */
124
 
#ifndef UNIV_HOTBACKUP
125
 
/***********************************************************************//**
126
 
Returns the minimum size of the column.
127
 
@return minimum size */
128
 
UNIV_INLINE
129
 
ulint
130
 
dict_col_get_min_size(
131
 
/*==================*/
132
 
        const dict_col_t*       col);   /*!< in: column */
133
 
/***********************************************************************//**
134
 
Returns the maximum size of the column.
135
 
@return maximum size */
136
 
UNIV_INLINE
137
 
ulint
138
 
dict_col_get_max_size(
139
 
/*==================*/
140
 
        const dict_col_t*       col);   /*!< in: column */
141
 
/***********************************************************************//**
142
 
Returns the size of a fixed size column, 0 if not a fixed size column.
143
 
@return fixed size, or 0 */
144
 
UNIV_INLINE
145
 
ulint
146
 
dict_col_get_fixed_size(
147
 
/*====================*/
148
 
        const dict_col_t*       col,    /*!< in: column */
149
 
        ulint                   comp);  /*!< in: nonzero=ROW_FORMAT=COMPACT  */
150
 
/***********************************************************************//**
151
 
Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a column.
152
 
For fixed length types it is the fixed length of the type, otherwise 0.
153
 
@return SQL null storage size in ROW_FORMAT=REDUNDANT */
154
 
UNIV_INLINE
155
 
ulint
156
 
dict_col_get_sql_null_size(
157
 
/*=======================*/
158
 
        const dict_col_t*       col,    /*!< in: column */
159
 
        ulint                   comp);  /*!< in: nonzero=ROW_FORMAT=COMPACT  */
160
 
 
161
 
/*********************************************************************//**
162
 
Gets the column number.
163
 
@return col->ind, table column position (starting from 0) */
164
 
UNIV_INLINE
165
 
ulint
166
 
dict_col_get_no(
167
 
/*============*/
168
 
        const dict_col_t*       col);   /*!< in: column */
169
 
/*********************************************************************//**
170
 
Gets the column position in the clustered index. */
171
 
UNIV_INLINE
172
 
ulint
173
 
dict_col_get_clust_pos(
174
 
/*===================*/
175
 
        const dict_col_t*       col,            /*!< in: table column */
176
 
        const dict_index_t*     clust_index);   /*!< in: clustered index */
177
 
/****************************************************************//**
178
 
If the given column name is reserved for InnoDB system columns, return
179
 
TRUE.
180
 
@return TRUE if name is reserved */
181
 
UNIV_INTERN
182
 
ibool
183
 
dict_col_name_is_reserved(
184
 
/*======================*/
185
 
        const char*     name);  /*!< in: column name */
186
 
/********************************************************************//**
187
 
Acquire the autoinc lock. */
188
 
UNIV_INTERN
189
 
void
190
 
dict_table_autoinc_lock(
191
 
/*====================*/
192
 
        dict_table_t*   table); /*!< in/out: table */
193
 
/********************************************************************//**
194
 
Unconditionally set the autoinc counter. */
195
 
UNIV_INTERN
196
 
void
197
 
dict_table_autoinc_initialize(
198
 
/*==========================*/
199
 
        dict_table_t*   table,  /*!< in/out: table */
200
 
        ib_uint64_t     value); /*!< in: next value to assign to a row */
201
 
/********************************************************************//**
202
 
Reads the next autoinc value (== autoinc counter value), 0 if not yet
203
 
initialized.
204
 
@return value for a new row, or 0 */
205
 
UNIV_INTERN
206
 
ib_uint64_t
207
 
dict_table_autoinc_read(
208
 
/*====================*/
209
 
        const dict_table_t*     table); /*!< in: table */
210
 
/********************************************************************//**
211
 
Updates the autoinc counter if the value supplied is greater than the
212
 
current value. */
213
 
UNIV_INTERN
214
 
void
215
 
dict_table_autoinc_update_if_greater(
216
 
/*=================================*/
217
 
 
218
 
        dict_table_t*   table,  /*!< in/out: table */
219
 
        ib_uint64_t     value); /*!< in: value which was assigned to a row */
220
 
/********************************************************************//**
221
 
Release the autoinc lock. */
222
 
UNIV_INTERN
223
 
void
224
 
dict_table_autoinc_unlock(
225
 
/*======================*/
226
 
        dict_table_t*   table); /*!< in/out: table */
227
 
#endif /* !UNIV_HOTBACKUP */
228
 
/**********************************************************************//**
229
 
Adds system columns to a table object. */
230
 
UNIV_INTERN
231
 
void
232
 
dict_table_add_system_columns(
233
 
/*==========================*/
234
 
        dict_table_t*   table,  /*!< in/out: table */
235
 
        mem_heap_t*     heap);  /*!< in: temporary heap */
236
 
#ifndef UNIV_HOTBACKUP
237
 
/**********************************************************************//**
238
 
Adds a table object to the dictionary cache. */
239
 
UNIV_INTERN
240
 
void
241
 
dict_table_add_to_cache(
242
 
/*====================*/
243
 
        dict_table_t*   table,  /*!< in: table */
244
 
        mem_heap_t*     heap);  /*!< in: temporary heap */
245
 
/**********************************************************************//**
246
 
Removes a table object from the dictionary cache. */
247
 
UNIV_INTERN
248
 
void
249
 
dict_table_remove_from_cache(
250
 
/*=========================*/
251
 
        dict_table_t*   table); /*!< in, own: table */
252
 
/**********************************************************************//**
253
 
Renames a table object.
254
 
@return TRUE if success */
255
 
UNIV_INTERN
256
 
ibool
257
 
dict_table_rename_in_cache(
258
 
/*=======================*/
259
 
        dict_table_t*   table,          /*!< in/out: table */
260
 
        const char*     new_name,       /*!< in: new name */
261
 
        ibool           rename_also_foreigns);/*!< in: in ALTER TABLE we want
262
 
                                        to preserve the original table name
263
 
                                        in constraints which reference it */
264
 
/**********************************************************************//**
265
 
Change the id of a table object in the dictionary cache. This is used in
266
 
DISCARD TABLESPACE. */
267
 
UNIV_INTERN
268
 
void
269
 
dict_table_change_id_in_cache(
270
 
/*==========================*/
271
 
        dict_table_t*   table,  /*!< in/out: table object already in cache */
272
 
        dulint          new_id);/*!< in: new id to set */
273
 
/**********************************************************************//**
274
 
Adds a foreign key constraint object to the dictionary cache. May free
275
 
the object if there already is an object with the same identifier in.
276
 
At least one of foreign table or referenced table must already be in
277
 
the dictionary cache!
278
 
@return DB_SUCCESS or error code */
279
 
UNIV_INTERN
280
 
ulint
281
 
dict_foreign_add_to_cache(
282
 
/*======================*/
283
 
        dict_foreign_t* foreign,        /*!< in, own: foreign key constraint */
284
 
        ibool           check_charsets);/*!< in: TRUE=check charset
285
 
                                        compatibility */
286
 
/*********************************************************************//**
287
 
Check if the index is referenced by a foreign key, if TRUE return the
288
 
matching instance NULL otherwise.
289
 
@return pointer to foreign key struct if index is defined for foreign
290
 
key, otherwise NULL */
291
 
UNIV_INTERN
292
 
dict_foreign_t*
293
 
dict_table_get_referenced_constraint(
294
 
/*=================================*/
295
 
        dict_table_t*   table,  /*!< in: InnoDB table */
296
 
        dict_index_t*   index); /*!< in: InnoDB index */
297
 
/*********************************************************************//**
298
 
Checks if a table is referenced by foreign keys.
299
 
@return TRUE if table is referenced by a foreign key */
300
 
UNIV_INTERN
301
 
ibool
302
 
dict_table_is_referenced_by_foreign_key(
303
 
/*====================================*/
304
 
        const dict_table_t*     table); /*!< in: InnoDB table */
305
 
/**********************************************************************//**
306
 
Replace the index in the foreign key list that matches this index's
307
 
definition with an equivalent index. */
308
 
UNIV_INTERN
309
 
void
310
 
dict_table_replace_index_in_foreign_list(
311
 
/*=====================================*/
312
 
        dict_table_t*   table,  /*!< in/out: table */
313
 
        dict_index_t*   index); /*!< in: index to be replaced */
314
 
/*********************************************************************//**
315
 
Checks if a index is defined for a foreign key constraint. Index is a part
316
 
of a foreign key constraint if the index is referenced by foreign key
317
 
or index is a foreign key index
318
 
@return pointer to foreign key struct if index is defined for foreign
319
 
key, otherwise NULL */
320
 
UNIV_INTERN
321
 
dict_foreign_t*
322
 
dict_table_get_foreign_constraint(
323
 
/*==============================*/
324
 
        dict_table_t*   table,  /*!< in: InnoDB table */
325
 
        dict_index_t*   index); /*!< in: InnoDB index */
326
 
/*********************************************************************//**
327
 
Scans a table create SQL string and adds to the data dictionary
328
 
the foreign key constraints declared in the string. This function
329
 
should be called after the indexes for a table have been created.
330
 
Each foreign key constraint must be accompanied with indexes in
331
 
bot participating tables. The indexes are allowed to contain more
332
 
fields than mentioned in the constraint.
333
 
@return error code or DB_SUCCESS */
334
 
UNIV_INTERN
335
 
ulint
336
 
dict_create_foreign_constraints(
337
 
/*============================*/
338
 
        trx_t*          trx,            /*!< in: transaction */
339
 
        const char*     sql_string,     /*!< in: table create statement where
340
 
                                        foreign keys are declared like:
341
 
                                        FOREIGN KEY (a, b) REFERENCES
342
 
                                        table2(c, d), table2 can be written
343
 
                                        also with the database
344
 
                                        name before it: test.table2; the
345
 
                                        default database id the database of
346
 
                                        parameter name */
347
 
        const char*     name,           /*!< in: table full name in the
348
 
                                        normalized form
349
 
                                        database_name/table_name */
350
 
        ibool           reject_fks);    /*!< in: if TRUE, fail with error
351
 
                                        code DB_CANNOT_ADD_CONSTRAINT if
352
 
                                        any foreign keys are found. */
353
 
/**********************************************************************//**
354
 
Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement.
355
 
@return DB_SUCCESS or DB_CANNOT_DROP_CONSTRAINT if syntax error or the
356
 
constraint id does not match */
357
 
UNIV_INTERN
358
 
ulint
359
 
dict_foreign_parse_drop_constraints(
360
 
/*================================*/
361
 
        mem_heap_t*     heap,                   /*!< in: heap from which we can
362
 
                                                allocate memory */
363
 
        trx_t*          trx,                    /*!< in: transaction */
364
 
        dict_table_t*   table,                  /*!< in: table */
365
 
        ulint*          n,                      /*!< out: number of constraints
366
 
                                                to drop */
367
 
        const char***   constraints_to_drop);   /*!< out: id's of the
368
 
                                                constraints to drop */
369
 
/**********************************************************************//**
370
 
Returns a table object and optionally increment its MySQL open handle count.
371
 
NOTE! This is a high-level function to be used mainly from outside the
372
 
'dict' directory. Inside this directory dict_table_get_low is usually the
373
 
appropriate function.
374
 
@return table, NULL if does not exist */
375
 
UNIV_INTERN
376
 
dict_table_t*
377
 
dict_table_get(
378
 
/*===========*/
379
 
        const char*     table_name,     /*!< in: table name */
380
 
        ibool           inc_mysql_count);
381
 
                                        /*!< in: whether to increment the open
382
 
                                        handle count on the table */
383
 
/**********************************************************************//**
384
 
Returns a index object, based on table and index id, and memoryfixes it.
385
 
@return index, NULL if does not exist */
386
 
UNIV_INTERN
387
 
dict_index_t*
388
 
dict_index_get_on_id_low(
389
 
/*=====================*/
390
 
        dict_table_t*   table,          /*!< in: table */
391
 
        dulint          index_id);      /*!< in: index id */
392
 
/**********************************************************************//**
393
 
Checks if a table is in the dictionary cache.
394
 
@return table, NULL if not found */
395
 
 
396
 
UNIV_INLINE
397
 
dict_table_t*
398
 
dict_table_check_if_in_cache_low(
399
 
/*=============================*/
400
 
        const char*     table_name);    /*!< in: table name */
401
 
/**********************************************************************//**
402
 
Gets a table; loads it to the dictionary cache if necessary. A low-level
403
 
function.
404
 
@return table, NULL if not found */
405
 
UNIV_INLINE
406
 
dict_table_t*
407
 
dict_table_get_low(
408
 
/*===============*/
409
 
        const char*     table_name);    /*!< in: table name */
410
 
/**********************************************************************//**
411
 
Returns a table object based on table id.
412
 
@return table, NULL if does not exist */
413
 
UNIV_INLINE
414
 
dict_table_t*
415
 
dict_table_get_on_id_low(
416
 
/*=====================*/
417
 
        dulint  table_id);      /*!< in: table id */
418
 
/**********************************************************************//**
419
 
Find an index that is equivalent to the one passed in and is not marked
420
 
for deletion.
421
 
@return index equivalent to foreign->foreign_index, or NULL */
422
 
UNIV_INTERN
423
 
dict_index_t*
424
 
dict_foreign_find_equiv_index(
425
 
/*==========================*/
426
 
        dict_foreign_t* foreign);/*!< in: foreign key */
427
 
/**********************************************************************//**
428
 
Returns an index object by matching on the name and column names and
429
 
if more than one index matches return the index with the max id
430
 
@return matching index, NULL if not found */
431
 
UNIV_INTERN
432
 
dict_index_t*
433
 
dict_table_get_index_by_max_id(
434
 
/*===========================*/
435
 
        dict_table_t*   table,  /*!< in: table */
436
 
        const char*     name,   /*!< in: the index name to find */
437
 
        const char**    columns,/*!< in: array of column names */
438
 
        ulint           n_cols);/*!< in: number of columns */
439
 
/**********************************************************************//**
440
 
Returns a column's name.
441
 
@return column name. NOTE: not guaranteed to stay valid if table is
442
 
modified in any way (columns added, etc.). */
443
 
UNIV_INTERN
444
 
const char*
445
 
dict_table_get_col_name(
446
 
/*====================*/
447
 
        const dict_table_t*     table,  /*!< in: table */
448
 
        ulint                   col_nr);/*!< in: column number */
449
 
 
450
 
/**********************************************************************//**
451
 
Prints a table definition. */
452
 
UNIV_INTERN
453
 
void
454
 
dict_table_print(
455
 
/*=============*/
456
 
        dict_table_t*   table); /*!< in: table */
457
 
/**********************************************************************//**
458
 
Prints a table data. */
459
 
UNIV_INTERN
460
 
void
461
 
dict_table_print_low(
462
 
/*=================*/
463
 
        dict_table_t*   table); /*!< in: table */
464
 
/**********************************************************************//**
465
 
Prints a table data when we know the table name. */
466
 
UNIV_INTERN
467
 
void
468
 
dict_table_print_by_name(
469
 
/*=====================*/
470
 
        const char*     name);  /*!< in: table name */
471
 
/**********************************************************************//**
472
 
Outputs info on foreign keys of a table. */
473
 
UNIV_INTERN
474
 
void
475
 
dict_print_info_on_foreign_keys(
476
 
/*============================*/
477
 
        ibool           create_table_format, /*!< in: if TRUE then print in
478
 
                                a format suitable to be inserted into
479
 
                                a CREATE TABLE, otherwise in the format
480
 
                                of SHOW TABLE STATUS */
481
 
        FILE*           file,   /*!< in: file where to print */
482
 
        trx_t*          trx,    /*!< in: transaction */
483
 
        dict_table_t*   table); /*!< in: table */
484
 
/**********************************************************************//**
485
 
Outputs info on a foreign key of a table in a format suitable for
486
 
CREATE TABLE. */
487
 
UNIV_INTERN
488
 
void
489
 
dict_print_info_on_foreign_key_in_create_format(
490
 
/*============================================*/
491
 
        FILE*           file,           /*!< in: file where to print */
492
 
        trx_t*          trx,            /*!< in: transaction */
493
 
        dict_foreign_t* foreign,        /*!< in: foreign key constraint */
494
 
        ibool           add_newline);   /*!< in: whether to add a newline */
495
 
/********************************************************************//**
496
 
Displays the names of the index and the table. */
497
 
UNIV_INTERN
498
 
void
499
 
dict_index_name_print(
500
 
/*==================*/
501
 
        FILE*                   file,   /*!< in: output stream */
502
 
        trx_t*                  trx,    /*!< in: transaction */
503
 
        const dict_index_t*     index); /*!< in: index to print */
504
 
#ifdef UNIV_DEBUG
505
 
/********************************************************************//**
506
 
Gets the first index on the table (the clustered index).
507
 
@return index, NULL if none exists */
508
 
UNIV_INLINE
509
 
dict_index_t*
510
 
dict_table_get_first_index(
511
 
/*=======================*/
512
 
        const dict_table_t*     table); /*!< in: table */
513
 
/********************************************************************//**
514
 
Gets the next index on the table.
515
 
@return index, NULL if none left */
516
 
UNIV_INLINE
517
 
dict_index_t*
518
 
dict_table_get_next_index(
519
 
/*======================*/
520
 
        const dict_index_t*     index); /*!< in: index */
521
 
#else /* UNIV_DEBUG */
522
 
# define dict_table_get_first_index(table) UT_LIST_GET_FIRST((table)->indexes)
523
 
# define dict_table_get_next_index(index) UT_LIST_GET_NEXT(indexes, index)
524
 
#endif /* UNIV_DEBUG */
525
 
#endif /* !UNIV_HOTBACKUP */
526
 
/********************************************************************//**
527
 
Check whether the index is the clustered index.
528
 
@return nonzero for clustered index, zero for other indexes */
529
 
UNIV_INLINE
530
 
ulint
531
 
dict_index_is_clust(
532
 
/*================*/
533
 
        const dict_index_t*     index)  /*!< in: index */
534
 
        __attribute__((pure));
535
 
/********************************************************************//**
536
 
Check whether the index is unique.
537
 
@return nonzero for unique index, zero for other indexes */
538
 
UNIV_INLINE
539
 
ulint
540
 
dict_index_is_unique(
541
 
/*=================*/
542
 
        const dict_index_t*     index)  /*!< in: index */
543
 
        __attribute__((pure));
544
 
/********************************************************************//**
545
 
Check whether the index is the insert buffer tree.
546
 
@return nonzero for insert buffer, zero for other indexes */
547
 
UNIV_INLINE
548
 
ulint
549
 
dict_index_is_ibuf(
550
 
/*===============*/
551
 
        const dict_index_t*     index)  /*!< in: index */
552
 
        __attribute__((pure));
553
 
/********************************************************************//**
554
 
Check whether the index is a secondary index or the insert buffer tree.
555
 
@return nonzero for insert buffer, zero for other indexes */
556
 
UNIV_INLINE
557
 
ulint
558
 
dict_index_is_sec_or_ibuf(
559
 
/*======================*/
560
 
        const dict_index_t*     index)  /*!< in: index */
561
 
        __attribute__((pure));
562
 
 
563
 
/********************************************************************//**
564
 
Gets the number of user-defined columns in a table in the dictionary
565
 
cache.
566
 
@return number of user-defined (e.g., not ROW_ID) columns of a table */
567
 
UNIV_INLINE
568
 
ulint
569
 
dict_table_get_n_user_cols(
570
 
/*=======================*/
571
 
        const dict_table_t*     table); /*!< in: table */
572
 
/********************************************************************//**
573
 
Gets the number of system columns in a table in the dictionary cache.
574
 
@return number of system (e.g., ROW_ID) columns of a table */
575
 
UNIV_INLINE
576
 
ulint
577
 
dict_table_get_n_sys_cols(
578
 
/*======================*/
579
 
        const dict_table_t*     table); /*!< in: table */
580
 
/********************************************************************//**
581
 
Gets the number of all columns (also system) in a table in the dictionary
582
 
cache.
583
 
@return number of columns of a table */
584
 
UNIV_INLINE
585
 
ulint
586
 
dict_table_get_n_cols(
587
 
/*==================*/
588
 
        const dict_table_t*     table); /*!< in: table */
589
 
#ifdef UNIV_DEBUG
590
 
/********************************************************************//**
591
 
Gets the nth column of a table.
592
 
@return pointer to column object */
593
 
UNIV_INLINE
594
 
dict_col_t*
595
 
dict_table_get_nth_col(
596
 
/*===================*/
597
 
        const dict_table_t*     table,  /*!< in: table */
598
 
        ulint                   pos);   /*!< in: position of column */
599
 
/********************************************************************//**
600
 
Gets the given system column of a table.
601
 
@return pointer to column object */
602
 
UNIV_INLINE
603
 
dict_col_t*
604
 
dict_table_get_sys_col(
605
 
/*===================*/
606
 
        const dict_table_t*     table,  /*!< in: table */
607
 
        ulint                   sys);   /*!< in: DATA_ROW_ID, ... */
608
 
#else /* UNIV_DEBUG */
609
 
#define dict_table_get_nth_col(table, pos) \
610
 
((table)->cols + (pos))
611
 
#define dict_table_get_sys_col(table, sys) \
612
 
((table)->cols + (table)->n_cols + (sys) - DATA_N_SYS_COLS)
613
 
#endif /* UNIV_DEBUG */
614
 
/********************************************************************//**
615
 
Gets the given system column number of a table.
616
 
@return column number */
617
 
UNIV_INLINE
618
 
ulint
619
 
dict_table_get_sys_col_no(
620
 
/*======================*/
621
 
        const dict_table_t*     table,  /*!< in: table */
622
 
        ulint                   sys);   /*!< in: DATA_ROW_ID, ... */
623
 
#ifndef UNIV_HOTBACKUP
624
 
/********************************************************************//**
625
 
Returns the minimum data size of an index record.
626
 
@return minimum data size in bytes */
627
 
UNIV_INLINE
628
 
ulint
629
 
dict_index_get_min_size(
630
 
/*====================*/
631
 
        const dict_index_t*     index); /*!< in: index */
632
 
#endif /* !UNIV_HOTBACKUP */
633
 
/********************************************************************//**
634
 
Check whether the table uses the compact page format.
635
 
@return TRUE if table uses the compact page format */
636
 
UNIV_INLINE
637
 
ibool
638
 
dict_table_is_comp(
639
 
/*===============*/
640
 
        const dict_table_t*     table); /*!< in: table */
641
 
/********************************************************************//**
642
 
Determine the file format of a table.
643
 
@return file format version */
644
 
UNIV_INLINE
645
 
ulint
646
 
dict_table_get_format(
647
 
/*==================*/
648
 
        const dict_table_t*     table); /*!< in: table */
649
 
/********************************************************************//**
650
 
Set the file format of a table. */
651
 
UNIV_INLINE
652
 
void
653
 
dict_table_set_format(
654
 
/*==================*/
655
 
        dict_table_t*   table,  /*!< in/out: table */
656
 
        ulint           format);/*!< in: file format version */
657
 
/********************************************************************//**
658
 
Extract the compressed page size from table flags.
659
 
@return compressed page size, or 0 if not compressed */
660
 
UNIV_INLINE
661
 
ulint
662
 
dict_table_flags_to_zip_size(
663
 
/*=========================*/
664
 
        ulint   flags)  /*!< in: flags */
665
 
        __attribute__((const));
666
 
/********************************************************************//**
667
 
Check whether the table uses the compressed compact page format.
668
 
@return compressed page size, or 0 if not compressed */
669
 
UNIV_INLINE
670
 
ulint
671
 
dict_table_zip_size(
672
 
/*================*/
673
 
        const dict_table_t*     table); /*!< in: table */
674
 
/********************************************************************//**
675
 
Checks if a column is in the ordering columns of the clustered index of a
676
 
table. Column prefixes are treated like whole columns.
677
 
@return TRUE if the column, or its prefix, is in the clustered key */
678
 
UNIV_INTERN
679
 
ibool
680
 
dict_table_col_in_clustered_key(
681
 
/*============================*/
682
 
        const dict_table_t*     table,  /*!< in: table */
683
 
        ulint                   n);     /*!< in: column number */
684
 
#ifndef UNIV_HOTBACKUP
685
 
/*******************************************************************//**
686
 
Copies types of columns contained in table to tuple and sets all
687
 
fields of the tuple to the SQL NULL value.  This function should
688
 
be called right after dtuple_create(). */
689
 
UNIV_INTERN
690
 
void
691
 
dict_table_copy_types(
692
 
/*==================*/
693
 
        dtuple_t*               tuple,  /*!< in/out: data tuple */
694
 
        const dict_table_t*     table); /*!< in: table */
695
 
/**********************************************************************//**
696
 
Looks for an index with the given id. NOTE that we do not reserve
697
 
the dictionary mutex: this function is for emergency purposes like
698
 
printing info of a corrupt database page!
699
 
@return index or NULL if not found from cache */
700
 
UNIV_INTERN
701
 
dict_index_t*
702
 
dict_index_find_on_id_low(
703
 
/*======================*/
704
 
        dulint  id);    /*!< in: index id */
705
 
/**********************************************************************//**
706
 
Adds an index to the dictionary cache.
707
 
@return DB_SUCCESS or error code */
708
 
UNIV_INTERN
709
 
ulint
710
 
dict_index_add_to_cache(
711
 
/*====================*/
712
 
        dict_table_t*   table,  /*!< in: table on which the index is */
713
 
        dict_index_t*   index,  /*!< in, own: index; NOTE! The index memory
714
 
                                object is freed in this function! */
715
 
        ulint           page_no,/*!< in: root page number of the index */
716
 
        ibool           strict);/*!< in: TRUE=refuse to create the index
717
 
                                if records could be too big to fit in
718
 
                                an B-tree page */
719
 
#endif /* !UNIV_HOTBACKUP */
720
 
/********************************************************************//**
721
 
Gets the number of fields in the internal representation of an index,
722
 
including fields added by the dictionary system.
723
 
@return number of fields */
724
 
UNIV_INLINE
725
 
ulint
726
 
dict_index_get_n_fields(
727
 
/*====================*/
728
 
        const dict_index_t*     index); /*!< in: an internal
729
 
                                        representation of index (in
730
 
                                        the dictionary cache) */
731
 
/********************************************************************//**
732
 
Gets the number of fields in the internal representation of an index
733
 
that uniquely determine the position of an index entry in the index, if
734
 
we do not take multiversioning into account: in the B-tree use the value
735
 
returned by dict_index_get_n_unique_in_tree.
736
 
@return number of fields */
737
 
UNIV_INLINE
738
 
ulint
739
 
dict_index_get_n_unique(
740
 
/*====================*/
741
 
        const dict_index_t*     index); /*!< in: an internal representation
742
 
                                        of index (in the dictionary cache) */
743
 
/********************************************************************//**
744
 
Gets the number of fields in the internal representation of an index
745
 
which uniquely determine the position of an index entry in the index, if
746
 
we also take multiversioning into account.
747
 
@return number of fields */
748
 
UNIV_INLINE
749
 
ulint
750
 
dict_index_get_n_unique_in_tree(
751
 
/*============================*/
752
 
        const dict_index_t*     index); /*!< in: an internal representation
753
 
                                        of index (in the dictionary cache) */
754
 
/********************************************************************//**
755
 
Gets the number of user-defined ordering fields in the index. In the internal
756
 
representation we add the row id to the ordering fields to make all indexes
757
 
unique, but this function returns the number of fields the user defined
758
 
in the index as ordering fields.
759
 
@return number of fields */
760
 
UNIV_INLINE
761
 
ulint
762
 
dict_index_get_n_ordering_defined_by_user(
763
 
/*======================================*/
764
 
        const dict_index_t*     index); /*!< in: an internal representation
765
 
                                        of index (in the dictionary cache) */
766
 
#ifdef UNIV_DEBUG
767
 
/********************************************************************//**
768
 
Gets the nth field of an index.
769
 
@return pointer to field object */
770
 
UNIV_INLINE
771
 
dict_field_t*
772
 
dict_index_get_nth_field(
773
 
/*=====================*/
774
 
        const dict_index_t*     index,  /*!< in: index */
775
 
        ulint                   pos);   /*!< in: position of field */
776
 
#else /* UNIV_DEBUG */
777
 
# define dict_index_get_nth_field(index, pos) ((index)->fields + (pos))
778
 
#endif /* UNIV_DEBUG */
779
 
/********************************************************************//**
780
 
Gets pointer to the nth column in an index.
781
 
@return column */
782
 
UNIV_INLINE
783
 
const dict_col_t*
784
 
dict_index_get_nth_col(
785
 
/*===================*/
786
 
        const dict_index_t*     index,  /*!< in: index */
787
 
        ulint                   pos);   /*!< in: position of the field */
788
 
/********************************************************************//**
789
 
Gets the column number of the nth field in an index.
790
 
@return column number */
791
 
UNIV_INLINE
792
 
ulint
793
 
dict_index_get_nth_col_no(
794
 
/*======================*/
795
 
        const dict_index_t*     index,  /*!< in: index */
796
 
        ulint                   pos);   /*!< in: position of the field */
797
 
/********************************************************************//**
798
 
Looks for column n in an index.
799
 
@return position in internal representation of the index;
800
 
ULINT_UNDEFINED if not contained */
801
 
UNIV_INTERN
802
 
ulint
803
 
dict_index_get_nth_col_pos(
804
 
/*=======================*/
805
 
        const dict_index_t*     index,  /*!< in: index */
806
 
        ulint                   n);     /*!< in: column number */
807
 
/********************************************************************//**
808
 
Returns TRUE if the index contains a column or a prefix of that column.
809
 
@return TRUE if contains the column or its prefix */
810
 
UNIV_INTERN
811
 
ibool
812
 
dict_index_contains_col_or_prefix(
813
 
/*==============================*/
814
 
        const dict_index_t*     index,  /*!< in: index */
815
 
        ulint                   n);     /*!< in: column number */
816
 
/********************************************************************//**
817
 
Looks for a matching field in an index. The column has to be the same. The
818
 
column in index must be complete, or must contain a prefix longer than the
819
 
column in index2. That is, we must be able to construct the prefix in index2
820
 
from the prefix in index.
821
 
@return position in internal representation of the index;
822
 
ULINT_UNDEFINED if not contained */
823
 
UNIV_INTERN
824
 
ulint
825
 
dict_index_get_nth_field_pos(
826
 
/*=========================*/
827
 
        const dict_index_t*     index,  /*!< in: index from which to search */
828
 
        const dict_index_t*     index2, /*!< in: index */
829
 
        ulint                   n);     /*!< in: field number in index2 */
830
 
/********************************************************************//**
831
 
Looks for column n position in the clustered index.
832
 
@return position in internal representation of the clustered index */
833
 
UNIV_INTERN
834
 
ulint
835
 
dict_table_get_nth_col_pos(
836
 
/*=======================*/
837
 
        const dict_table_t*     table,  /*!< in: table */
838
 
        ulint                   n);     /*!< in: column number */
839
 
/********************************************************************//**
840
 
Returns the position of a system column in an index.
841
 
@return position, ULINT_UNDEFINED if not contained */
842
 
UNIV_INLINE
843
 
ulint
844
 
dict_index_get_sys_col_pos(
845
 
/*=======================*/
846
 
        const dict_index_t*     index,  /*!< in: index */
847
 
        ulint                   type);  /*!< in: DATA_ROW_ID, ... */
848
 
/*******************************************************************//**
849
 
Adds a column to index. */
850
 
UNIV_INTERN
851
 
void
852
 
dict_index_add_col(
853
 
/*===============*/
854
 
        dict_index_t*           index,          /*!< in/out: index */
855
 
        const dict_table_t*     table,          /*!< in: table */
856
 
        dict_col_t*             col,            /*!< in: column */
857
 
        ulint                   prefix_len);    /*!< in: column prefix length */
858
 
#ifndef UNIV_HOTBACKUP
859
 
/*******************************************************************//**
860
 
Copies types of fields contained in index to tuple. */
861
 
UNIV_INTERN
862
 
void
863
 
dict_index_copy_types(
864
 
/*==================*/
865
 
        dtuple_t*               tuple,          /*!< in/out: data tuple */
866
 
        const dict_index_t*     index,          /*!< in: index */
867
 
        ulint                   n_fields);      /*!< in: number of
868
 
                                                field types to copy */
869
 
#endif /* !UNIV_HOTBACKUP */
870
 
/*********************************************************************//**
871
 
Gets the field column.
872
 
@return field->col, pointer to the table column */
873
 
UNIV_INLINE
874
 
const dict_col_t*
875
 
dict_field_get_col(
876
 
/*===============*/
877
 
        const dict_field_t*     field); /*!< in: index field */
878
 
#ifndef UNIV_HOTBACKUP
879
 
/**********************************************************************//**
880
 
Returns an index object if it is found in the dictionary cache.
881
 
Assumes that dict_sys->mutex is already being held.
882
 
@return index, NULL if not found */
883
 
UNIV_INTERN
884
 
dict_index_t*
885
 
dict_index_get_if_in_cache_low(
886
 
/*===========================*/
887
 
        dulint  index_id);      /*!< in: index id */
888
 
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
889
 
/**********************************************************************//**
890
 
Returns an index object if it is found in the dictionary cache.
891
 
@return index, NULL if not found */
892
 
UNIV_INTERN
893
 
dict_index_t*
894
 
dict_index_get_if_in_cache(
895
 
/*=======================*/
896
 
        dulint  index_id);      /*!< in: index id */
897
 
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
898
 
#ifdef UNIV_DEBUG
899
 
/**********************************************************************//**
900
 
Checks that a tuple has n_fields_cmp value in a sensible range, so that
901
 
no comparison can occur with the page number field in a node pointer.
902
 
@return TRUE if ok */
903
 
UNIV_INTERN
904
 
ibool
905
 
dict_index_check_search_tuple(
906
 
/*==========================*/
907
 
        const dict_index_t*     index,  /*!< in: index tree */
908
 
        const dtuple_t*         tuple); /*!< in: tuple used in a search */
909
 
/**********************************************************************//**
910
 
Check for duplicate index entries in a table [using the index name] */
911
 
UNIV_INTERN
912
 
void
913
 
dict_table_check_for_dup_indexes(
914
 
/*=============================*/
915
 
        const dict_table_t*     table); /*!< in: Check for dup indexes
916
 
                                        in this table */
917
 
 
918
 
#endif /* UNIV_DEBUG */
919
 
/**********************************************************************//**
920
 
Builds a node pointer out of a physical record and a page number.
921
 
@return own: node pointer */
922
 
UNIV_INTERN
923
 
dtuple_t*
924
 
dict_index_build_node_ptr(
925
 
/*======================*/
926
 
        const dict_index_t*     index,  /*!< in: index */
927
 
        const rec_t*            rec,    /*!< in: record for which to build node
928
 
                                        pointer */
929
 
        ulint                   page_no,/*!< in: page number to put in node
930
 
                                        pointer */
931
 
        mem_heap_t*             heap,   /*!< in: memory heap where pointer
932
 
                                        created */
933
 
        ulint                   level); /*!< in: level of rec in tree:
934
 
                                        0 means leaf level */
935
 
/**********************************************************************//**
936
 
Copies an initial segment of a physical record, long enough to specify an
937
 
index entry uniquely.
938
 
@return pointer to the prefix record */
939
 
UNIV_INTERN
940
 
rec_t*
941
 
dict_index_copy_rec_order_prefix(
942
 
/*=============================*/
943
 
        const dict_index_t*     index,  /*!< in: index */
944
 
        const rec_t*            rec,    /*!< in: record for which to
945
 
                                        copy prefix */
946
 
        ulint*                  n_fields,/*!< out: number of fields copied */
947
 
        byte**                  buf,    /*!< in/out: memory buffer for the
948
 
                                        copied prefix, or NULL */
949
 
        ulint*                  buf_size);/*!< in/out: buffer size */
950
 
/**********************************************************************//**
951
 
Builds a typed data tuple out of a physical record.
952
 
@return own: data tuple */
953
 
UNIV_INTERN
954
 
dtuple_t*
955
 
dict_index_build_data_tuple(
956
 
/*========================*/
957
 
        dict_index_t*   index,  /*!< in: index */
958
 
        rec_t*          rec,    /*!< in: record for which to build data tuple */
959
 
        ulint           n_fields,/*!< in: number of data fields */
960
 
        mem_heap_t*     heap);  /*!< in: memory heap where tuple created */
961
 
/*********************************************************************//**
962
 
Gets the space id of the root of the index tree.
963
 
@return space id */
964
 
UNIV_INLINE
965
 
ulint
966
 
dict_index_get_space(
967
 
/*=================*/
968
 
        const dict_index_t*     index); /*!< in: index */
969
 
/*********************************************************************//**
970
 
Sets the space id of the root of the index tree. */
971
 
UNIV_INLINE
972
 
void
973
 
dict_index_set_space(
974
 
/*=================*/
975
 
        dict_index_t*   index,  /*!< in/out: index */
976
 
        ulint           space); /*!< in: space id */
977
 
/*********************************************************************//**
978
 
Gets the page number of the root of the index tree.
979
 
@return page number */
980
 
UNIV_INLINE
981
 
ulint
982
 
dict_index_get_page(
983
 
/*================*/
984
 
        const dict_index_t*     tree);  /*!< in: index */
985
 
/*********************************************************************//**
986
 
Sets the page number of the root of index tree. */
987
 
UNIV_INLINE
988
 
void
989
 
dict_index_set_page(
990
 
/*================*/
991
 
        dict_index_t*   index,  /*!< in/out: index */
992
 
        ulint           page);  /*!< in: page number */
993
 
/*********************************************************************//**
994
 
Gets the read-write lock of the index tree.
995
 
@return read-write lock */
996
 
UNIV_INLINE
997
 
rw_lock_t*
998
 
dict_index_get_lock(
999
 
/*================*/
1000
 
        dict_index_t*   index); /*!< in: index */
1001
 
/********************************************************************//**
1002
 
Returns free space reserved for future updates of records. This is
1003
 
relevant only in the case of many consecutive inserts, as updates
1004
 
which make the records bigger might fragment the index.
1005
 
@return number of free bytes on page, reserved for updates */
1006
 
UNIV_INLINE
1007
 
ulint
1008
 
dict_index_get_space_reserve(void);
1009
 
/*==============================*/
1010
 
/*********************************************************************//**
1011
 
Calculates the minimum record length in an index. */
1012
 
UNIV_INTERN
1013
 
ulint
1014
 
dict_index_calc_min_rec_len(
1015
 
/*========================*/
1016
 
        const dict_index_t*     index); /*!< in: index */
1017
 
/*********************************************************************//**
1018
 
Calculates new estimates for table and index statistics. The statistics
1019
 
are used in query optimization. */
1020
 
UNIV_INTERN
1021
 
void
1022
 
dict_update_statistics_low(
1023
 
/*=======================*/
1024
 
        dict_table_t*   table,          /*!< in/out: table */
1025
 
        ibool           has_dict_mutex);/*!< in: TRUE if the caller has the
1026
 
                                        dictionary mutex */
1027
 
/*********************************************************************//**
1028
 
Calculates new estimates for table and index statistics. The statistics
1029
 
are used in query optimization. */
1030
 
UNIV_INTERN
1031
 
void
1032
 
dict_update_statistics(
1033
 
/*===================*/
1034
 
        dict_table_t*   table); /*!< in/out: table */
1035
 
/********************************************************************//**
1036
 
Reserves the dictionary system mutex for MySQL. */
1037
 
UNIV_INTERN
1038
 
void
1039
 
dict_mutex_enter_for_mysql(void);
1040
 
/*============================*/
1041
 
/********************************************************************//**
1042
 
Releases the dictionary system mutex for MySQL. */
1043
 
UNIV_INTERN
1044
 
void
1045
 
dict_mutex_exit_for_mysql(void);
1046
 
/*===========================*/
1047
 
/********************************************************************//**
1048
 
Checks if the database name in two table names is the same.
1049
 
@return TRUE if same db name */
1050
 
UNIV_INTERN
1051
 
ibool
1052
 
dict_tables_have_same_db(
1053
 
/*=====================*/
1054
 
        const char*     name1,  /*!< in: table name in the form
1055
 
                                dbname '/' tablename */
1056
 
        const char*     name2); /*!< in: table name in the form
1057
 
                                dbname '/' tablename */
1058
 
/*********************************************************************//**
1059
 
Removes an index from the cache */
1060
 
UNIV_INTERN
1061
 
void
1062
 
dict_index_remove_from_cache(
1063
 
/*=========================*/
1064
 
        dict_table_t*   table,  /*!< in/out: table */
1065
 
        dict_index_t*   index); /*!< in, own: index */
1066
 
/**********************************************************************//**
1067
 
Get index by name
1068
 
@return index, NULL if does not exist */
1069
 
UNIV_INTERN
1070
 
dict_index_t*
1071
 
dict_table_get_index_on_name(
1072
 
/*=========================*/
1073
 
        dict_table_t*   table,  /*!< in: table */
1074
 
        const char*     name);  /*!< in: name of the index to find */
1075
 
/**********************************************************************//**
1076
 
In case there is more than one index with the same name return the index
1077
 
with the min(id).
1078
 
@return index, NULL if does not exist */
1079
 
UNIV_INTERN
1080
 
dict_index_t*
1081
 
dict_table_get_index_on_name_and_min_id(
1082
 
/*====================================*/
1083
 
        dict_table_t*   table,  /*!< in: table */
1084
 
        const char*     name);  /*!< in: name of the index to find */
1085
 
/* Buffers for storing detailed information about the latest foreign key
1086
 
and unique key errors */
1087
 
extern FILE*    dict_foreign_err_file;
1088
 
extern mutex_t  dict_foreign_err_mutex; /* mutex protecting the buffers */
1089
 
 
1090
 
/** the dictionary system */
1091
 
extern dict_sys_t*      dict_sys;
1092
 
/** the data dictionary rw-latch protecting dict_sys */
1093
 
extern rw_lock_t        dict_operation_lock;
1094
 
 
1095
 
/* Dictionary system struct */
1096
 
struct dict_sys_struct{
1097
 
        mutex_t         mutex;          /*!< mutex protecting the data
1098
 
                                        dictionary; protects also the
1099
 
                                        disk-based dictionary system tables;
1100
 
                                        this mutex serializes CREATE TABLE
1101
 
                                        and DROP TABLE, as well as reading
1102
 
                                        the dictionary data for a table from
1103
 
                                        system tables */
1104
 
        dulint          row_id;         /*!< the next row id to assign;
1105
 
                                        NOTE that at a checkpoint this
1106
 
                                        must be written to the dict system
1107
 
                                        header and flushed to a file; in
1108
 
                                        recovery this must be derived from
1109
 
                                        the log records */
1110
 
        hash_table_t*   table_hash;     /*!< hash table of the tables, based
1111
 
                                        on name */
1112
 
        hash_table_t*   table_id_hash;  /*!< hash table of the tables, based
1113
 
                                        on id */
1114
 
        UT_LIST_BASE_NODE_T(dict_table_t)
1115
 
                        table_LRU;      /*!< LRU list of tables */
1116
 
        ulint           size;           /*!< varying space in bytes occupied
1117
 
                                        by the data dictionary table and
1118
 
                                        index objects */
1119
 
        dict_table_t*   sys_tables;     /*!< SYS_TABLES table */
1120
 
        dict_table_t*   sys_columns;    /*!< SYS_COLUMNS table */
1121
 
        dict_table_t*   sys_indexes;    /*!< SYS_INDEXES table */
1122
 
        dict_table_t*   sys_fields;     /*!< SYS_FIELDS table */
1123
 
};
1124
 
#endif /* !UNIV_HOTBACKUP */
1125
 
 
1126
 
/** dummy index for ROW_FORMAT=REDUNDANT supremum and infimum records */
1127
 
extern dict_index_t*    dict_ind_redundant;
1128
 
/** dummy index for ROW_FORMAT=COMPACT supremum and infimum records */
1129
 
extern dict_index_t*    dict_ind_compact;
1130
 
 
1131
 
/**********************************************************************//**
1132
 
Inits dict_ind_redundant and dict_ind_compact. */
1133
 
UNIV_INTERN
1134
 
void
1135
 
dict_ind_init(void);
1136
 
/*===============*/
1137
 
 
1138
 
#ifndef UNIV_NONINL
1139
 
#include "dict0dict.ic"
1140
 
#endif
1141
 
 
1142
 
#endif