[SERVER-2258] empty array matches itself without index, but not with index Created: 20/Dec/10  Updated: 12/Jul/16  Resolved: 01/Aug/11

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: 1.9.2

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

Issue Links:
Depends
is depended on by SERVER-2245 $or deduping should use IndexSpec get... Closed
is depended on by SERVER-3375 key generation fixes master ticket Closed
Operating System: ALL
Participants:

 Description   

> db.c.drop();
true
> db.c.save(

{a:[]}

);
> db.c.ensureIndex(

{a:1}

);
> db.c.find(

{a:[]}

);
> db.c.find(

{a:[]}

).hint( {$natural:1} );

{ "_id" : ObjectId("4d0fba6fc6237b412f53adeb"), "a" : [ ] }

> db.c.find(

{a:[]}

).hint(

{a:1}

);



 Comments   
Comment by auto [ 31/Jul/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-2258 test
Branch: master
https://github.com/mongodb/mongo/commit/ec1ea9cfaa71557ed8df2ea42e5acef5c1a169f2

Comment by auto [ 31/Jul/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-2258 specify 'undefined' for empty array index bounds
Branch: master
https://github.com/mongodb/mongo/commit/8d324fca47193e58da4a82ff6fe401f1fc4c8e03

Comment by Aaron Staple [ 07/Jun/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-2343 SERVER-1943 test
https://github.com/mongodb/mongo/commit/02162fa52bccc9314aed2a7f78caee78149d7d7f

Comment by Aaron Staple [ 25/Mar/11 ]

When we fix this we should fix

db.c.find( {a:{$in:[[]]}} ).hint(

{a:1}

)

as well

Generated at Thu Feb 08 02:59:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.