summaryrefslogtreecommitdiff
path: root/innobase/dict/dict0crea.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-11-02 08:58:45 +0200
committerunknown <monty@mysql.com>2004-11-02 08:58:45 +0200
commit94839ddf5e23998c4e90776912f7d92a90277628 (patch)
treef21b1c5d561fe5ca25c7f1f93db8805c0f4f3940 /innobase/dict/dict0crea.c
parent46aa022aa6cf40801518d1be2c9e8e7ffcee9928 (diff)
parent61ac832464a48afcf85f8c302734aa01d4346c78 (diff)
downloadmariadb-git-94839ddf5e23998c4e90776912f7d92a90277628.tar.gz
merge with 4.0
Build-tools/mysql-copyright: Auto merged Docs/Support/texi2html: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/eval/eval0eval.c: Auto merged innobase/pars/pars0pars.c: Auto merged
Diffstat (limited to 'innobase/dict/dict0crea.c')
-rw-r--r--innobase/dict/dict0crea.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c
index 137964b26c1..cbdc0aab53c 100644
--- a/innobase/dict/dict0crea.c
+++ b/innobase/dict/dict0crea.c
@@ -1067,6 +1067,12 @@ dict_create_or_check_foreign_constraint_tables(void)
there are 2 secondary indexes on SYS_FOREIGN, and they
are defined just like below */
+ /* NOTE: when designing InnoDB's foreign key support in 2001, we made
+ an error and made the table names and the foreign key id of type
+ 'CHAR' (internally, really a VARCHAR). We should have made the type
+ VARBINARY, like in other InnoDB system tables, to get a clean
+ design. */
+
str =
"PROCEDURE CREATE_FOREIGN_SYS_TABLES_PROC () IS\n"
"BEGIN\n"
@@ -1284,9 +1290,17 @@ loop:
fputs(".\nA foreign key constraint of name ", ef);
ut_print_name(ef, trx, foreign->id);
fputs("\nalready exists."
- " (Note that internally InnoDB adds 'databasename/'\n"
+ " (Note that internally InnoDB adds 'databasename/'\n"
"in front of the user-defined constraint name).\n",
ef);
+ fputs("Note that InnoDB's FOREIGN KEY system tables store\n"
+ "constraint names as case-insensitive, with the\n"
+ "MySQL standard latin1_swedish_ci collation. If you\n"
+ "create tables or databases whose names differ only in\n"
+ "the character case, then collisions in constraint\n"
+ "names can occur. Workaround: name your constraints\n"
+ "explicitly with unique names.\n",
+ ef);
mutex_exit(&dict_foreign_err_mutex);