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

Inconsistency in handling Xsqlvar in AllocateJavaXsqlvar and Resync (potential bug) [JDBC235] #284

Closed
firebird-automations opened this issue Feb 9, 2012 · 3 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

The code in xsqlda_wrapper.cpp has an inconsistency on how it is handling XSQLVAR:
In Resync it does this:
if(dataPtr == NULL)
{
dataPtr = mAllocator.AllocateMemory(1);
dataPtr[0] = 0;
}

In AllocateJavaXsqlvar it does the following:
if(dataPtr == NULL)
dataPtr = mAllocator.AllocateMemory(1);

	dataPtr\[0\] = 0;

Notice how in the first case it only assigns 0 to dataPtr[0] if it previously was NULL, while in the other case it will always assign 0 dataPtr[0]. This second case seems to be in error.

Commits: 38a95d7

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Changed Resync to make it consistent with AllocateJavaXsqlvar

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

assignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ]

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

resolution: Fixed [ 1 ]

Fix Version: Jaybird 2.2 [ 10053 ]

@firebird-automations
Copy link
Author

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
Projects
None yet
Development

No branches or pull requests

2 participants