0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

don't log create collection if on replication side SERVER-1707

This commit is contained in:
Eliot Horowitz 2010-08-31 11:17:58 -04:00
parent bde8261ffb
commit 96724b5159

View File

@ -648,10 +648,10 @@ namespace mongo {
virtual void help( stringstream& help ) const {
help << "create a collection";
}
virtual bool run(const string& dbname , BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool) {
virtual bool run(const string& dbname , BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool fromRepl ) {
string ns = dbname + '.' + cmdObj.firstElement().valuestr();
string err;
bool ok = userCreateNS(ns.c_str(), cmdObj, err, true);
bool ok = userCreateNS(ns.c_str(), cmdObj, err, ! fromRepl );
if ( !ok && !err.empty() )
errmsg = err;
return ok;