diff options
Diffstat (limited to 'src/mongo/db')
18 files changed, 18 insertions, 18 deletions
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp index 28cb6ec3c62..42fdc99ad0b 100644 --- a/src/mongo/db/commands.cpp +++ b/src/mongo/db/commands.cpp @@ -128,7 +128,7 @@ void CommandHelpers::uassertNoDocumentSequences(StringData commandName, request.sequences.empty()); } -std::string CommandHelpers::parseNsFullyQualified(StringData dbname, const BSONObj& cmdObj) { +std::string CommandHelpers::parseNsFullyQualified(const BSONObj& cmdObj) { BSONElement first = cmdObj.firstElement(); uassert(ErrorCodes::BadValue, str::stream() << "collection name has invalid type " << typeName(first.type()), diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index 01e8a41ffbb..6d4f9fb5b21 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -63,7 +63,7 @@ class Document; struct CommandHelpers { // The type of the first field in 'cmdObj' must be mongo::String. The first field is // interpreted as a collection name. - static std::string parseNsFullyQualified(StringData dbname, const BSONObj& cmdObj); + static std::string parseNsFullyQualified(const BSONObj& cmdObj); // The type of the first field in 'cmdObj' must be mongo::String or Symbol. // The first field is interpreted as a collection name. diff --git a/src/mongo/db/commands/clone_collection.cpp b/src/mongo/db/commands/clone_collection.cpp index a77d1896459..96e99496b90 100644 --- a/src/mongo/db/commands/clone_collection.cpp +++ b/src/mongo/db/commands/clone_collection.cpp @@ -72,7 +72,7 @@ public: } virtual std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } virtual Status checkAuthForCommand(Client* client, diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index 15187ac16e4..ef40fe96ce3 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -676,7 +676,7 @@ public: class CmdDatasize : public ErrmsgCommandDeprecated { virtual string parseNs(const string& dbname, const BSONObj& cmdObj) const { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } public: diff --git a/src/mongo/db/s/check_sharding_index_command.cpp b/src/mongo/db/s/check_sharding_index_command.cpp index b638c9a0e7d..f87b527ec28 100644 --- a/src/mongo/db/s/check_sharding_index_command.cpp +++ b/src/mongo/db/s/check_sharding_index_command.cpp @@ -80,7 +80,7 @@ public: } virtual std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool errmsgRun(OperationContext* opCtx, diff --git a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp index 5756821d11e..a3881e2626b 100644 --- a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp @@ -114,7 +114,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp b/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp index d82b1bcc52b..49395670c9c 100644 --- a/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp @@ -68,7 +68,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/config/configsvr_create_collection_command.cpp b/src/mongo/db/s/config/configsvr_create_collection_command.cpp index 8745aeff00a..19c462adc02 100644 --- a/src/mongo/db/s/config/configsvr_create_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_create_collection_command.cpp @@ -89,7 +89,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp index a4b12e6f78a..18e35523a96 100644 --- a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp @@ -86,7 +86,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp b/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp index 91c7fe9de31..3de90801559 100644 --- a/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp @@ -95,7 +95,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp index f82925c61e4..b88978aecd7 100644 --- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp @@ -721,7 +721,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp index fe3a6824087..fb2a8ab7893 100644 --- a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp @@ -93,7 +93,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp b/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp index bd3d203ea53..2747f16eca2 100644 --- a/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp +++ b/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp @@ -80,7 +80,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } Status checkAuthForCommand(Client* client, diff --git a/src/mongo/db/s/get_shard_version_command.cpp b/src/mongo/db/s/get_shard_version_command.cpp index c722ae3eb65..325a7fbc5fc 100644 --- a/src/mongo/db/s/get_shard_version_command.cpp +++ b/src/mongo/db/s/get_shard_version_command.cpp @@ -79,7 +79,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/merge_chunks_command.cpp b/src/mongo/db/s/merge_chunks_command.cpp index 7d523de8854..2405dbc5620 100644 --- a/src/mongo/db/s/merge_chunks_command.cpp +++ b/src/mongo/db/s/merge_chunks_command.cpp @@ -308,7 +308,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool adminOnly() const override { diff --git a/src/mongo/db/s/move_chunk_command.cpp b/src/mongo/db/s/move_chunk_command.cpp index e55a4b00402..cb1fa99fc2c 100644 --- a/src/mongo/db/s/move_chunk_command.cpp +++ b/src/mongo/db/s/move_chunk_command.cpp @@ -104,7 +104,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool run(OperationContext* opCtx, diff --git a/src/mongo/db/s/split_chunk_command.cpp b/src/mongo/db/s/split_chunk_command.cpp index b1ee8b1f822..f9084e4cfd7 100644 --- a/src/mongo/db/s/split_chunk_command.cpp +++ b/src/mongo/db/s/split_chunk_command.cpp @@ -87,7 +87,7 @@ public: } std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::parseNsFullyQualified(cmdObj); } bool errmsgRun(OperationContext* opCtx, diff --git a/src/mongo/db/s/split_vector_command.cpp b/src/mongo/db/s/split_vector_command.cpp index 313978eef5b..a3f275f046e 100644 --- a/src/mongo/db/s/split_vector_command.cpp +++ b/src/mongo/db/s/split_vector_command.cpp @@ -80,7 +80,7 @@ public: } std::string parseNs(const string& dbname, const BSONObj& cmdObj) const override { - return CommandHelpers::CommandHelpers::parseNsFullyQualified(dbname, cmdObj); + return CommandHelpers::CommandHelpers::parseNsFullyQualified(cmdObj); } bool errmsgRun(OperationContext* opCtx, |