Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-486

.limit return more than limited value

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.34
    • Affects Version/s: 2.0.33
    • Component/s: None
    • Environment:
      Mac OS 10.10.3, Mongodb 3.0.3, Nodejs v0.10.35

      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(); }

      );
      });
      ````

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            kievechua Chua Kiem Fai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: