summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/dbcommands.cpp
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2023-02-21 23:06:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-26 22:02:09 +0000
commit728500f59d1a6be4fd95b8ffa7d3c7dd122b25be (patch)
tree4cdad6c26d4ab2290e18cf77f11824a1d0144ac6 /src/mongo/db/commands/dbcommands.cpp
parent4fa82ec65ce017b254a14cecafb0ac97bdcb141e (diff)
downloadmongo-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.cpp4
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");