
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
I didn't checked if it exists in v2.1 or v2.0
|
|
Issue Links:
|
Relate
|
|
|
|
This issue is related to:
|
|
|
|
|
|
|
|
| Planning Status: |
Unspecified
|
|
create database 'test.fdb' default character set none;
recreate table tab1 (id int, txt varchar(5000));
commit;
insert into tab1 values (1, rpad('', 5000, '1'));
commit;
set names win1251;
connect 'test.fdb';
update tab1 set id = 2 where txt = 'x';
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
|
|
Description
|
create database 'test.fdb' default character set none;
recreate table tab1 (id int, txt varchar(5000));
commit;
insert into tab1 values (1, rpad('', 5000, '1'));
commit;
set names win1251;
connect 'test.fdb';
update tab1 set id = 2 where txt = 'x';
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation |
Show » |
|
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 :)