[SERVER-42410] Mongo Shell count helper command doesn't throw errors on invalid options Created: 25/Jul/19  Updated: 29/Oct/23  Resolved: 24/Dec/19

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 4.3.3

Type: Bug Priority: Major - P3
Reporter: Tomer Yakir Assignee: Katherine Wu (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng, qopt-team, query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-40523 Move count command to IDL Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2019-12-16, Query 2019-12-30
Participants:

 Description   

Following SERVER-40523 - running

db.manual.count({},{"random": true})

doesn't throw an error, but instead ignores the invalid option.

Running

db.runCommand({count: "manual", random: true})

does throw an error as expected.
Need to fix the shell helper command so it throws an error on invalid options.



 Comments   
Comment by Githook User [ 24/Dec/19 ]

Author:

{'name': 'Katherine Wu', 'email': 'katherine.wu@mongodb.com', 'username': 'kaywux'}

Message: SERVER-42410 mongo shell count helper command throws errors on invalid options
Branch: master
https://github.com/mongodb/mongo/commit/5aed315a24e042cd34473da49cacd5dfbe263355

Generated at Thu Feb 08 05:00:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.