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

Shell doesn't handle embedded nulls correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • 2.0.3
    • None
    • JavaScript
    • None
    • ALL

    Description

      > 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.

      Attachments

        Issue Links

          Activity

            People

              tad Tad Marshall
              glenn Glenn Maynard
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: