Thanks Mark! I really wish that FB could be improved to avoid that situation.
Let's see what our friends thinks about it. []s Carlos http://www.firebirdnews.org FireBase - http://www.FireBase.com.br MR> On 6-9-2019 01:46, Carlos H. Cantu wrote: >> I understand that there are other scenarios where the currently FK >> behavior is correct and makes sense, for example, in the case of >> avoiding deleting a master record with "commited but not visible >> childs", but for the reported example, the currently behavior looks >> incorrect, and for people with business logic implemented in triggers, >> it may/will lead to incorrect results. MR> I think you're right. You should only be able to insert records that MR> reference records that are visible to your transaction. Given Tx2 MR> started before Tx1 committed, the effects from Tx1 aren't visible to MR> your transaction. Your insert in Tx2 should fail as the master record MR> from Tx1 doesn't exist from the perspective of Tx2. >> Does anyone knows if this behavior is following the Standard? MR> I don't think this behaviour is correct in view of the standard, but I MR> haven't looked it up. MR> Mark Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel