[SERVER-12501] $lte and $not producing different results from 2.5.5-pre and 2.4 Created: 28/Jan/14  Updated: 10/Dec/14  Resolved: 03/Feb/14

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

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

Issue Links:
Duplicate
duplicates SERVER-12495 Queries with {$not: {$lt: 0}} are not... Closed
Related
Backwards Compatibility: Major Change
Operating System: ALL
Participants:

 Description   

Possible to get different results between 2.5.5-pre and 2.4 using $not and $lte operators. Seems likely to me this works with $gt, $gte, and $lte

2.4.9:

> mydb.r.insert({_id: 0})
> mydb.r.find({_id: {$not: {$lte: ISODate("9999-12-31")}}})
> mydb.r.find({_id: {$gt: ISODate("9999-12-31")}})

2.5.5-pre:

> db.r.insert({_id: 0})
SingleWriteResult({
        "writeErrors" : [ ],
        "writeConcernErrors" : [ ],
        "nInserted" : 1,
        "nUpserted" : 0,
        "nUpdated" : 0,
        "nModified" : 0,
        "nRemoved" : 0,
        "upserted" : [ ]
})
> db.r.find({_id: {$not: {$lte: ISODate("9999-12-31")}}})
{ "_id" : 0 }
> db.r.find({_id: {$gt: ISODate("9999-12-31")}})



 Comments   
Comment by Andy Schwerin [ 13/Feb/14 ]

Dan, doesn't "Backward breaking: Yes" mean that after the issue is resolved
it will have broken backward compatibility?

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