Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong error message - "string right truncation. expected length 30, actual 30." #7179

Closed
EPluribusUnum opened this issue May 10, 2022 · 6 comments

Comments

@EPluribusUnum
Copy link

EPluribusUnum commented May 10, 2022

Hi!

"Arithmetic overflow or division by zero has occurred.
arithmetic exception, numeric overflow, or string truncation.
string right truncation.
expected length 30, actual 30.

SQLCODE: -802
SQLSTATE: 22001
GDSCODE: 335544321"

I don't have a simple test case, but I can send the database on request.
I want to insert logger value than 30 via complex insert-select.
Firebird 3.0.9

@asfernandes
Copy link
Member

Did you also tested v4?

@EPluribusUnum
Copy link
Author

@asfernandes , yes its also an issue on v4.

@asfernandes
Copy link
Member

Please send the database (link) and the way to test it for me: adrianosf at gmail.com

@EPluribusUnum
Copy link
Author

@asfernandes , the mail was send with the details.

Thank You!

@asfernandes
Copy link
Member

Simple test case:

select cast(_win1252 '12345' collate win_ptbr as varchar(4) character set win1252) from rdb$database;

@asfernandes
Copy link
Member

Here is more problematic cases:

select cast(_utf8 '1234ç' as varchar(4) character set win1252) from rdb$database;

select cast(_win1252 '12345678901234567890' as varchar(4) character set utf8) from rdb$database;

select cast(_utf8 '1234 ' as varchar(4) character set win1252) from rdb$database;

select cast(_utf8 '1234                ' as varchar(4) character set win1252) from rdb$database;

select cast(_win1252 '1234 ' as varchar(4) character set utf8) from rdb$database;

select cast(_win1252 '1234                ' as varchar(4) character set utf8) from rdb$database;

select cast(_none '12345678ç' as varchar(2) character set utf8) from rdb$database;

select cast(_none '1234567ç8' as varchar(2) character set utf8) from rdb$database;

select cast(_none '1234ç' as varchar(4) character set utf8) from rdb$database;

select cast(_none '1234ç' as char(4) character set utf8) from rdb$database;

select cast(_none '1234ç' as varchar(4) character set win1252) from rdb$database;

select cast(_none '1234ç' as char(4) character set win1252) from rdb$database;

asfernandes added a commit that referenced this issue May 18, 2022
asfernandes added a commit that referenced this issue May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment