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

Change in matching null against undefined in 2.5 vs 2.4

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.4
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Minor Change
    • ALL

      Not sure if this is intentional or not.

      Setup:

      > db.z.drop()
      true
      > db.z.insert({})
      > db.z.insert({a:null})
      > db.z.insert({a:undefined})
      

      2.4:

      > db.z.find({a:null})
      { "_id" : ObjectId("521bc5133f824429a66880d6") }
      { "_id" : ObjectId("521bc5153f824429a66880d7"), "a" : null }
      

      2.5:

      > db.z.find({a:null})
      { "_id" : ObjectId("521bc5133f824429a66880d6") }
      { "_id" : ObjectId("521bc5153f824429a66880d7"), "a" : null }
      { "_id" : ObjectId("521bc5183f824429a66880d8"), "a" : null } // really undefined
      

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: