mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-18114 Foreign Key Constraint actions don't affect Virtual Column
* invoke check_expression() for all vcol_info's in mysql_prepare_create_table() to check for FK CASCADE * also check for SET NULL and SET DEFAULT * to check against existing FKs when a vcol is added in ALTER TABLE, old FKs must be added to the new_key_list just like other indexes are * check columns recursively, if vcol1 references vcol2, flags of vcol2 must be taken into account * remove check_table_name_processor(), put that logic under check_vcol_func_processor() to avoid walking the tree twice
This commit is contained in:
@@ -1077,7 +1077,7 @@ KEY `a_2` (`a`,`vbidxcol`),
|
||||
KEY `vbidxcol_2` (`vbidxcol`,`d`),
|
||||
CONSTRAINT `fk_16` FOREIGN KEY (`a`) REFERENCES `ibstd_16` (`a`) ON DELETE SET NULL
|
||||
) ENGINE=InnoDB;
|
||||
DROP TABLE ibstd_16_fk;
|
||||
ERROR HY000: Function or expression 'a' cannot be used in the GENERATED ALWAYS AS clause of `vadcol`
|
||||
CREATE TABLE `ibstd_16_fk` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`d` int(11) DEFAULT NULL,
|
||||
|
Reference in New Issue
Block a user