[SERVER-60] Cursor .next() broken in db.eval Created: 21/May/09  Updated: 12/Jul/16  Resolved: 21/May/09

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 0.9.3
Fix Version/s: 0.9.3

Type: Bug Priority: Major - P3
Reporter: Yun Huang Yong Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Running mongodb-linux-x86_64-2009-05-20


Attachments: Text File mongo_shell.log.txt     Text File mongodb.log.txt    
Participants:

 Description   

I use the following snippet to copy one collection to another for test purposes.

db.eval('for(var c = db.original.find(); c.hasNext()

{ db.copied.save(c.next()); }

')

This worked fine in the 2009-05-04 nightly (my previous running version) but appears to be broken in the latest nightly. mongod log and the accompanying shell log are attached.

It seems to crash on any reference to c.next().



 Comments   
Comment by Yun Huang Yong [ 21/May/09 ]

Confirm that this is fixed. Thanks!

Comment by Eliot Horowitz (Inactive) [ 21/May/09 ]

ok - found the culprit - it was in some mangling code we have to maintain backward compatibility.
working now

Comment by Eliot Horowitz (Inactive) [ 21/May/09 ]

why is there a syntax error

Comment by Eliot Horowitz (Inactive) [ 21/May/09 ]

can you try 05_21
should be fixed

Generated at Thu Feb 08 02:52:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.