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

Blank lines don't work in the mongo shell starting with 2.0

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.1, 2.1.0
    • Affects Version/s: 2.0.0
    • Component/s: Shell
    • None
    • Environment:
      Windows 7 64-bit
    • Major Change
    • Windows

      The following input (with a blank line) works in mongo shell prior to 2.0:

      C:\mongodb\mongodb-win32-x86_64-1.8.2\bin>mongo
      MongoDB shell version: 1.8.2
      connecting to: test
      > var doc =

      { ... a:1, ... ... b:2 ... }

      > doc

      { "a" : 1, "b" : 2 }

      >

      But no longer works in mongo shell 2.0:

      C:\mongodb\mongodb-win32-x86_64-2.0.0\bin>mongo
      MongoDB shell version: 2.0.0
      connecting to: test
      > var doc =

      { ... a:1, ... ... b:2 > }

      Tue Sep 20 12:59:57 SyntaxError: syntax error (shell):1
      > doc
      Tue Sep 20 12:59:59 ReferenceError: doc is not defined (shell):1
      >

            Assignee:
            antoine Antoine Girbal
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: