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

Assertion failed on update()

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.0.7
    • Shell, Usability
    • None
    • Windows XP Professional, Service Pack 3, 32-bit
    • ALL

    Description

      Assertion is received when update() is not supplied any parameters. This should be an error instead.

      Here is an example in mongo shell:
      > d
      pcat.products
      > d.update()
      assert failed : need a query
      Error("Printing Stack Trace")@:0
      ()@shell/utils.js:35
      ("assert failed : need a query")@shell/utils.js:46
      (undefined,"need a query")@shell/utils.js:54
      ()@shell/collection.js:188
      @(shell):1

      Wed Oct 31 00:41:29 uncaught exception: assert failed : need a query
      > db.getLastError()
      null
      > db.getLastErrorObj()

      { "n" : 0, "connectionId" : 4, "err" : null, "ok" : 1 }

      >

      Attachments

        Activity

          People

            david.hows David Hows
            dabest1 dabest1
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: