2.4 indexes can cause incorrect results with Infinity fields

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.4.9
    • Component/s: Index Maintenance, Querying
    • Major Change
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In 2.4 you can ensure an index and cause $gt/$gte queries to no longer match against infinity.

      2.4.9:

      > mydb.a.insert({_id: 0, a: Infinity})
      > mydb.a.find({a:{$gt: 1}})
      { "_id" : 0, "a" : Infinity }
      > mydb.a.ensureIndex({a:1})
      > mydb.a.find({a:{$gt: 1}})
      

      In 2.5.5-pre this is handled correctly:

      > db.a.insert({_id: 0, a: Infinity})
      > db.a.find({a:{$gt: 1}})
      { "_id" : 0, "a" : Infinity }
      > db.a.ensureIndex({a:1})
      > db.a.find({a:{$gt: 1}})
      { "_id" : 0, "a" : Infinity }
      

              Assignee:
              Benety Goh
              Reporter:
              Andrew Emil (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: