diff --git a/db/clientcursor.cpp b/db/clientcursor.cpp index 85f21059ff9..85620a787f3 100644 --- a/db/clientcursor.cpp +++ b/db/clientcursor.cpp @@ -133,12 +133,12 @@ namespace mongo { i != toAdvance.end(); ++i ) { Cursor *c = (*i)->c.get(); + c->checkLocation(); DiskLoc tmp1 = c->refLoc(); if ( tmp1 != dl ) { /* this might indicate a failure to call ClientCursor::updateLocation() */ - problem() << "warning: cursor loc does not match byLoc position!" << endl; + problem() << "warning: cursor loc " << tmp1 << " does not match byLoc position " << dl << " !" << endl; } - c->checkLocation(); c->advance(); if ( c->eof() ) { // advanced to end -- delete cursor diff --git a/jstests/capped4.js b/jstests/capped4.js index aa824bafe8a..9d4735b92f6 100644 --- a/jstests/capped4.js +++ b/jstests/capped4.js @@ -20,3 +20,5 @@ assert( !t.findOne( { i : 19 } ) ); assert( !c.hasNext() ); assert( !d.hasNext() ); assert( t.find().sort( { i : 1 } ).hint( { i : 1 } ).toArray().length > 10 ); + +assert( t.validate().valid );