Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
None
-
None
Description
Adding a new field fails:
> p=db.playlists.findOne()
{"_id" : "4a4270125fac18127c8c858c" , "songlist" : [
]}
> p.username = "me"
me
> p
{"_id" : "4a4270125fac18127c8c858c" , "songlist" : [
] , "username" : "me"}
> db.playlists.save(p)
> p=db.playlists.find()
{"_id" : "4a4270125fac18127c8c858c" , "songlist" : [
]}
Trying it another way gives a more disastrous result:
> x = db.playlists.findOne()
{"_id" : "4a4270125fac18127c8c858c" , "songlist" : [
]}
> x["username"] = "me"
Wed Jun 24 14:32:23 JS Error: SyntaxError: missing ] in index expression (shellhelp1):0
Wed Jun 24 14:32:23 User Exception (shellhelp1) exec failed
terminate called after throwing an instance of 'mongo::UserException'
what(): (shellhelp1) exec failed
Wed Jun 24 14:32:23 mongo got signal 6 (Aborted), stack trace:
Wed Jun 24 14:32:23 0x8056acd 0xb7f0c400 0xb7f0c430 0xb7b2c8a0 0xb7b2e268 0xb7ea9778 0xb7ea7655 0xb7ea7692 0xb7ea77ca 0x8080e43 0x808ee1a 0x80587e8 0xb7b17685 0x8056401
mongo(_Z12quitAbruptlyi+0x43d) [0x8056acd]
[0xb7f0c400]
[0xb7f0c430]
/lib/tls/i686/cmov/libc.so.6(gsignal+0x50) [0xb7b2c8a0]
/lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb7b2e268]
/usr/lib/libstdc++.so.6(ZN9gnu_cxx27_verbose_terminate_handlerEv+0x158) [0xb7ea9778]
/usr/lib/libstdc++.so.6 [0xb7ea7655]
/usr/lib/libstdc++.so.6 [0xb7ea7692]
/usr/lib/libstdc++.so.6 [0xb7ea77ca]
mongo [0x8080e43]
mongo [0x808ee1a]
mongo [0x80587e8]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7b17685]
mongo [0x8056401]