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
fix: Bug that on batch fetching string columns cannot be retrieved #229
base: main
Are you sure you want to change the base?
Conversation
Thanks for the fix. https://github.com/nanodbc/nanodbc/blob/master/README.md#tests says:
So, in order to review and accept this PR, it needs to be updated with test case that reproduces the bug, that's failing due to the bug, and that confirms the fix for the bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I'll try to fix them. I try to run style.sh on my local environment by myself, but if I cannot correctly prepare the tools, please help me. |
@Wakusei most important is to add test case for the bug/bugfix. The formatting, we (I) can take care of it, so don't worry if you hit an obstacle. If you have a problem, just ask, I'll help. |
@Wakusei this is a neat feature: I wonder if we shouldn't call If I am reading the docs on TargetValuePtr |
I've updated the PR's branch with the latest main resolving some conflicts. |
I have just merged This PR still needs test. |
7581868
to
6388404
Compare
I've taken the liberty to update this PR and catch up with recent CI updates. It still needs a test case though. |
if (rowset_position_ < rowset_size_) | ||
{ | ||
RETCODE rc; | ||
NANODBC_CALL_RC( |
Check warning
Code scanning / PREfast
Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2). Warning
Fix a bug that on batch fetching string columns cannot be retrieved. With a multi-row cursor SQLSetPos must be called before calling SQLGetData.
7c94640
to
a29a740
Compare
The CI coverage is now much better and it currently is failing for this PR with this error
This needs to be investigated further. |
What does this PR do?
Fix a bug that on batch fetching string columns cannot be retrieved.
With a multi-row cursor SQLSetPos must be called before calling SQLGetData.
This bug happens on the following situation.