Shell doesn't handle embedded nulls correctly

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.0.3
    • Component/s: JavaScript
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.test.insert(

      {'x': 'y\u0000a'}

      )
      > db.test.find()

      { "_id" : ObjectId("4f75db6d5b92cfb811975759"), "x" : "y" }

      > db.test.find()[0].x.length
      1

      The shell sends the string to the backend correctly, and the backend stores the data correctly (it's retrieved properly in Python), but the data received is truncated. x.length is 1, so this isn't a cosmetic problem in the shell; the data is actually incorrect.

              Assignee:
              Tad Marshall
              Reporter:
              Glenn Maynard
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: