summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/geo/haystack.cpp2
-rw-r--r--src/mongo/db/instance.cpp4
-rw-r--r--src/mongo/db/instance.h2
-rw-r--r--src/mongo/s/d_chunk_manager.cpp2
-rw-r--r--src/mongo/util/assert_util.cpp3
-rw-r--r--src/mongo/util/bufreader.h2
6 files changed, 8 insertions, 7 deletions
diff --git a/src/mongo/db/geo/haystack.cpp b/src/mongo/db/geo/haystack.cpp
index 104665087f6..13e4863d043 100644
--- a/src/mongo/db/geo/haystack.cpp
+++ b/src/mongo/db/geo/haystack.cpp
@@ -264,7 +264,7 @@ namespace mongo {
GeoHaystackSearchCommand() : Command( "geoSearch" ) {}
virtual LockType locktype() const { return READ; }
bool slaveOk() const { return true; }
- bool slaveOverrideOk() const { return true; }
+ bool slaveOverrideOk() { return true; }
bool run(const string& dbname , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl) {
string ns = dbname + "." + cmdObj.firstElement().valuestr();
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp
index c8f8c6ea85b..5aaf3c8ae85 100644
--- a/src/mongo/db/instance.cpp
+++ b/src/mongo/db/instance.cpp
@@ -808,10 +808,10 @@ namespace mongo {
}
auto_ptr<DBClientCursor> DBDirectClient::query(const string &ns, Query query, int nToReturn , int nToSkip ,
- const BSONObj *fieldsToReturn , int queryOptions ) {
+ const BSONObj *fieldsToReturn , int queryOptions , int batchSize) {
//if ( ! query.obj.isEmpty() || nToReturn != 0 || nToSkip != 0 || fieldsToReturn || queryOptions )
- return DBClientBase::query( ns , query , nToReturn , nToSkip , fieldsToReturn , queryOptions );
+ return DBClientBase::query( ns , query , nToReturn , nToSkip , fieldsToReturn , queryOptions , batchSize );
//
//assert( query.obj.isEmpty() );
//throw UserException( (string)"yay:" + ns );
diff --git a/src/mongo/db/instance.h b/src/mongo/db/instance.h
index 9dde729997d..c4089bbda66 100644
--- a/src/mongo/db/instance.h
+++ b/src/mongo/db/instance.h
@@ -129,7 +129,7 @@ namespace mongo {
class DBDirectClient : public DBClientBase {
public:
virtual auto_ptr<DBClientCursor> query(const string &ns, Query query, int nToReturn = 0, int nToSkip = 0,
- const BSONObj *fieldsToReturn = 0, int queryOptions = 0);
+ const BSONObj *fieldsToReturn = 0, int queryOptions = 0, int batchSize = 0);
virtual bool isFailed() const {
return false;
diff --git a/src/mongo/s/d_chunk_manager.cpp b/src/mongo/s/d_chunk_manager.cpp
index 82a06f61f2c..690e572a20f 100644
--- a/src/mongo/s/d_chunk_manager.cpp
+++ b/src/mongo/s/d_chunk_manager.cpp
@@ -210,7 +210,7 @@ namespace mongo {
ostringstream os;
os << "ranges differ, "
<< "requested: " << min << " -> " << max << " "
- << "existing: " << (it == _chunksMap.end()) ? "<empty>" : it->first.toString() + " -> " + it->second.toString();
+ << "existing: " << ((it == _chunksMap.end()) ? "<empty>" : it->first.toString() + " -> " + it->second.toString());
uasserted( 13587 , os.str() );
}
}
diff --git a/src/mongo/util/assert_util.cpp b/src/mongo/util/assert_util.cpp
index 7e0f80dad48..f4ce9ba66cf 100644
--- a/src/mongo/util/assert_util.cpp
+++ b/src/mongo/util/assert_util.cpp
@@ -85,7 +85,8 @@ namespace mongo {
static time_t lastWhen;
static unsigned lastLine;
if( lastLine == line && time(0)-lastWhen < 5 ) {
- if( rateLimited++ == 0 ) {
+ if( !rateLimited ) {
+ rateLimited = true;
log() << "rate limiting wassert" << endl;
}
return;
diff --git a/src/mongo/util/bufreader.h b/src/mongo/util/bufreader.h
index 53f0ba744e2..58257ce011d 100644
--- a/src/mongo/util/bufreader.h
+++ b/src/mongo/util/bufreader.h
@@ -29,7 +29,7 @@ namespace mongo {
class eof : public std::exception {
public:
eof() { }
- virtual const char * what() { return "BufReader eof"; }
+ virtual const char * what() const throw() { return "BufReader eof"; }
};
BufReader(const void *p, unsigned len) : _start(p), _pos(p), _end(((char *)_pos)+len) { }