diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-07-31 08:52:24 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-07-31 08:59:13 +0300 |
commit | fa765a45250176d1168ce5a61dee484c997604b6 (patch) | |
tree | e50230183646e384627f3e71133758a7246398e4 /storage/xtradb/include/dict0crea.h | |
parent | e05cd97b8af6ebda0080eec40018207d0c78acbd (diff) | |
download | mariadb-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/xtradb/include/dict0crea.h')
-rw-r--r-- | storage/xtradb/include/dict0crea.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/storage/xtradb/include/dict0crea.h b/storage/xtradb/include/dict0crea.h index 762ab54a353..c67910f0d55 100644 --- a/storage/xtradb/include/dict0crea.h +++ b/storage/xtradb/include/dict0crea.h @@ -121,6 +121,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 |