diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-03-29 17:33:15 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-03-30 13:22:34 -0400 |
commit | 25d43de2204dadb2cf2a4bf7eed3a7d374fc98db (patch) | |
tree | ed322bedad565c76af00a2ee5c9a3a7991acf1ca /src/mongo/s/s_only.cpp | |
parent | 165f6ec707de7ec1e4e3f37e60c317221f6a26d0 (diff) | |
download | mongo-25d43de2204dadb2cf2a4bf7eed3a7d374fc98db.tar.gz |
SERVER-23414 Get rid of Command::runAgainstRegistered
Diffstat (limited to 'src/mongo/s/s_only.cpp')
-rw-r--r-- | src/mongo/s/s_only.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mongo/s/s_only.cpp b/src/mongo/s/s_only.cpp index ce2e049f468..dddb4a23de2 100644 --- a/src/mongo/s/s_only.cpp +++ b/src/mongo/s/s_only.cpp @@ -145,31 +145,6 @@ void Command::execCommandClientBasic(OperationContext* txn, appendCommandStatus(result, ok, errmsg); } -void Command::runAgainstRegistered(OperationContext* txn, - const char* ns, - BSONObj& jsobj, - BSONObjBuilder& anObjBuilder, - int queryOptions) { - // It should be impossible for this uassert to fail since there should be no way to get - // into this function with any other collection name. - uassert(16618, - "Illegal attempt to run a command against a namespace other than $cmd.", - nsToCollectionSubstring(ns) == "$cmd"); - - BSONElement e = jsobj.firstElement(); - std::string commandName = e.fieldName(); - Command* c = e.type() ? Command::findCommand(commandName) : NULL; - if (!c) { - Command::appendCommandStatus( - anObjBuilder, false, str::stream() << "no such cmd: " << commandName); - anObjBuilder.append("code", ErrorCodes::CommandNotFound); - Command::unknownCommands.increment(); - return; - } - - execCommandClientBasic(txn, c, cc(), queryOptions, ns, jsobj, anObjBuilder); -} - void Command::registerError(OperationContext* txn, const DBException& exception) {} } // namespace mongo |