From b07f96535de47c2da6700074e79ce0ee6eb1ae21 Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Fri, 9 Dec 2016 17:19:48 -0500 Subject: SERVER-27381 Remove DBConfig::dropDatabase --- src/mongo/db/commands/dbcommands.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/commands') diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index 5eea6f7e39f..31d621c788c 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -188,7 +188,8 @@ public: string& errmsg, BSONObjBuilder& result) { // disallow dropping the config database - if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer && (dbname == "config")) { + if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer && + (dbname == NamespaceString::kConfigDb)) { return appendCommandStatus(result, Status(ErrorCodes::IllegalOperation, "Cannot drop 'config' database if mongod started " @@ -197,7 +198,7 @@ public: if ((repl::getGlobalReplicationCoordinator()->getReplicationMode() != repl::ReplicationCoordinator::modeNone) && - (dbname == "local")) { + (dbname == NamespaceString::kLocalDb)) { return appendCommandStatus(result, Status(ErrorCodes::IllegalOperation, "Cannot drop 'local' database while replication " -- cgit v1.2.1