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

FBRowUpdater incorrectly considers result set with only partial PK updatable #780

Closed
mrotteveel opened this issue Jan 12, 2024 · 1 comment

Comments

@mrotteveel
Copy link
Member

When FBRowUpdater generates its parameter mask, it checks if it found the 'best row identifier', but unfortunately, it fails to reset the boolean used to track that. As a result, if a table has a composite PK, and the prefix of the primary key is included in the query (i.e. first, or first + second, etc), but the suffix is missing (e.g. last, or second last + last, etc.), it will still consider the result set updatable.

Subsequent attempts to update rows through the result may update multiple rows (and refresh row will fail with an exception).

This has been broken since 3.0.0, and no one has reported it, so initially, it will only be fixed in Jaybird 6.

@mrotteveel
Copy link
Member Author

Decided that the (minimal) fix should be backported to Jaybird 5, see #781

@mrotteveel mrotteveel changed the title FBRowUpdater considers result set with only partial PK updatable FBRowUpdater incorrectly considers result set with only partial PK updatable Jan 13, 2024
mrotteveel added a commit that referenced this issue Jan 13, 2024
…PK updatable

+ Improvement: try to fall back to RDB$DB_KEY if best row identifier not matched
+ various refactoring/performance improvements/code cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant