diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-05-19 11:54:40 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-05-19 11:54:40 -0400 |
commit | a97bf7dd78e4ae56e710cd51a84259bd065d881b (patch) | |
tree | 3fcd682c27c9c8e620b44fd9a5cd890c092b9653 | |
parent | 3a75b466c8fc5bd6719f842a2952cceb413b0197 (diff) | |
parent | f61b2c0799db59e34d9d2d52dfae6ee3a375b0aa (diff) | |
download | mongo-a97bf7dd78e4ae56e710cd51a84259bd065d881b.tar.gz |
Merge branch 'master' of git@github.com:mongodb/mongo
-rw-r--r-- | db/clientcursor.cpp | 4 | ||||
-rw-r--r-- | jstests/capped4.js | 2 | ||||
-rw-r--r-- | scripting/sm_db.cpp | 6 |
3 files changed, 7 insertions, 5 deletions
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 ); diff --git a/scripting/sm_db.cpp b/scripting/sm_db.cpp index c46838882d2..0820022077f 100644 --- a/scripting/sm_db.cpp +++ b/scripting/sm_db.cpp @@ -39,14 +39,14 @@ namespace mongo { class CursorHolder { public: CursorHolder( auto_ptr< DBClientCursor > &cursor, const shared_ptr< DBClientBase > &connection ) : - cursor_( cursor ), - connection_( connection ) { + connection_( connection ), + cursor_( cursor ) { assert( cursor_.get() ); } DBClientCursor *get() const { return cursor_.get(); } private: - auto_ptr< DBClientCursor > cursor_; shared_ptr< DBClientBase > connection_; + auto_ptr< DBClientCursor > cursor_; }; DBClientCursor *getCursor( JSContext *cx, JSObject *obj ) { |