You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shell del c:\temp\c2826.fdb 2>nul;
set names utf8;
--create database 'localhost/3254:c:\temp\c2826.fdb' default character set utf8;
create database 'localhost/3333:c:\temp\c2826.fdb' default character set utf8;
show version;
create collation test_coll for utf8 from unicode;
commit;
recreate table test_utf8(f01 varchar(100) character set utf8 collate test_coll);
commit;
show table test_utf8;
1. Result on Windows (use XP SP3, FB 32 bit, reproduced both on 2.5 and 3.0):
1.1 STDOUT:
<version info>, then:
F01 VARCHAR(100) CHARACTER SET UTF8 Nullable
1.2 STDERR
1.2.1) on WI-V2.5.5.26861:
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
-unknown ISC error 335545033
1.2.2) on WI-T3.0.0.31825:
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
-expected length 7, actual 9
2. Result on Linux (64 bit FB, LI-T3.0.0.31822):
STDOUT:
<version info>, then:
F01 VARCHAR(100) CHARACTER SET UTF8 Nullable
COLLATE TEST_COLL
STDERR: empty.
PS.
Note that on LINUX command 'show table' displays COLLATE and its name (at the 2nd line, after field 'F01' info), rather than on Windows - and maybe this is the reason of trouble on windows ?
Submitted by: @pavel-zotov
Script (correct your host/port and filename):
shell del c:\temp\c2826.fdb 2>nul;
set names utf8;
--create database 'localhost/3254:c:\temp\c2826.fdb' default character set utf8;
create database 'localhost/3333:c:\temp\c2826.fdb' default character set utf8;
show version;
create collation test_coll for utf8 from unicode;
commit;
recreate table test_utf8(f01 varchar(100) character set utf8 collate test_coll);
commit;
show table test_utf8;
1. Result on Windows (use XP SP3, FB 32 bit, reproduced both on 2.5 and 3.0):
1.1 STDOUT:
<version info>, then:
F01 VARCHAR(100) CHARACTER SET UTF8 Nullable
1.2 STDERR
1.2.1) on WI-V2.5.5.26861:
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
-unknown ISC error 335545033
1.2.2) on WI-T3.0.0.31825:
Statement failed, SQLSTATE = 22001
arithmetic exception, numeric overflow, or string truncation
-string right truncation
-expected length 7, actual 9
2. Result on Linux (64 bit FB, LI-T3.0.0.31822):
STDOUT:
<version info>, then:
F01 VARCHAR(100) CHARACTER SET UTF8 Nullable
COLLATE TEST_COLL
STDERR: empty.
PS.
Note that on LINUX command 'show table' displays COLLATE and its name (at the 2nd line, after field 'F01' info), rather than on Windows - and maybe this is the reason of trouble on windows ?
Commits: 050d5b8 FirebirdSQL/fbt-repository@b62d4cd
====== Test Details ======
It was connection charset = UTF8 that causes error, title of ticket should be changed.
The text was updated successfully, but these errors were encountered: