summaryrefslogtreecommitdiff
path: root/storage/innobase/include/dict0crea.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-09-11 16:42:54 +0200
committerSergei Golubchik <sergii@pisem.net>2014-09-11 16:42:54 +0200
commit75796d9ecb50509b0c462c4aa67d40fee0d9fd24 (patch)
treefc721141a39cd7092ee84add25a3597a6e74ca4a /storage/innobase/include/dict0crea.h
parentc30a8442e8324f53f9157aabcc0330db0cd2e95f (diff)
parent993395bfa090266eb0ded41173130268a3ff01e7 (diff)
downloadmariadb-git-75796d9ecb50509b0c462c4aa67d40fee0d9fd24.tar.gz
InnoDB 5.6.20
Diffstat (limited to 'storage/innobase/include/dict0crea.h')
-rw-r--r--storage/innobase/include/dict0crea.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h
index 6ec1079957b..67eab9058da 100644
--- a/storage/innobase/include/dict0crea.h
+++ b/storage/innobase/include/dict0crea.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -124,28 +124,24 @@ dict_create_add_foreign_id(
const char* name, /*!< in: table name */
dict_foreign_t* foreign)/*!< in/out: foreign key */
__attribute__((nonnull));
-/********************************************************************//**
-Adds foreign key definitions to data dictionary tables in the database. We
-look at table->foreign_list, and also generate names to constraints that were
-not named by the user. A generated constraint has a name of the format
-databasename/tablename_ibfk_NUMBER, where the numbers start from 1, and are
-given locally for this table, that is, the number is not global, as in the
-old format constraints < 4.0.18 it used to be.
-@return error code or DB_SUCCESS */
+
+/** 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.
+@param[in] local_fk_set set of foreign key objects, to be added to
+the dictionary tables
+@param[in] table table to which the foreign key objects in
+local_fk_set belong to
+@param[in,out] trx transaction
+@return error code or DB_SUCCESS */
UNIV_INTERN
dberr_t
dict_create_add_foreigns_to_dictionary(
/*===================================*/
- ulint start_id,/*!< in: if we are actually doing ALTER TABLE
- ADD CONSTRAINT, we want to generate constraint
- numbers which are bigger than in the table so
- far; we number the constraints from
- start_id + 1 up; start_id should be set to 0 if
- we are creating a new table, or if the table
- so far has no constraints for which the name
- was generated here */
- dict_table_t* table, /*!< in: table */
- trx_t* trx) /*!< in: transaction */
+ const dict_foreign_set& local_fk_set,
+ const dict_table_t* table,
+ trx_t* trx)
__attribute__((nonnull, warn_unused_result));
/****************************************************************//**
Creates the tablespaces and datafiles system tables inside InnoDB