summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2004-02-09 23:57:29 +0200
committerheikki@hundin.mysql.fi <>2004-02-09 23:57:29 +0200
commitd9790a406c69a46eb197cea725c1e7c7e480ac41 (patch)
tree4b1a405fb8e787dcba8a5a3f77ac537aa6b874fe /sql/handler.h
parentd2d1e6f7261846c34a93fe17c1c10a3a0be2e3ca (diff)
downloadmariadb-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 'sql/handler.h')
-rw-r--r--sql/handler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 60edf539e2c..750db45759e 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -319,6 +319,8 @@ public:
virtual void append_create_info(String *packet) {}
virtual char* get_foreign_key_create_info()
{ return(NULL);} /* gets foreign key create string from InnoDB */
+ virtual uint referenced_by_foreign_key() { return 0;} /* used in REPLACE;
+ is > 0 if table is referred by a FOREIGN KEY */
virtual void init_table_handle_for_HANDLER()
{ return; } /* prepare InnoDB for HANDLER */
virtual void free_foreign_key_create_info(char* str) {}