Skip to content

Commit 2afb3f2

Browse files
committed
Merge pull request #198 from realityfilter/master
fix(CLOB): clob values had wrong values
2 parents c1864a0 + 5980b35 commit 2afb3f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/connection.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ Local<Object> Connection::CreateV8ObjectFromRow(ExecuteBaton* baton, vector<colu
674674
int totalBytesRead = 0;
675675
while (numBytesRead != -1) {
676676
totalBytesRead += numBytesRead;
677-
columnVal.append(buffer);
677+
columnVal.append(buffer, numBytesRead);
678678
numBytesRead = instream->readBuffer(buffer, chunkSize);
679679
}
680680

@@ -807,7 +807,7 @@ void Connection::handleResult(ExecuteBaton* baton, Handle<Value> (&argv)[2]) {
807807
int totalBytesRead = 0;
808808
while (numBytesRead != -1) {
809809
totalBytesRead += numBytesRead;
810-
clobVal.append(buffer);
810+
clobVal.append(buffer, numBytesRead);
811811
numBytesRead = instream->readBuffer(buffer, chunkSize);
812812
}
813813
output->clobVal.closeStream(instream);

0 commit comments

Comments
 (0)