summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo
diff options
context:
space:
mode:
authorMatt Kangas <matt.kangas@mongodb.com>2014-12-02 10:40:19 -0500
committerMatt Kangas <matt.kangas@mongodb.com>2015-01-08 15:53:20 -0500
commit2f816f16726fae730731a649971f256188acd2b0 (patch)
tree545f2e43aa2a0a11792a0becb4b5a48d2e829968 /src/mongo/db/geo
parentf52a4ad8e5813f25bf60357978f8b08e16864bbb (diff)
downloadmongo-2f816f16726fae730731a649971f256188acd2b0.tar.gz
SERVER-16260 Accept Symbol BSON type arg for some commands
Followup to SERVER-16072 Add dbtest for commands that accept Symbol BSON type as collection name - Includes SConscript tweak to link missing "touch" command into dbtest
Diffstat (limited to 'src/mongo/db/geo')
-rw-r--r--src/mongo/db/geo/haystack.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mongo/db/geo/haystack.cpp b/src/mongo/db/geo/haystack.cpp
index 7b0257d43a1..6d416721530 100644
--- a/src/mongo/db/geo/haystack.cpp
+++ b/src/mongo/db/geo/haystack.cpp
@@ -69,13 +69,8 @@ namespace mongo {
bool run(OperationContext* txn, const string& dbname, BSONObj& cmdObj, int,
string& errmsg, BSONObjBuilder& result, bool fromRepl) {
- const std::string coll = cmdObj.firstElement().valuestrsafe();
- if (coll.empty()) {
- errmsg = "no collection name specified";
- return false;
- }
+ const std::string ns = parseNsCollectionRequired(dbname, cmdObj);
- const std::string ns = dbname + "." + coll;
AutoGetCollectionForRead ctx(txn, ns);
Collection* collection = ctx.getCollection();