hpcc-systems/HPCC-Platform — Issue #1634: STORED with child records issues
Author: richardkchapman
Created: 2012-02-21 13:57:58+00:00
State: open

Using the following example (derived from nestrecs.ecl in regression suite):

```phoneRecord :=
RECORD
string5 areaCode;
string12 number;
END;

contactrecord :=
RECORD
phoneRecord phone;
boolean hasemail;
ifblock(self.hasemail)
string email;
end;
END;

personRecord :=
RECORD
string20 surname;
string10 forename;
phoneRecord homePhone;
boolean hasMobile;
ifblock(self.hasMobile)
phoneRecord mobilePhone;
end;
contactRecord contact;
string2 endmarker := '$$';
END;

namesTable2 := dataset([

{'Halliday','Gavin','09876','123987',true,'07967','123987', 'n/a','n/a',
true,'gavin@edata.com'},
{'Halliday','Abigail','09876','123987',false,'','',false}
], personRecord);

personRecord f := namesTable2[1] : stored('f');

output(f.surname);
output(namesTable2);```

When run against thor or hthor I get an error:

```eclagentSystem error: 0: result STORED('f') in workunit contains an invalid rowset value [CMemoryMappedSerialStream::get read past end of stream (48,1)]
```

Roxie gives a different error:

```Roxieassert((helper.getFlags() & TDXtemporary) == 0) failed - file: /home/rchapman/data/hpcc/roxie/ccd/ccdserver.cpp, line 10665
```

Slight variations of this code give various other errors (including some that crash ESP when trying to display results).