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

bsondump doesn't escape strings correctly

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.0
    • Affects Version/s: 1.6.0
    • Component/s: Tools
    • None
    • Environment:
      MacOS X 10.6.4, 64-bit
    • ALL

      This affects double-quotes, literal carriage returns and newlines, etc.

      % mongo
      MongoDB shell version: 1.6.0
      connecting to: test
      > db.foo.insert(

      {x:"foo \"foo\" foo"}

      )
      > db.foo.find()

      { "_id" : ObjectId("4c659a8dfe7acb2308816965"), "x" : "foo \"foo\" foo" }

      % mongodump -d test -c foo
      connected to: 127.0.0.1
      DATABASE: test to dump/test
      test.foo to dump/test/foo.bson
      1 objects

      % bsondump dump/test/foo.bson
      connected to: 127.0.0.1

      { _id: ObjectId('4c659a8dfe7acb2308816965'), x: "foo "foo" foo" }

      Fri Aug 13 12:19:04 1 objects found

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            jgreely J Greely
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: