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

.update() with incorrect arguments results in assertion failue

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

      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 Unassigned
            Reporter:
            crudson Doug Hudson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: