diff options
author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2022-05-06 16:11:22 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-07 13:47:54 +0000 |
commit | a4e55674d1f463f04ae3eb34ddf656f78bbec4ab (patch) | |
tree | 89a665a7047756e9c257ff9e2bdd83aacc687b11 | |
parent | bdb54b6d65a6b9865de47cc24e0f9b577705b06d (diff) | |
download | mongo-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.cpp | 6 |
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)}; |