Skip to content

Commit 390da84

Browse files
committed
[CONJS-303] DMLs are not returning any output when streaming #293
1 parent 9086a6a commit 390da84

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/cmd/parser.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ class Parser extends Command {
192192
}
193193
}
194194
}
195+
196+
if (this.inStream) {
197+
this.handleNewRows(okPacket);
198+
}
195199
if (!mustRedirect) {
196200
if (
197201
info.redirectRequest &&

test/integration/test-resultset-streaming.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ describe('results-set streaming', () => {
3333
assert.equal(10000, currRow);
3434
});
3535

36+
it('Streaming Update for-await-of', async function () {
37+
let currRow = 0;
38+
const stream = shareConn.queryStream('DO 1');
39+
for await (const row of stream) {
40+
console.log(row);
41+
currRow++;
42+
}
43+
assert.equal(1, currRow);
44+
});
45+
3646
it('Streaming Error', function (done) {
3747
const stream = shareConn.queryStream('wrong');
3848
stream.on('error', (error) => {

0 commit comments

Comments
 (0)