Hi!

Looking again, Ivan Přenosil may be right and string literals up to 64K
byte-length *may* be safe, as descriptors uses USHORT and internal
calculations ULONG.

At the same time, columns, parameters and everything else should be
constrained to 32K.

Currently, intermediate strings (say, a concatenation) is also
constrained to 32K and may be extended to 64K.

As Ivan uses, this may be useful for directly conversion to blobs.

It may be weird that a string created (64K) may not be passed to all
places (limited by 32K), but...

There is another related thing.

We're currently (trunk) limiting strings literals to 32K in bytes. But
for multibyte (say, UTF-8), lengths should be calculated taking into
account the number of characters. Lengths should be numberOfChars *
maxBytesPerChar.

So, long (up to 32K bytes, or even less) UTF-8 strings is not safe.

So at the same time we increase literals to 64K in bytes, I think we
should limit UTF-8 strings to 16K in characters. With a 32K byte-limit,
max char-length of UTF-8 would be only 8K.


Adriano


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to