-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0.33
-
Component/s: None
-
Environment:Mac OS 10.10.3, Mongodb 3.0.3, Nodejs v0.10.35
-
Empty show more show less
The document using skip and limit should return 30016, but it return 31000 instead.
I've tested on Mongodb 2.6.5/2.6.7/3.0.3
So far node-mongodb-native > 2.0.2 is effected
1.4.38/1.4.26 is fine.
````
var MongoClient = require('mongodb');
MongoClient.connect('mongodb://localhost:27017/MyDB', function(err, db) {
console.log('Connected correctly to server');
var collection = db.collection('MyCollection');
collection.find({}).limit(30016).skip(30016).toArray(function(err, docs)
{ console.log(docs.length); db.close(); });
});
````