From f0d9a01bccdaeb466c12c92057914bbfef59526c Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Thu, 15 Dec 2011 09:35:47 +0100 Subject: Imported Upstream version 2.0.2 --- tools/import.cpp | 2 +- tools/stat.cpp | 2 ++ tools/tool.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/import.cpp b/tools/import.cpp index 16980b0..bd77bcd 100644 --- a/tools/import.cpp +++ b/tools/import.cpp @@ -396,7 +396,7 @@ public: break; } len += bytesProcessed; - line += len; + line += bytesProcessed; } else { if (!parseRow(in, o, len)) { diff --git a/tools/stat.cpp b/tools/stat.cpp index 7483222..e1eda8d 100644 --- a/tools/stat.cpp +++ b/tools/stat.cpp @@ -423,6 +423,8 @@ namespace mongo { int rowCount = getParam( "rowcount" , 0 ); int rowNum = 0; + auth(); + BSONObj prev = stats(); if ( prev.isEmpty() ) return -1; diff --git a/tools/tool.cpp b/tools/tool.cpp index e8c23d5..ab464c7 100644 --- a/tools/tool.cpp +++ b/tools/tool.cpp @@ -402,7 +402,7 @@ namespace mongo { // findOne throws an AssertionException if it's not authenticated. if (_coll.size() > 0) { // BSONTools don't have a collection - conn().findOne(getNS(), Query("{}")); + conn().findOne(getNS(), Query("{}"), 0, QueryOption_SlaveOk); } return; } -- cgit v1.2.3