mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
SERVER-3176: autoIndexId not passed if not defined to let DB decide
This commit is contained in:
parent
330cbb6841
commit
48342721bb
@ -134,10 +134,9 @@ DB.prototype.auth = function( username , pass ){
|
||||
*/
|
||||
DB.prototype.createCollection = function(name, opt) {
|
||||
var options = opt || {};
|
||||
var autoIndexId = true;
|
||||
var cmd = { create: name, capped: options.capped, size: options.size, max: options.max };
|
||||
if (options.autoIndexId != undefined)
|
||||
autoIndexId = options.autoIndexId;
|
||||
var cmd = { create: name, capped: options.capped, size: options.size, max: options.max, autoIndexId: autoIndexId };
|
||||
cmd.autoIndexId = options.autoIndexId;
|
||||
var res = this._dbCommand(cmd);
|
||||
return res;
|
||||
}
|
||||
|
@ -1831,10 +1831,9 @@ const StringData _jscode_raw_db =
|
||||
"*/\n"
|
||||
"DB.prototype.createCollection = function(name, opt) {\n"
|
||||
"var options = opt || {};\n"
|
||||
"var autoIndexId = true;\n"
|
||||
"var cmd = { create: name, capped: options.capped, size: options.size, max: options.max };\n"
|
||||
"if (options.autoIndexId != undefined)\n"
|
||||
"autoIndexId = options.autoIndexId;\n"
|
||||
"var cmd = { create: name, capped: options.capped, size: options.size, max: options.max, autoIndexId: autoIndexId };\n"
|
||||
"cmd.autoIndexId = options.autoIndexId;\n"
|
||||
"var res = this._dbCommand(cmd);\n"
|
||||
"return res;\n"
|
||||
"}\n"
|
||||
|
Loading…
Reference in New Issue
Block a user