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

Arrays with undefined values silently truncated on insert

    XMLWordPrintable

    Details

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

      Description

      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();

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jason.carey Jason Carey
              Reporter:
              seanm@instantaction.com Sean McKeon
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: