Cursor .next() broken in db.eval

XMLWordPrintableJSON

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

      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 Horowitz (Inactive)
            Reporter:
            Yun Huang Yong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: