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

SET BIND OF TIMESTAMP WITH TIME ZONE TO CHAR is not working with UTF8 connection charset #7548

Closed
skopaliks opened this issue Apr 16, 2023 · 0 comments · Fixed by #7549
Closed

Comments

@skopaliks
Copy link

FB 4.0.2 windows x64

SQL Script:
CREATE DATABASE 'xnet://d:\fbdata\test.fdb' USER 'SYSDBA' PASSWORD 'masterkey';

RECREATE TABLE a(
t TIMESTAMP WITH TIME ZONE
);

INSERT INTO a VALUES(CURRENT_TIMESTAMP);

SELECT * FROM a;

SET TERM ^;
EXECUTE BLOCK AS
BEGIN
SET BIND OF TIMESTAMP WITH TIME ZONE TO CHAR;
END
^
SET TERM ;^

SELECT * FROM a;
COMMIT;

WIN1250 works fine:
c:\fb\isql.exe -ch WIN1250 -i set_bind_error.sql

UTF8 are failing:
c:\fb\isql.exe -ch UTF8 -i set_bind_error.sql

T

Statement failed, SQLSTATE = 22001
Dynamic SQL Error
-SQL error code = -303
-arithmetic exception, numeric overflow, or string truncation
-string right truncation
-expected length 14, actual 41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment