diff options
author | Randolph Tan <randolph@10gen.com> | 2013-02-14 13:50:45 -0500 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2013-02-14 14:41:26 -0500 |
commit | d710a22595c2a7ce9f393f87ea6a85b3e95a056d (patch) | |
tree | 7043ba0b2a1d45bdd5b1d3cfe564ccc4dc698cc3 /src/mongo/dbtests/mock | |
parent | d013b483c917ff4a48c002c0c0a133a1f62f55cf (diff) | |
download | mongo-d710a22595c2a7ce9f393f87ea6a85b3e95a056d.tar.gz |
SERVER-7636 Do not use cached connection when read preference changes
Fixed tests that was accessing invalidated BSON internal buffer data.
Diffstat (limited to 'src/mongo/dbtests/mock')
-rw-r--r-- | src/mongo/dbtests/mock/mock_dbclient_cursor.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/dbtests/mock/mock_dbclient_cursor.h b/src/mongo/dbtests/mock/mock_dbclient_cursor.h index 454a2a61288..9a030a0ca41 100644 --- a/src/mongo/dbtests/mock/mock_dbclient_cursor.h +++ b/src/mongo/dbtests/mock/mock_dbclient_cursor.h @@ -32,6 +32,11 @@ namespace mongo { const mongo::BSONArray& mockCollection); bool more(); + + /** + * Note: has the same contract as DBClientCursor - returned BSONObj will + * become invalid when this cursor is destroyed. + */ mongo::BSONObj next(); private: |