diff options
author | heikki@hundin.mysql.fi <> | 2004-02-09 23:57:29 +0200 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2004-02-09 23:57:29 +0200 |
commit | d9790a406c69a46eb197cea725c1e7c7e480ac41 (patch) | |
tree | 4b1a405fb8e787dcba8a5a3f77ac537aa6b874fe /innobase/include | |
parent | d2d1e6f7261846c34a93fe17c1c10a3a0be2e3ca (diff) | |
download | mariadb-git-d9790a406c69a46eb197cea725c1e7c7e480ac41.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
Diffstat (limited to 'innobase/include')
-rw-r--r-- | innobase/include/dict0dict.h | 9 |
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. |