diff options
author | Tad Marshall <tad@10gen.com> | 2012-12-08 14:50:16 -0500 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-12-08 14:55:59 -0500 |
commit | be0a3384012985ed2f8b0b568b93628bcb0c2ec8 (patch) | |
tree | 0af8afeceb0d6f4773a0841fb1843cbc3db85d0f /src/mongo/dbtests/mock/mock_dbclient_cursor.h | |
parent | c5b21478da310c15fca13f1b69e93e83418796ea (diff) | |
download | mongo-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.h | 1 |
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; }; } |