JuliaDatabases / ODBC.jl

An ODBC interface for the Julia programming language
https://odbc.juliadatabases.org/stable
Other
106 stars 63 forks source link

Don't index past the end of our buffer #308

Closed quinnj closed 4 years ago

quinnj commented 4 years ago

Attempt at fixing #306. It's a little unclear what's going on here; for some reason, our length indicator is coming back with a value of 12, even though the column size told us it wouldn't be more than 11 bytes. I think we're correctly incrementing the columnsize of Dec64 by 1 because the C storage is SQL_C_CHAR, but yeah, I don't understand why it's coming back w/ more bytes that we're expecting.

My main worry with this fix is if we're actually missing a byte that should be included in the final Dec64 number, but this should at least allow us to materialize the full result.

codecov[bot] commented 4 years ago

Codecov Report

Merging #308 into master will decrease coverage by 0.10%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #308      +/-   ##
==========================================
- Coverage   78.42%   78.31%   -0.11%     
==========================================
  Files           6        6              
  Lines         760      761       +1     
==========================================
  Hits          596      596              
- Misses        164      165       +1     
Impacted Files Coverage Δ
src/dbinterface.jl 93.67% <100.00%> (ø)
src/API.jl 67.07% <0.00%> (-0.28%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c398546...6005354. Read the comment docs.