[SERVER-7520] Assertion failed on update() Created: 31/Oct/12  Updated: 11/Jul/16  Resolved: 03/Sep/13

Status: Closed
Project: Core Server
Component/s: Shell, Usability
Affects Version/s: 2.0.7
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: dabest1 Assignee: David Hows
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP Professional, Service Pack 3, 32-bit


Operating System: ALL
Participants:

 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 }

>



 Comments   
Comment by David Hows [ 26/Aug/13 ]

Hi Dimitriy,

What makes you think that this should be an error rather than an assertion?

Regards,
David

Generated at Thu Feb 08 03:14:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.