InnoDB Plugin
1.0
|
#include "univ.i"
#include "dict0types.h"
#include "dict0dict.h"
#include "que0types.h"
#include "row0types.h"
#include "mtr0mtr.h"
#include "dict0crea.ic"
Go to the source code of this file.
Data Structures | |
struct | tab_node_t |
struct | ind_node_t |
Database object creation
Created 1/8/1996 Heikki Tuuri
UNIV_INLINE dberr_t dict_create_add_foreign_id | ( | ulint * | id_nr, |
const char * | name, | ||
dict_foreign_t * | foreign | ||
) |
Generate a foreign key constraint name when it was not named by the user. A generated constraint has a name of the format dbname/tablename_ibfk_NUMBER, where the numbers start from 1, and are given locally for this table, that is, the number is not global, as it used to be before MySQL 4.0.18.
id_nr | in/out: number to use in id generation; incremented if used |
name | in: table name |
foreign | in/out: foreign key |
UNIV_INTERN dberr_t dict_create_add_foreign_to_dictionary | ( | const char * | name, |
const dict_foreign_t * | foreign, | ||
trx_t * | trx | ||
) |
Add a foreign key definition to the data dictionary tables.
name | in: table name |
foreign | in: foreign key |
trx | in/out: dictionary transaction |
UNIV_INTERN dberr_t dict_create_add_foreigns_to_dictionary | ( | const dict_foreign_set & | local_fk_set, |
const dict_table_t * | table, | ||
trx_t * | trx | ||
) |
Adds the given set of foreign key objects to the dictionary tables
in the database. This function does not modify the dictionary cache. The caller must ensure that all foreign key objects contain a valid constraint name in foreign->id.
[in] | local_fk_set | set of foreign key objects, to be added to the dictionary tables |
[in] | table | table to which the foreign key objects in local_fk_set belong to |
[in,out] | trx | transaction |
UNIV_INTERN dberr_t dict_create_add_tablespace_to_dictionary | ( | ulint | space, |
const char * | name, | ||
ulint | flags, | ||
const char * | path, | ||
trx_t * | trx, | ||
bool | commit | ||
) |
Add a single tablespace definition to the data dictionary tables in the database.
space | in: tablespace id |
name | in: tablespace name |
flags | in: tablespace flags |
path | in: tablespace path |
trx | in: transaction |
Creates an index. This is a high-level function used in SQL execution graphs.
UNIV_INTERN dberr_t dict_create_or_check_foreign_constraint_tables | ( | void | ) |
Creates the foreign key constraints system tables inside InnoDB at server bootstrap or server start if they are not found or are not of the right form.
UNIV_INTERN dberr_t dict_create_or_check_sys_tablespace | ( | void | ) |
Creates the tablespaces and datafiles system tables inside InnoDB at server bootstrap or server start if they are not found or are not of the right form.
Creates a table. This is a high-level function used in SQL execution graphs.
UNIV_INTERN void dict_drop_index_tree | ( | rec_t * | rec, |
mtr_t * | mtr | ||
) |
Drops the index tree associated with a row in SYS_INDEXES table. in: mtr having the latch on the record page
rec | in/out: record in the clustered index of SYS_INDEXES table |
UNIV_INTERN ulint dict_truncate_index_tree | ( | dict_table_t * | table, |
ulint | space, | ||
btr_pcur_t * | pcur, | ||
mtr_t * | mtr | ||
) |
Truncates the index tree associated with a row in SYS_INDEXES table.
table | in: the table the index belongs to |
space | in: 0=truncate, nonzero=create the index tree in the given tablespace |
pcur | in/out: persistent cursor pointing to record in the clustered index of SYS_INDEXES table. The cursor may be repositioned in this call. |
UNIV_INTERN ind_node_t* ind_create_graph_create | ( | dict_index_t * | index, |
mem_heap_t * | heap, | ||
bool | commit | ||
) |
Creates an index create graph.
index | in: index to create, built as a memory data structure |
heap | in: heap where created |
UNIV_INTERN tab_node_t* tab_create_graph_create | ( | dict_table_t * | table, |
mem_heap_t * | heap, | ||
bool | commit | ||
) |
Creates a table create graph.
table | in: table to create, built as a memory data structure |
heap | in: heap where created |