summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuoxin Xu <ruoxin.xu@mongodb.com>2022-05-06 16:11:22 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-07 13:47:54 +0000
commita4e55674d1f463f04ae3eb34ddf656f78bbec4ab (patch)
tree89a665a7047756e9c257ff9e2bdd83aacc687b11
parentbdb54b6d65a6b9865de47cc24e0f9b577705b06d (diff)
downloadmongo-a4e55674d1f463f04ae3eb34ddf656f78bbec4ab.tar.gz
SERVER-66209 Make BSONObjs owned when constructing a DebugInfo
(cherry picked from commit 5c38a29c5b658138e95df95dbd32710198b3be49)
-rw-r--r--src/mongo/db/exec/plan_cache_util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/exec/plan_cache_util.cpp b/src/mongo/db/exec/plan_cache_util.cpp
index 166e01ba6d6..bc724353632 100644
--- a/src/mongo/db/exec/plan_cache_util.cpp
+++ b/src/mongo/db/exec/plan_cache_util.cpp
@@ -110,9 +110,9 @@ plan_cache_debug_info::DebugInfo buildDebugInfo(
plan_cache_debug_info::CreatedFromQuery createdFromQuery =
plan_cache_debug_info::CreatedFromQuery{
- findCommand.getFilter(),
- findCommand.getSort(),
- projBuilder.obj(),
+ findCommand.getFilter().getOwned(),
+ findCommand.getSort().getOwned(),
+ projBuilder.obj().getOwned(),
query.getCollator() ? query.getCollator()->getSpec().toBSON() : BSONObj()};
return {std::move(createdFromQuery), std::move(decision)};