BufferStream.prototype.assertBytesAvailable = function(amountNeeded) {
if (amountNeeded + this._offset > this._buffer.length) {
console.log('Need %d, length %d', amountNeeded + this._offset, this._buffer.length);
throw new BufferStream.StreamIndexOutOfBoundsError('Index out of bounds');
}
};
For example:
create table dummy_g (name varchar(MAX))
var stmt = conn.createStatement('select name from dummy_g');
stmt.on('row', function(row) {
console.log(row)
...
Will throw error with console log : Need 1429773, length 218 ( The log is removed in the master copy of code)
BufferStream.prototype.assertBytesAvailable = function(amountNeeded) { if (amountNeeded + this._offset > this._buffer.length) { console.log('Need %d, length %d', amountNeeded + this._offset, this._buffer.length); throw new BufferStream.StreamIndexOutOfBoundsError('Index out of bounds'); } };
For example:
create table dummy_g (name varchar(MAX))
var stmt = conn.createStatement('select name from dummy_g');
stmt.on('row', function(row) { console.log(row) ... Will throw error with console log : Need 1429773, length 218 ( The log is removed in the master copy of code)
Can this be fixed? Similar discussion : https://github.com/cretz/node-tds/issues/5