-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Inconsistent state of master-detail occurs after reconnect + 'SET AUTODDL OFF' + 'drop <FK>' which is rolled back #7899
Comments
The issue is related with inconsistency in relation metadata in memory. |
The offered fix ensures that relation's metadata is loaded before record in RDB$RELATION_CONSTRAINTS is deleted. |
FIxed bug #7899 : Inconsistent state of master-detail occurs after RE-connect + 'SET AUTODDL OFF' + 'drop <FK>' which is ROLLED BACK
Re-opened for backporting |
Re-opened for backporting |
Will be ported into v5 later |
QA issue: test currently is skipped for FB 5.x. Waiting for port. |
Following script was tested during re-implementing test for CORE-4212.
Please note on lines marked as [1] and [2]
Of course, first attempt to insert row in detail table (while master is empty) will fail:
insert into persistent_detl(id) values(1);
-- produces:
SQLSTATE = 23000 / -Foreign key reference target does not exist / -Problematic key value is ("ID" = 1)
)But let this script go further.
You can see that there was statement to DROP FK but it was rolled back (see line marked as
[ !!! 2 !!! ]
).Final output of script will end with:
What is most interesting: such outcome (presence of 'orphan' record in the detailed table) will NOT occur if we comment out line marked as
[ !!! 1 !!! ]
The text was updated successfully, but these errors were encountered: