mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
@ -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) {}
|
||||
|
Reference in New Issue
Block a user