summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/mock/mock_dbclient_cursor.h
diff options
context:
space:
mode:
authorTad Marshall <tad@10gen.com>2012-12-08 14:50:16 -0500
committerTad Marshall <tad@10gen.com>2012-12-08 14:55:59 -0500
commitbe0a3384012985ed2f8b0b568b93628bcb0c2ec8 (patch)
tree0af8afeceb0d6f4773a0841fb1843cbc3db85d0f /src/mongo/dbtests/mock/mock_dbclient_cursor.h
parentc5b21478da310c15fca13f1b69e93e83418796ea (diff)
downloadmongo-be0a3384012985ed2f8b0b568b93628bcb0c2ec8.tar.gz
SERVER-7865 Make copy of resultSet to be owned by mock cursor
Store a copy of the result set returned by a mock query in the MockDBClientCursor so that the data is not freed when the temporaries go out of scope. The copy will be freed when the MockDBClientCursor is destroyed.
Diffstat (limited to 'src/mongo/dbtests/mock/mock_dbclient_cursor.h')
-rw-r--r--src/mongo/dbtests/mock/mock_dbclient_cursor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/dbtests/mock/mock_dbclient_cursor.h b/src/mongo/dbtests/mock/mock_dbclient_cursor.h
index 463c0be016b..454a2a61288 100644
--- a/src/mongo/dbtests/mock/mock_dbclient_cursor.h
+++ b/src/mongo/dbtests/mock/mock_dbclient_cursor.h
@@ -36,5 +36,6 @@ namespace mongo {
private:
boost::scoped_ptr<mongo::DBClientMockCursor> _cursor;
+ mongo::BSONObj _resultSet;
};
}