String right truncation error when char column longer than 4096 bytes compared with string constant [CORE2875] #3259
Submitted by: @hvlad
Is related to QA429
create database 'test.fdb' default character set none;
recreate table tab1 (id int, txt varchar(5000));
insert into tab1 values (1, rpad('', 5000, '1'));
set names win1251;
update tab1 set id = 2 where txt = 'x';
Statement failed, SQLSTATE = 22001
The text was updated successfully, but these errors were encountered:
Commented by: @hvlad
The error is raised when INTL_convert_bytes is called from INTL_compare.
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 :)