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

JNI implementation of parameter buffer writes incorrect integers [JDBC285] #331

Closed
firebird-issue-importer opened this issue Dec 2, 2012 · 9 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Submitted by: @mrotteveel

Relate to JDBC284
Is related to JDBC286
Jira_subtask_outward JDBC287

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

Commits: 2e9a1e4 c342a29

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Modified by: @mrotteveel

Fix Version: Jaybird 2.2.2 [ 10480 ]

Fix Version: Jaybird 2.3 [ 10440 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Commented by: @mrotteveel

Refactor action only for Jaybird 2.3, fix also for Jaybird 2.2.2

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Modified by: @mrotteveel

Link: This issue relate to JDBC284 [ JDBC284 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Modified by: @mrotteveel

Link: This issue is related to JDBC286 [ JDBC286 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Commented by: @mrotteveel

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.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Commented by: @mrotteveel

Comitted fix to trunk and 2.2 branch, refactoring pending

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Commented by: @mrotteveel

Created subtask for refactoring, resolving this ticket as fixed.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 2, 2012

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 21, 2013

Modified by: @mrotteveel

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

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