Pascal Data Objects

procedure TPDO.setMaxBLOBSize(BLOBSize: Int64);

This method defines how much memory to allocate to each variable string field retrieved. This does not apply to VAR CHAR fields which are a known maximum size. In the case of MySQL, there are data types such as TinyText, MediumText, Text, and Longtext which are basically Binary Large OBjects. Tinytext fields are limited to 255 characters, but a LongText field can be up to 4 GB in size. When fetching these BLOB fields, the maximum size must be reserved in memory before the fetch. If the contents of the field are greater than the reserved size, it is simply truncated. If the row has a long of variable text fields, or if the entire result set is pulled at once, this can consume a lot of memory.

The default value for the maximum BLOB size is 255 bytes.

    {reserve up to 4kb for each variable text field for all future queries}
    db.setMaxBLOBSize (4096);

The current value of the setting can be determined with TPDO.getAttribute