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
Operations

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 ResultSetUpdateRowTest.java (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.

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 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.