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

Constraint violation error may be swallowed in some cases [CORE4670] #4981

Closed
firebird-automations opened this issue Jan 22, 2015 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Attila Molnár (e_pluribus_unum)

Attachments:
command.sql

Hi!

Running the attached command on 2.5.3 server caused no error, but it should be.
Run statistic shows 1 successful insert, but in reality it does not happend.

test database : ftp://firebirdproject:projectfirebird@ftp.mve.hu
I'll send the zip password in PM.

With Firebird 2.5.2 works as expected, I'll get the following error
violation of FOREIGN KEY constraint "".
violation of FOREIGN KEY constraint "AEFEJ_FK1" on table "AEFEJ".
Foreign key reference target does not exist.

Thank you!

Commits: aaa2936 fbb4edc FirebirdSQL/fbt-repository@0d90434 FirebirdSQL/fbt-repository@ac34497

====== Test Details ======

Script contains no DDL. No database in provided link.

@firebird-automations
Copy link
Collaborator Author

Modified by: Attila Molnár (e_pluribus_unum)

Attachment: command.sql [ 12666 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Confirmed. The issue manifests itself when the following conditions are met:

1) Problematic PK/UK index has rdb$index_id > 1 (let rdb$index_id be X, so X > 1)
2) There are expression indices before X (rdb$index_id < X)
3) At least one of those expression indices invoke some UDF

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 3.0 Beta 1 [ 10332 ]

Version: 2.5.3 [ 10461 ]

Version: 3.0 Alpha 2 [ 10560 ]

Version: 3.0 Alpha 1 [ 10331 ]

assignee: Dmitry Yemanov [ dimitr ]

summary: INSERT SELECT bug with 2.5.3 => Constraint violation error may be swallowed in some cases

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.4 [ 10585 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Not enough information

Test Details: Script contains no DDL. No database in provided link.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

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