The error is raised when INTL_convert_bytes is called from INTL_compare.
The internal buffer used for conversion (NONE -> WIN1251) is (MAX_KEY or 4096) smaller then size of field contents (5000) therefore conversion failed.

We can use HalfStaticArray instead but i don't know why MAX_KEY is used here ?

Also it seems more logical to convert MIN(length1, length2) bytes for comparison.

Vlad Khorsun added a comment - 18/Feb/10 06:48 PM - edited The error is raised when INTL_convert_bytes is called from INTL_compare.
The internal buffer used for conversion (NONE -> WIN1251) is (MAX_KEY or 4096) smaller then size of field contents (5000) therefore conversion failed.
We can use HalfStaticArray instead but i don't know why MAX_KEY is used here ?
Also it seems more logical to convert MIN(length1, length2) bytes for comparison.
I think Adriano able to choose the best solution for this case :)