Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13079

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

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

      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 Unassigned
            Reporter:
            andrew.emil@10gen.com Andrew Emil (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: