diff options
author | jannaerin <golden.janna@gmail.com> | 2023-02-21 23:06:04 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-26 22:02:09 +0000 |
commit | 728500f59d1a6be4fd95b8ffa7d3c7dd122b25be (patch) | |
tree | 4cdad6c26d4ab2290e18cf77f11824a1d0144ac6 /src/mongo/db/commands/dbcommands.cpp | |
parent | 4fa82ec65ce017b254a14cecafb0ac97bdcb141e (diff) | |
download | mongo-728500f59d1a6be4fd95b8ffa7d3c7dd122b25be.tar.gz |
SERVER-73112 Avoid constructing global namespaces directly
Diffstat (limited to 'src/mongo/db/commands/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/commands/dbcommands.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index 83a886f42c3..2e2c8e4216d 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -141,7 +141,7 @@ public: auto dbName = request().getDbName(); // disallow dropping the config database if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer && - (dbName == NamespaceString::kConfigDb)) { + (dbName == DatabaseName::kConfig)) { uasserted(ErrorCodes::IllegalOperation, "Cannot drop 'config' database if mongod started " "with --configsvr"); @@ -149,7 +149,7 @@ public: if ((repl::ReplicationCoordinator::get(opCtx)->getReplicationMode() != repl::ReplicationCoordinator::modeNone) && - (dbName == NamespaceString::kLocalDb)) { + (dbName == DatabaseName::kLocal)) { uasserted(ErrorCodes::IllegalOperation, str::stream() << "Cannot drop '" << dbName << "' database while replication is active"); |