[SERVER-13079] skip behavior in 2.6.0-rc1 can cause query to not return results Created: 06/Mar/14  Updated: 10/Dec/14  Resolved: 07/Mar/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.6.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Andrew Emil (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-12918 Equality queries on _id don't obey sk... Closed
Related
Operating System: ALL
Participants:

 Description   

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 }



 Comments   
Comment by hari.khalsa@10gen.com [ 07/Mar/14 ]

I think the old behavior is broken.

Comment by J Rassi [ 06/Mar/14 ]

The 2.4.9 behavior is due to bug SERVER-12918, which was fixed for 2.6.0-rc1. The current behavior is correct.

Generated at Thu Feb 08 03:30:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.