Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASCADE UPDATE fails for self-referencing FK [CORE5305] #5582

Closed
firebird-issue-importer opened this issue Jul 11, 2016 · 5 comments
Closed

Comments

@firebird-issue-importer

Submitted by: Boltik Evgeny (bolt)

Relate to CORE3362

Votes: 2

Test case:

recreate table tfkself (col1 int primary key, col2 int references tfkself(col1) on update cascade);
insert into tfkself (col1, col2) values (1, null);
insert into tfkself (col1, col2) values (2, null);
insert into tfkself (col1, col2) values (3, 1);
commit;

update tfkself set col1 = -col1;

--violation of FOREIGN KEY constraint "".
--violation of FOREIGN KEY constraint "INTEG_14" on table "TFKSELF".
--Foreign key reference target does not exist.
--Problematic key value is ("COL2" = 1).

It appears that when the last row is being updated, it does not see the new (changed by casdade) value of the COL2 column.

Commits: 1db164a 90b35ad

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jul 11, 2016

Modified by: @dyemanov

reporter: Dmitry Yemanov [ dimitr ] => Boltik Evgeny [ bolt ]

assignee: Vlad Khorsun [ hvlad ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 11, 2016

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0.1 [ 10730 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 11, 2016

Modified by: @hvlad

Link: This issue relate to CORE3362 [ CORE3362 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 12, 2016

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 12, 2016

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment