-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
I successfully replicated the following error reported on GG:
https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/0V8Irg2rZgI
------------------------------
i test the code in mongo shell,and php driver, get the same result
it seems like some bug happened on server
=====
> uo
{ "_id" : 80, "bag" :
, "money" : 450 }
> db.s1_users.save(uo)
> cmd
{
"findAndModify" : "s1_users",
"query" : {
"money" :
,
"bag.bm1" :
,
"_id" : 80
},
"update" : {
"$inc" :
},
"fields" :
,
"new" : true,
"upsert" : true
}
> db.runCommand(cmd)
{
"errmsg" : "exception: assertion src/mongo/db/commands/find_and_modify.cpp:184",
"code" : 0,
"ok" : 0
}
//the data was modified
db.s1_users.findOne({_id:80,'money':{'$gte':50}});
{ "_id" : 80, "bag" :
, "money" : 400 }
if i remove the query condition
"bag.bm1" :
it worked .