on ‎2012 Jun 04 1:14 PM
I am running sa 12.0.1.3726 and having issues with my system triggers when executing the following script
CREATE TABLE test1 (id INTEGER PRIMARY KEY); CREATE TABLE test2 (id2 INTEGER PRIMARY KEY, id INTEGER, FOREIGN KEY id(id) REFERENCES test1(id) ON UPDATE CASCADE ON DELETE CASCADE); insert into test1(id)values(1); insert into test2(id2,id)values(1,1); delete from test1;
I get Primary key for row in table 'test1' is referenced by foreign key 'id' in table 'test2' when it should be handled by the ON DELETE rule.
Request clarification before answering.
I have no issues with either 12.0.1.3456 or 12.0.1.3741.
Is this a simplified repro of a larger problem?
Is is possible that you have the fire_triggers option set, or used the -gf server option?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It appears one of my earlier scripts turned off fire_triggers(then errored out and never turned it back on). Turned it back on and it functioned as expected
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.