[SERVER-1874] Arrays with undefined values silently truncated on insert Created: 30/Sep/10  Updated: 19/Jul/16  Resolved: 15/Jan/16

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 1.6.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sean McKeon Assignee: Mira Carey
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

1.6.2 server on Win7 x64 ; client 1.6.3 on Ubuntu 10.04 server x86


Issue Links:
Duplicate
duplicates SERVER-22053 Insertion of Array with undefined/nul... Closed
Operating System: ALL
Sprint: Platforms F (01/29/16)
Participants:

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


Generated at Thu Feb 08 02:58:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.