Issue Details (XML | Word | Printable)

Key: JDBC-285
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0
Operations

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

JNI implementation of parameter buffer writes incorrect integers

Created: 02/Dec/12 08:36 AM   Updated: 21/Feb/13 08:08 PM
Component/s: JNI layer
Affects Version/s: Jaybird 2.1.6, Jaybird 2.2, Jaybird 2.2.1
Fix Version/s: Jaybird 2.2.2, Jaybird 3.0

Time Tracking:
Issue & Sub-Tasks
Issue Only
Not Specified

Issue Links:
Relate

Sub-Tasks  All   Open   

 Description  « Hide
The JNI parameterbuffer implemention (org.firebirdsql.gds.impl.jni.ParameterBufferBase, specifically inner class NumericArgument) writes integers incorrectly. Instead of prefixing the length in bytes, it simply writes the 4 bytes of the value. This probably wasn't noticed before because of JDBC-284, and the fact that the only other int-property was an extension property which is never written out to the buffer.

Also the gds.impl.jni and gds.impl.wire versions of these classes are almost identical (if not identical): refactor to a common base class.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 02/Dec/12 08:37 AM
Refactor action only for Jaybird 2.3, fix also for Jaybird 2.2.2

Mark Rotteveel added a comment - 02/Dec/12 10:53 AM - edited
It would be a good idea to restructe the ParameterBuffer implementation hierarchy to be similar to the implementation in the .NET provider, that will result in a lot less duplication of code.

Mark Rotteveel added a comment - 02/Dec/12 01:09 PM
Comitted fix to trunk and 2.2 branch, refactoring pending

Mark Rotteveel added a comment - 02/Dec/12 01:29 PM
Created subtask for refactoring, resolving this ticket as fixed.