summaryrefslogtreecommitdiff
path: root/storage/innobase/include/dict0crea.h
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-07-31 08:52:24 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2015-07-31 08:59:13 +0300
commitfa765a45250176d1168ce5a61dee484c997604b6 (patch)
treee50230183646e384627f3e71133758a7246398e4 /storage/innobase/include/dict0crea.h
parente05cd97b8af6ebda0080eec40018207d0c78acbd (diff)
downloadmariadb-git-fa765a45250176d1168ce5a61dee484c997604b6.tar.gz
MDEV-6697: Improve foreign keys warnings/errors
There is several different ways to incorrectly define foreign key constraint. In many cases earlier MariaDB versions the error messages produced by these cases are not very clear and helpful. This patch improves the warning messages produced by foreign key parsing.
Diffstat (limited to 'storage/innobase/include/dict0crea.h')
-rw-r--r--storage/innobase/include/dict0crea.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h
index 9faf580b0cc..a58bcb181aa 100644
--- a/storage/innobase/include/dict0crea.h
+++ b/storage/innobase/include/dict0crea.h
@@ -106,6 +106,17 @@ UNIV_INTERN
ulint
dict_create_or_check_foreign_constraint_tables(void);
/*================================================*/
+
+/********************************************************************//**
+Construct foreign key constraint defintion from data dictionary information.
+*/
+UNIV_INTERN
+char*
+dict_foreign_def_get(
+/*=================*/
+ dict_foreign_t* foreign,/*!< in: foreign */
+ trx_t* trx); /*!< in: trx */
+
/********************************************************************//**
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