Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpredictable and incomplete recordsets returned from request stream #76

Closed
jasonaughton opened this issue Sep 10, 2014 · 2 comments
Closed

Comments

@jasonaughton
Copy link

I'm trying to stream the results of a query that returns 250,000 rows, however I am never getting anywhere near the end. When starting from the beginning of the query results, node always stops running after 176 rows with no error indicated. When starting from row 175, I get 534 rows. There's another example in the code sample below. Any idea what might be happening here?

I'm using node-mssql 1.2.0 with node 0.10.31

sql.connect(config, function (err) {

var request = new sql.Request();
request.stream = true;
request.query('select * from data');// stops at 176 results
//request.query('select * from data where intid > 17063'); //if you start at 175th row (intid>17063), you get 534
//request.query('select * from data where intid > 500140'); //if you start at number 533rd row (intid>500140) you get 524
request.verbose = false;
var i = 1;

request.on('recordset', function (columns) {
});

request.on('row', function (row) {
    console.log(row);
    console.log(i + '');
    i++;
});

request.on('error', function (err) {
    console.log(err);
});

request.on('done', function (returnValue) {
    console.log(returnValue);
});

});

@jasonaughton
Copy link
Author

I think this is due to the segfault11 issue on 0.10.31 (nodejs/node-v0.x-archive#8208) as having changed to 0.10.30 it has gone away.

@oyvindholmstad
Copy link

Just checking in to confirm. Had some segfault issues on queries with "big" result sets, but they disappeared when going back to 0.10.30.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants