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

Fix inserting large spatial datatypes using setObject or setGeometry/setGeography #1337

Merged
merged 1 commit into from
May 25, 2020

Conversation

peterbae
Copy link
Contributor

Fixes issue #1270.

When the driver is inserting byte[] data into a column in the server's table, the driver changes the JdbcType of the column (effectively, we change what we send the data as in the INSERT query) if the byte array is larger than the 8000. For example, this means that if the driver was going to insert the data as geometry, it was instead sending varbinary(max) if the byte array that represents the geometry/geography data was larger than 8000. Excluding geometry/geography from being typecast into varbinary(max) solves this issue (geometry/geography data types don't have a size limit).

@ulvii ulvii added this to the 8.3.1 milestone May 15, 2020
@ulvii
Copy link
Contributor

ulvii commented May 19, 2020

PR1337.zip
@mprins
I attached the binaries to this PR, would you give them a try and let us know if your issues are resolved?

@mprins
Copy link

mprins commented May 20, 2020

@ulvii Thanks, I can/will give this a try at the end of the week at the earliest

@peterbae
Copy link
Contributor Author

Hi @mprins, did you have a chance to test out the changes?

@mprins
Copy link

mprins commented May 23, 2020

I've ran 2 projects with this updated driver and all tests appear to be passing, including that reported in #1270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
MSSQL JDBC
  
Closed/Merged PRs
Development

Successfully merging this pull request may close these issues.

None yet

5 participants