diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-12-09 17:19:48 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2016-12-13 14:40:34 -0500 |
commit | b07f96535de47c2da6700074e79ce0ee6eb1ae21 (patch) | |
tree | 51c4b4b03a931b3d2d0310917537a96c36f70779 /src/mongo/db/commands | |
parent | 898c16aad31369e59e3617a3423a5e38e19eb10b (diff) | |
download | mongo-b07f96535de47c2da6700074e79ce0ee6eb1ae21.tar.gz |
SERVER-27381 Remove DBConfig::dropDatabase
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r-- | src/mongo/db/commands/dbcommands.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 " |