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

Index only query fills in missing values with null

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

      > db.bar.drop()
      false
      > db.bar.insert({_id:1})
      > db.bar.insert({_id:2})
      > db.bar.find({x:null}, {_id:1, x:1})
      { "_id" : 1 }
      { "_id" : 2 }
      > db.bar.ensureIndex({x:1, _id:1})
      > db.bar.find({x:null}, {_id:1, x:1})
      { "x" : null, "_id" : 1 }
      { "x" : null, "_id" : 2 }
      

        1. server6293.js
          0.8 kB
        2. server6293.js
          0.8 kB
        3. server6293.js
          0.5 kB

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: