Skip to content

Commit 55fa93b

Browse files
committed
Revert DONE token column reset that was breaking result sets spanning multiple packets
1 parent 405bd52 commit 55fa93b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Sources/CosmoMSSQL/TDS/TDSDecoder.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,10 @@ struct TDSTokenDecoder {
186186
let _: UInt16 = buf.readInteger(endianness: .little), // curCmd
187187
let count: UInt64 = buf.readInteger(endianness: .little) // rowCount (8 bytes in TDS 7.2+)
188188
else { throw TDSError.incomplete }
189-
// Flush current rows into resultSets on any DONE token if we have columns (i.e. a result set was started)
190-
if !columns.isEmpty {
189+
// Flush current rows into resultSets on any DONE token
190+
if !currentRows.isEmpty {
191191
resultSets.append(currentRows)
192192
currentRows = []
193-
columns = [] // Reset columns for next result set
194193
}
195194
// Only trust the rowcount when the DONE_COUNT bit (0x10) is set
196195
if status & 0x10 != 0 {

0 commit comments

Comments
 (0)