You are not logged in.
Hello ab,
I think I found a bug. There is a limit of 64 fields that a table can have, right?
In the unit, Mormot, in the TJSONObjectDecoder.Decode method, line 27448, the number of fields is checked equal to the limit, when you should check if the number of fields is greater than the limit, correct?
if FieldCount = MAX_SQLFIELDS then
raise EParsingException.Create ('Too many inlines in TJSONObjectDecoder');
I tested in a table with 64 fields, and when I updated a record, I was getting this error message 'Too many inlines in TJSONObjectDecoder'.
I changed to
if FieldCount > MAX_SQLFIELDS then
raise EParsingException.Create ('Too many inlines in TJSONObjectDecoder');
and worked as expected.
What do you think?
PS: If you've already corrected this, ignore it.
tks
Offline
The code is the following:
inc(FieldCount);
if FieldCount=MAX_SQLFIELDS then
raise EParsingException.Create('Too many inlines in TJSONObjectDecoder');
So FieldCount is increasing by one, starting from 0 or 1 (if there was an ID).
Testing FieldCount = MAX_SQLFIELDS is therefore correct.
I don't see any bug here.
Offline