diff --git a/tools/tool.cpp b/tools/tool.cpp index 22228e66999..d938e752041 100644 --- a/tools/tool.cpp +++ b/tools/tool.cpp @@ -383,7 +383,10 @@ namespace mongo { if ( ! ( _username.size() || _password.size() ) ) { // Make sure that we don't need authentication to connect to this db // findOne throws an AssertionException if it's not authenticated. - conn().findOne(getNS(), Query("{}")); + if (_coll.size() > 0) { + // BSONTools don't have a collection + conn().findOne(getNS(), Query("{}")); + } return; }