skip behavior in 2.6.0-rc1 can cause query to not return results

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.6.0-rc1
    • Component/s: None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In 2.6.0-rc1 when we do a skip it may skip over all return documents and return nothing. In 2.4.9 this was not the behavior.

      2.6.0-rc1:

      > db.test.insert({_id:0})
      WriteResult({ "nInserted" : 1 })
      > db.test.find({_id:0})
      { "_id" : 0 }
      > db.test.find({_id:0}).skip(1)
      >
      

      2.4.9:

      > mydb.test.insert({_id:0})
      WriteResult({ "nInserted" : 1 })
      > mydb.test.find({_id: 0})
      { "_id" : 0 }
      > mydb.test.find({_id: 0}).skip(1)
      { "_id" : 0 }
      

              Assignee:
              Unassigned
              Reporter:
              Andrew Emil (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: