-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
Affects Version/s: 2.0.33
-
Component/s: None
-
Environment:mac os x 10.9.5
node v0.12.4
-
Empty show more show less
updateOne crash is occurred when a new document is inserted for
{upsert: true, w: 0},
here is the test code:
var mongo = require('mongodb'); function test(cb) { var mongoClient = new mongo.MongoClient(); mongoClient.connect('mongodb://localhost:27017/test', function (err, db) { if (err) { return cb(err); } db.collection('try').updateOne({_id:1}, {$set:{x:1}}, {upsert:true, w: 0}, function(err, result){ return cb(err, result); }) }); } test(function(err, result){ console.log(err); console.log(result); });
After execute the code,