summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/index_scan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/index_scan.cpp')
-rw-r--r--src/mongo/db/exec/index_scan.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/exec/index_scan.cpp b/src/mongo/db/exec/index_scan.cpp
index c61fc452ec7..06399c4e33b 100644
--- a/src/mongo/db/exec/index_scan.cpp
+++ b/src/mongo/db/exec/index_scan.cpp
@@ -280,7 +280,9 @@ std::unique_ptr<PlanStageStats> IndexScan::getStats() {
// Add a BSON representation of the filter to the stats tree, if there is one.
if (nullptr != _filter) {
- _commonStats.filter = _filter->serialize();
+ BSONObjBuilder bob;
+ _filter->serialize(&bob);
+ _commonStats.filter = bob.obj();
}
// These specific stats fields never change.