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

Shell doesn't handle embedded nulls correctly

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

      > 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 Tad Marshall
            Reporter:
            glenn Glenn Maynard
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: