summaryrefslogtreecommitdiff
path: root/tools/dump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dump.cpp')
-rw-r--r--tools/dump.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/dump.cpp b/tools/dump.cpp
index 3c64659e306..27e19938173 100644
--- a/tools/dump.cpp
+++ b/tools/dump.cpp
@@ -40,7 +40,7 @@ public:
int out = open( outputFile.string().c_str() , O_WRONLY | O_CREAT | O_TRUNC , 0666 );
assert( out );
- auto_ptr<DBClientCursor> cursor = conn().query( coll.c_str() , Query().snapshot() , 0 , 0 , 0 , Option_SlaveOk | Option_NoCursorTimeout );
+ auto_ptr<DBClientCursor> cursor = conn( true ).query( coll.c_str() , Query().snapshot() , 0 , 0 , 0 , Option_SlaveOk | Option_NoCursorTimeout );
int num = 0;
while ( cursor->more() ) {
@@ -61,7 +61,7 @@ public:
string sns = db + ".system.namespaces";
- auto_ptr<DBClientCursor> cursor = conn().query( sns.c_str() , Query() , 0 , 0 , 0 , Option_SlaveOk | Option_NoCursorTimeout );
+ auto_ptr<DBClientCursor> cursor = conn( true ).query( sns.c_str() , Query() , 0 , 0 , 0 , Option_SlaveOk | Option_NoCursorTimeout );
while ( cursor->more() ) {
BSONObj obj = cursor->next();
if ( obj.toString().find( ".$" ) != string::npos )
@@ -88,7 +88,7 @@ public:
cout << "all dbs" << endl;
auth( "admin" );
- BSONObj res = conn().findOne( "admin.$cmd" , BSON( "listDatabases" << 1 ) );
+ BSONObj res = conn( true ).findOne( "admin.$cmd" , BSON( "listDatabases" << 1 ) );
BSONObj dbs = res.getField( "databases" ).embeddedObjectUserCheck();
set<string> keys;
dbs.getFieldNames( keys );