we just stumpled across a little oddity when executing a rather large SELECT statement (lots of joins etc.).
The resulting rows exceeded the hardcoded limit of 32kb per row in Zeos.
This limit is defined in ZDbcCache.pas by defining the Columns as TByteArray (TByteArray is defined as array[0..32767] of Byte in SysUtils.pas).
So Delphi prompted me with a range exception when executing the Query.
The Exception originated at: TZRowAccessor.SetInt() but could occur at any of the SetXYZ methods as there is no range checking in there.
So I decided to simply widen the declaration of TZRowBuffer.Columns to be of 128kb instead of 32kb.
Do I have to expect any negative side effect by doing so or is it ok?
For now it seems to work like a charm.
Code: Select all
{** Defines a header for row buffer. }
(*
TZRowBuffer = packed record
Index: Integer;
UpdateType: TZRowUpdateType;
BookmarkFlag: Byte;
Columns: TByteArray;
end;
*)
// change c.schiffler because 32kb was simply too small, we use 128kb now.
TColumnArray=array[0..131072] of Byte;
{** Defines a header for row buffer. }
TZRowBuffer = packed record
Index: Integer;
UpdateType: TZRowUpdateType;
BookmarkFlag: Byte;
Columns: TColumnArray;
end;