[SERVER-9149] dropIndexes() in the shell does not check for arguments Created: 27/Mar/13  Updated: 11/Jul/16  Resolved: 28/Mar/13

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.4.1
Fix Version/s: 2.5.0

Type: Improvement Priority: Minor - P4
Reporter: Steve Briskin (Inactive) Assignee: Steve Briskin (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

If someone wants to drop a single index and mistakenly runs dropIndexes(<index>) rather than dropIndex(<index>), they will drop all non-_id indexes.

I think dropIndexes() should throw an exception if an argument is passed, like dropDatabase() does.



 Comments   
Comment by auto [ 28/Mar/13 ]

Author:

{u'date': u'2013-03-28T13:31:14Z', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}

Message: SERVER-9149: dropIndexes() checks for parameters

Signed-off-by: Ian Whalen <ian.whalen@gmail.com>
Branch: master
https://github.com/mongodb/mongo/commit/0aa0d6b3794f5cd963ef5508b672fd03db6aa5c5

Comment by Steve Briskin (Inactive) [ 28/Mar/13 ]

pull request: https://github.com/mongodb/mongo/pull/404

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