[SERVER-3728] Indexing an array can change query results Created: 30/Aug/11  Updated: 11/Jul/16  Resolved: 31/Aug/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.8.3
Fix Version/s: 1.9.1

Type: Bug Priority: Major - P3
Reporter: Bryon Ross Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Participants:

 Description   

Creating an index on an array can cause documents to be omitted from query results.

Reproduction steps:
> doc =

{ _id : 1, arr : [] }

;

{ "_id" : 1, "arr" : [ ] }

> db.test.insert(doc);
> db.test.findOne(doc);

{ "_id" : 1, "arr" : [ ] }

> db.test.ensureIndex(

{ arr : 1 }

);
> db.test.findOne(doc);
null



 Comments   
Comment by Eliot Horowitz (Inactive) [ 31/Aug/11 ]

this was already fixed in 1.9.1

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