summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-08-02 15:05:41 -0400
committerEliot Horowitz <eliot@10gen.com>2010-08-02 15:05:41 -0400
commit85c5f3f72fde6b10b74e8f3bbb7c336c239fc6c0 (patch)
tree987c3789c7e4c089bfbb69080172449e473f3887
parentfbf29ae5fdf303573bc6b2f6a7abb7e32500b1b5 (diff)
downloadmongo-85c5f3f72fde6b10b74e8f3bbb7c336c239fc6c0.tar.gz
some query asserts
-rw-r--r--s/chunk.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/s/chunk.cpp b/s/chunk.cpp
index 870e7aaa916..ed22971edb1 100644
--- a/s/chunk.cpp
+++ b/s/chunk.cpp
@@ -454,6 +454,7 @@ namespace mongo {
int n;
{
auto_ptr<DBClientCursor> c = conn->query(_manager->getns(), q, maxCount, 0, &fields);
+ assert( c.get() );
n = c->itcount();
}
conn.done();
@@ -628,6 +629,7 @@ namespace mongo {
auto_ptr<DBClientCursor> cursor = conn->query(temp.getNS(), QUERY("ns" << _ns).sort("lastmod",1), 0, 0, 0, 0,
(DEBUG_BUILD ? 2 : 1000000)); // batch size. Try to induce potential race conditions in debug builds
+ assert( cursor.get() );
while ( cursor->more() ){
BSONObj d = cursor->next();
if ( d["isMaxMarker"].trueValue() ){
@@ -988,6 +990,7 @@ namespace mongo {
ScopedDbConnection conn( temp.modelServer() );
auto_ptr<DBClientCursor> cursor = conn->query(temp.getNS(), QUERY("ns" << _ns).sort("lastmod",1), 1 );
+ assert( cursor.get() );
BSONObj o;
if ( cursor->more() )
o = cursor->next();