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

{a: undefined} broken with index

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.5.5
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • ALL

      > db.foo.insert({})
      > db.foo.find(

      {a:undefined}

      )

      { "_id" : ObjectId("4bfd52c6deec96b27dbb35da") }

      > db.foo.ensureIndex(

      {a:1}

      )
      > db.foo.find(

      {a:undefined}

      )
      > db.foo.find(

      {a:undefined}

      ).explain()
      {
      "cursor" : "BtreeCursor a_1",
      "indexBounds" : [
      [

      { "a" : null }

      ,

      { "a" : null }

      ]
      ],
      "nscanned" : 0,
      "nscannedObjects" : 0,
      "n" : 0,
      "millis" : 0,
      "oldPlan" : {
      "cursor" : "BtreeCursor a_1",
      "indexBounds" : [
      [

      { "a" : null }

      ,

      { "a" : null }

      ]
      ]
      },
      "allPlans" : [
      {
      "cursor" : "BtreeCursor a_1",
      "indexBounds" : [
      [

      { "a" : null }

      ,

      { "a" : null }

      ]
      ]
      }
      ]
      }

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: