summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string.h
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2022-05-19 13:50:55 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-19 14:48:27 +0000
commit0419b6d14796177749c1921fb787a8c1d0e1faa3 (patch)
treedaff9855d2aae5cd8dceb5011b3fe1fa135448e1 /src/mongo/db/namespace_string.h
parent5b63a432d152cafcd2e8479a28754c3d51d63baf (diff)
downloadmongo-0419b6d14796177749c1921fb787a8c1d0e1faa3.tar.gz
SERVER-66028 Include tenantId when constructing namespaces for change streams agg stages
Diffstat (limited to 'src/mongo/db/namespace_string.h')
-rw-r--r--src/mongo/db/namespace_string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/namespace_string.h b/src/mongo/db/namespace_string.h
index e29f501a0df..38606ae3d4f 100644
--- a/src/mongo/db/namespace_string.h
+++ b/src/mongo/db/namespace_string.h
@@ -241,7 +241,7 @@ public:
"namespaces cannot have embedded null characters",
_ns.find('\0') == std::string::npos);
- auto db = _dotIndex == std::string::npos ? ns : ns.substr(0, _dotIndex);
+ auto db = _dotIndex == std::string::npos ? ns : ns.substr(0, ns.find('.'));
_dbName = DatabaseName(tenantId, db);
}