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

Index only query fills in missing values with null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
    • Operating System:
      ALL

      Description

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

        Attachments

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

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: