Issue Details (XML | Word | Printable)

Key: JDBC-623
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Stephan Perktold
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Jaybird JDBC Driver

ResultSet.updateRow sets untouched BLOB fields to NULL

Created: 19/May/20 04:54 PM   Updated: 22/May/20 02:16 PM
Component/s: JDBC driver
Affects Version/s: Jaybird 2.2.15, Jaybird 4.0.0
Fix Version/s: Jaybird 3.0.9, Jaybird 4.0.1, Jaybird 5

File Attachments: 1. Java Source File (6 kB)

Environment: Windows 10

 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Stephan Perktold added a comment - 19/May/20 04:56 PM
Test to demonstrate the bug.

Stephan Perktold made changes - 19/May/20 04:56 PM
Field Original Value New Value
Attachment [ 13436 ]
Mark Rotteveel made changes - 21/May/20 04:13 PM
Fix Version/s Jaybird 3.0.9 [ 10917 ]
Fix Version/s Jaybird 4.0.1 [ 10921 ]
Fix Version/s Jaybird 5 [ 10871 ]
Mark Rotteveel added a comment - 21/May/20 04:15 PM
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.

Mark Rotteveel added a comment - 22/May/20 09:39 AM
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.

Mark Rotteveel made changes - 22/May/20 09:39 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Mark Rotteveel made changes - 22/May/20 01:04 PM
Status Resolved [ 5 ] Closed [ 6 ]
Mark Rotteveel added a comment - 22/May/20 02:16 PM
Jaybird 3.0.9, which contains this fixed has been released today. The release of 4.0.1 is not planned yet.