Subject Problems with big VARCHAR-s in FB2.1 (default charset = UTF8)
Author kimon_the_athenian2

I have a "VARCHAR(32000) CHARACTER SET ISO8859_1" field in a database
that has UTF8 as it default charset.

When i'm using ISO8859_1 as client charset then i can query all the
values from that field, but when i connect with UTF8 then querying
some longer values gives me:

Arithmetic overflow or division by zero has occurred.Arithmetic
exception, numeric overflow, or string truncation.

Those values have almost only ASCII chars in them, so the byte-size of
their UTF8 form shouldn't be much bigger than that of ISO8859_1.

When i check the bit_length of those strings then it's 8x the number
of chars - I thought that varchar storage is dependant on the charset
of the field, but here it seems that it depends on database default
charset. Is it so?

Anyway it's strange that I can query strings whose bit_length is 63360
but not strings with bit_length of 80192. Is there some kind of limit
going between these numbers?

I hope someone can explain these matters (or give a link to info).

thanks in advance!