Skip to content

Commit

Permalink
Fixed issue #8
Browse files Browse the repository at this point in the history
column.getData needs to set c.len to the "total" buffer size. Otherwise,
we will return truncated data.

SQLGetData sets c.len to the number of bytes that are copied
to the output buffer. That's correct if the output buffer is big enough
and the output data isn't truncated. If the data is truncated, we call
SQLGetData in a loop until we get all the data. Each call to SQLGetData
sets c.len to the number of bytes fetched. In the end, c.len is not the
total number of bytes fetched. Instead, it is the amount of bytes
fetched during the last call to SQLGetData. When we return the data to the
application, we only return up to c.len. Since c.len is not the total
size, the returned data is truncated. Fix it by setting c.len to the
total number of bytes fetched before returning from column.getData(...).
  • Loading branch information
asifjalil committed Feb 21, 2019
1 parent 2f6f160 commit bdc3090
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 10 deletions.
1 change: 1 addition & 0 deletions _TEST/large.del
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<XDS FIL='large.xml' />
Loading

0 comments on commit bdc3090

Please sign in to comment.