summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/create_command.cpp
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2023-03-29 16:29:36 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-29 19:13:28 +0000
commit4326f194dcd67e1053e7e57dae003831aacc5f2c (patch)
treeb8926e345b61498d7628cd340cc224cc610bc11b /src/mongo/db/commands/create_command.cpp
parent6759d92c8cd619d00bd522bb5ebd688a4d685fd0 (diff)
downloadmongo-4326f194dcd67e1053e7e57dae003831aacc5f2c.tar.gz
SERVER-73112 Make NamespaceString constructors private
Diffstat (limited to 'src/mongo/db/commands/create_command.cpp')
-rw-r--r--src/mongo/db/commands/create_command.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/commands/create_command.cpp b/src/mongo/db/commands/create_command.cpp
index d91ec734f08..78573ff879a 100644
--- a/src/mongo/db/commands/create_command.cpp
+++ b/src/mongo/db/commands/create_command.cpp
@@ -115,7 +115,8 @@ void checkCollectionOptions(OperationContext* opCtx,
MONGO_UNREACHABLE;
}
- auto fullNewNamespace = NamespaceString(ns.dbName(), options.viewOn);
+ auto fullNewNamespace =
+ NamespaceStringUtil::parseNamespaceFromRequest(ns.dbName(), options.viewOn);
uassert(ErrorCodes::NamespaceExists,
str::stream() << "namespace " << ns.ns() << " already exists, but is a view on "
<< view->viewOn() << " rather than " << fullNewNamespace,