.update() with incorrect arguments results in assertion failue

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.1.0
    • Component/s: Shell
    • None
    • Environment:
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Accidentally issued wrong arguments to update(). There is no explicit check for arguments before the assertion fails.

      > db.boundaries.update({$unset:{num_shapes:1}})
      assert failed : need an object
      Error("Printing Stack Trace")@:0
      ()@src/mongo/shell/utils.js:37
      ("assert failed : need an object")@src/mongo/shell/utils.js:58
      (undefined,"need an object")@src/mongo/shell/utils.js:66
      ([object Object])@src/mongo/shell/collection.js:197
      @(shell):1

      Thu Jul 12 16:06:16 uncaught exception: assert failed : need an object

            Assignee:
            Unassigned
            Reporter:
            Doug Hudson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: