CASCADE UPDATE fails for self-referencing FK --------------------------------------------
Key: CORE-5305 URL: http://tracker.firebirdsql.org/browse/CORE-5305 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0.0, 4.0 Initial Reporter: Dmitry Yemanov 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel