summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-12-15 09:35:47 +0100
committerAntonin Kral <a.kral@bobek.cz>2011-12-15 09:35:47 +0100
commitf0d9a01bccdaeb466c12c92057914bbfef59526c (patch)
tree7679efa1f0daf7d1d906882a15dc77af6b7aef32 /tools
parent5d342a758c6095b4d30aba0750b54f13b8916f51 (diff)
downloadmongodb-f0d9a01bccdaeb466c12c92057914bbfef59526c.tar.gz
Imported Upstream version 2.0.2
Diffstat (limited to 'tools')
-rw-r--r--tools/import.cpp2
-rw-r--r--tools/stat.cpp2
-rw-r--r--tools/tool.cpp2
3 files changed, 4 insertions, 2 deletions
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;
}