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

Arrays with undefined values silently truncated on insert

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.6.2
    • Component/s: JavaScript
    • None
    • Environment:
      1.6.2 server on Win7 x64 ; client 1.6.3 on Ubuntu 10.04 server x86
    • ALL
    • Platforms F (01/29/16)

      When inserting arrays that contain undefined elements, the first undefined element is turned to null & the rest of the array is silently truncated.

      for example:

      db.harbl.drop();
      a = [1];
      a[5] = 1;
      printjson(a);
      db.harbl.insert(

      {a:a}

      );
      db.harbl.find();

            Assignee:
            mira.carey@mongodb.com Mira Carey
            Reporter:
            seanm@instantaction.com Sean McKeon
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: