summaryrefslogtreecommitdiff
path: root/innobase/include/dict0dict.h
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-02-09 23:57:29 +0200
committerunknown <heikki@hundin.mysql.fi>2004-02-09 23:57:29 +0200
commite2646f092e0e077dc5ad5440159767eeee2136d1 (patch)
tree4b1a405fb8e787dcba8a5a3f77ac537aa6b874fe /innobase/include/dict0dict.h
parent17d4afc68eb53b13332efb9d579283acd2290744 (diff)
downloadmariadb-git-e2646f092e0e077dc5ad5440159767eeee2136d1.tar.gz
row0mysql.c:
Allow always DROPping of a table which is only referenced by FOREIGN KEY constraints from the same table Many files: Do not let REPLACE to perform internally an UPDATE if the table is referenced by a FOREIGN KEY: the manual says that REPLACE must resolve a duplicate key error semantically with DELETE(s) + INSERT, and not by an UPDATE; the internal update caused foreign key checks and cascaded operations to behave in a semantically wrong way sql/ha_innodb.cc: Do not let REPLACE to perform internally an UPDATE if the table is referenced by a FOREIGN KEY: the manual says that REPLACE must resolve a duplicate key error semantically with DELETE(s) + INSERT, and not by an UPDATE; the internal update caused foreign key checks and cascaded operations to behave in a semantically wrong way sql/sql_insert.cc: Do not let REPLACE to perform internally an UPDATE if the table is referenced by a FOREIGN KEY: the manual says that REPLACE must resolve a duplicate key error semantically with DELETE(s) + INSERT, and not by an UPDATE; the internal update caused foreign key checks and cascaded operations to behave in a semantically wrong way sql/ha_innodb.h: Do not let REPLACE to perform internally an UPDATE if the table is referenced by a FOREIGN KEY: the manual says that REPLACE must resolve a duplicate key error semantically with DELETE(s) + INSERT, and not by an UPDATE; the internal update caused foreign key checks and cascaded operations to behave in a semantically wrong way sql/handler.h: Do not let REPLACE to perform internally an UPDATE if the table is referenced by a FOREIGN KEY: the manual says that REPLACE must resolve a duplicate key error semantically with DELETE(s) + INSERT, and not by an UPDATE; the internal update caused foreign key checks and cascaded operations to behave in a semantically wrong way innobase/dict/dict0dict.c: Do not let REPLACE to perform internally an UPDATE if the table is referenced by a FOREIGN KEY: the manual says that REPLACE must resolve a duplicate key error semantically with DELETE(s) + INSERT, and not by an UPDATE; the internal update caused foreign key checks and cascaded operations to behave in a semantically wrong way innobase/include/dict0dict.h: Do not let REPLACE to perform internally an UPDATE if the table is referenced by a FOREIGN KEY: the manual says that REPLACE must resolve a duplicate key error semantically with DELETE(s) + INSERT, and not by an UPDATE; the internal update caused foreign key checks and cascaded operations to behave in a semantically wrong way innobase/row/row0mysql.c: Allow always DROPping of a table which is only referenced by FOREIGN KEY constraints from the same table
Diffstat (limited to 'innobase/include/dict0dict.h')
-rw-r--r--innobase/include/dict0dict.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h
index 6f56c54224b..7d55521f228 100644
--- a/innobase/include/dict0dict.h
+++ b/innobase/include/dict0dict.h
@@ -206,6 +206,15 @@ dict_foreign_add_to_cache(
/* out: DB_SUCCESS or error code */
dict_foreign_t* foreign); /* in, own: foreign key constraint */
/*************************************************************************
+Checks if a table is referenced by foreign keys. */
+
+ibool
+dict_table_referenced_by_foreign_key(
+/*=================================*/
+ /* out: TRUE if table is referenced by a
+ foreign key */
+ dict_table_t* table); /* in: InnoDB table */
+/*************************************************************************
Scans a table create SQL string and adds to the data dictionary
the foreign key constraints declared in the string. This function
should be called after the indexes for a table have been created.