Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60

Cursor .next() broken in db.eval

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.9.3
    • Affects Version/s: 0.9.3
    • Component/s: JavaScript
    • None
    • Environment:
      Running mongodb-linux-x86_64-2009-05-20

      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().

        1. mongodb.log.txt
          3 kB
        2. mongo_shell.log.txt
          0.9 kB

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            goosmurf Yun Huang Yong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: