Invalid queries accepted by delete command for collection that doesn't exist

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.6.0-rc0
    • Component/s: Write Ops
    • Query
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.exists.insert({})
      WriteResult({ "nInserted" : 1 })
      > db.exists.runCommand('delete', {deletes: [{q:{$invalid: true}, limit:0}]})
      {
              "ok" : 1,
              "n" : 0,
              "writeErrors" : [
                      {
                              "index" : 0,
                              "code" : 17218,
                              "errmsg" : "Can't canonicalize query { $invalid: true }"
                      }
              ]
      }
      > db.doesnt_exist.runCommand('delete', {deletes: [{q:{$invalid: true}, limit:0}]})
      { "ok" : 1, "n" : 0 }
      

              Assignee:
              Backlog - Query Team (Inactive)
              Reporter:
              Mathias Stearn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: