| Steps To Reproduce: |
Build a recent mongod from the master branch (e.g. 5f7c803e8dba959e5da4135b76a1d1e05d75636d), run it and connect via mongo:
> db.runCommand({insert:"foo", documents:[ {x:1} ], bypassDocumentValidation: 1})
|
{
|
"ok" : 0,
|
"errmsg" : "Wrong type for 'bypassDocumentValidation'. Expected a bool, got a double.",
|
"code" : 14
|
}
|
> db.runCommand({insert:"foo", documents:[ {x:1} ], bypassDocumentValidation: NumberInt(1)})
|
{
|
"ok" : 0,
|
"errmsg" : "Wrong type for 'bypassDocumentValidation'. Expected a bool, got a int.",
|
"code" : 14
|
}
|
> db.runCommand({insert:"foo", documents:[ {x:1} ], bypassDocumentValidation: true})
|
{ "n" : 1, "ok" : 1 }
|
In released versions, numeric values are accepted.
|