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:
parent
bde8261ffb
commit
96724b5159
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user