diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2016-03-23 11:36:21 -0400 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2017-09-11 11:12:17 -0400 |
commit | 339c13172b6adee205d3f08a8f95e98b62792a80 (patch) | |
tree | feec7548e616cc53f268b77fc967c6921ef288d4 /src | |
parent | 8c0fd02d2dc44e3addca3e4ea9dd7292ea8b3e6f (diff) | |
download | mongo-339c13172b6adee205d3f08a8f95e98b62792a80.tar.gz |
SERVER-23191 group should pass an owned BSONObj to the reduce function
(cherry picked from commit 6adda9f7dde0bf62b9ff8d27ade8f1bb6e574fec)
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/exec/group.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/exec/group.cpp b/src/mongo/db/exec/group.cpp index 4ce1d4031db..31a72df4772 100644 --- a/src/mongo/db/exec/group.cpp +++ b/src/mongo/db/exec/group.cpp @@ -148,7 +148,8 @@ Status GroupStage::processObject(const BSONObj& obj) { } } - _scope->setObject("obj", obj, true); + BSONObj objCopy = obj.getOwned(); + _scope->setObject("obj", objCopy, true); _scope->setNumber("n", n - 1); try { |