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

$lte and $not producing different results from 2.5.5-pre and 2.4

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

      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")}})
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            andrew.emil@10gen.com Andrew Emil (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: