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

New version: ODBC v1.1.0 #66084

Merged
merged 1 commit into from
Aug 11, 2022
Merged

Conversation

JuliaRegistrator
Copy link
Contributor

UUID: be6f12e9-ca4f-5eb2-a339-a4f995cc0291
Repo: https://github.com/JuliaDatabases/ODBC.jl.git
Tree: ab457f6208fa4faa5675c81d32275e661a06ad9e

Registrator tree SHA: 8e1a5ac2695627143951512d700c7e3c445102ec
JuliaRegistrator referenced this pull request in JuliaDatabases/ODBC.jl Aug 11, 2022
* Fix case when SQLGetData data size exceeds column size

Fixes #328. Ok, a bit nasty, but here's the rundown:
  * This is mostly outlined [here](https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetdata-function?view=sql-server-ver16#retrieving-data-with-sqlgetdata)
  * The issue is that for our result set, the cursor may be told that a give column has a certain size in bytes, particularly for variable-sized columns like VARCHAR
  * BUT, the driver then may have to "convert to the target type" and this conversion may result in the _actual_ data size being larger than we orignally allocated for
  * But wait, you may ask, don't we already account for this case [here](https://github.com/JuliaDatabases/ODBC.jl/blob/f38f771557a5763f777ed0f441c2cc5a72f41c70/src/utils.jl#L328) by resizing the buffer and calling SQLGetData again to retrieve the rest of the data?
  * Why yes, we do, but only for "long" data types, which is the primary use case for the multiple SQLGetData calls
  * So basically this is _another_ case where, totally depending on the db driver, we might end up with truncated data which will result in `API.SQL_SUCCESS_WITH_INFO` being returned from SQLGetData

Thankfully the fix is relatively easy: we just need to use our buffer-resizing branch if the data type is long OR SQLGetData returns this success with info status code.

* bump some versions and update ci
@JuliaRegistrator JuliaRegistrator temporarily deployed to stopwatch August 11, 2022 12:59 Inactive
@github-actions
Copy link
Contributor

Your new version pull request met all of the guidelines for auto-merging and is scheduled to be merged in the next round.


If you want to prevent this pull request from being auto-merged, simply leave a comment. If you want to post a comment without blocking auto-merging, you must include the text [noblock] in your comment.

@JuliaTagBot JuliaTagBot merged commit f8ea4b3 into master Aug 11, 2022
@JuliaTagBot JuliaTagBot deleted the registrator/odbc/be6f12e9/v1.1.0 branch August 11, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants