diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp index 335d9ed..be483ba 100644 --- a/db/dbcommands.cpp +++ b/db/dbcommands.cpp @@ -862,6 +862,7 @@ namespace mongo { "{ create: [, capped: , size: , max: ] }"; } virtual bool run(const string& dbname , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl ) { + uassert(15888, "must pass name of collection to create", cmdObj.firstElement().valuestrsafe()[0] != '\0'); string ns = dbname + '.' + cmdObj.firstElement().valuestr(); string err; uassert(14832, "specify size: when capped is true", !cmdObj["capped"].trueValue() || cmdObj["size"].isNumber() || cmdObj.hasField("$nExtents"));