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

ResultSet.updateRow sets untouched BLOB fields to NULL [JDBC623] #653

Closed
firebird-automations opened this issue May 19, 2020 · 8 comments
Closed

Comments

@firebird-automations
Copy link

Submitted by: Stephan Perktold (stephanp)

Attachments:
ResultSetUpdateRowTest.java

When updating some fields via ResultSet.updateX followed by updateRow(), BLOB fields are automatically set to NULL.
Tested with Jaybird 2.2.15 and Jaybird 4.0.0 on a Firebird 2.5 database. Probably all versions are affected.
The attached file can be used to demonstrate the bug.

Commits: 42f9beb 0f7c8cd ed07bb7

@firebird-automations
Copy link
Author

Commented by: Stephan Perktold (stephanp)

Test to demonstrate the bug.

@firebird-automations
Copy link
Author

Modified by: Stephan Perktold (stephanp)

Attachment: ResultSetUpdateRowTest.java [ 13436 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.9 [ 10917 ]

Fix Version: Jaybird 4.0.1 [ 10921 ]

Fix Version: Jaybird 5 [ 10871 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Thanks for reporting. I'll try and reproduce this later this week and fix it for 3.0.x and 4.0.x. It will not be fixed in 2.2.x, as 2.2.x is no longer maintained.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Fixed for 3.0.9, 4.0.1 and 5.

Before updating the row, blob fields are 'flushed'. The issue was that flushing the field would mark it as updated (to null), which would then result in the field being included in the update statement. Blob fields now track if they are explicitly updated to null, and otherwise do not flush their null state.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

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

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Jaybird 3.0.9, which contains this fixed has been released today. The release of 4.0.1 is not planned yet.

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