我有两个 InnoDB 表:
CREATE TABLE master(
id INTEGER UNSIGNED NOT NULL auto_increment PRIMARY KEY
);
CREATE TABLE details(
id INTEGER UNSIGNED NOT NULL auto_increment PRIMARY KEY,
master_id INTEGER UNSIGNED NOT NULL, CONSTRAINT `byMasterId`
FOREIGN KEY (`master_id`) REFERENCES `master`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
);
而且我需要在主表上使用 BEFORE UPDATE 触发器来进行一些验证(并在某些情况下取消更新)。详细信息表中的级联更改是否发生在 BEFORE UPDATE 触发器之后?