FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.24k stars 212 forks source link

UNICODE_FSS column allows to enter more characters than specified [CORE2800] #3190

Open firebird-automations opened 14 years ago

firebird-automations commented 14 years ago

Submitted by: @pcisar

Character fields with UNICODE_FSS charset allow to enter 3x more characters than specified column length.

Test case:

create table T (C1 varchar(10) character set UNICODE_FSS); commit; -- All these commands will pass without error insert into T (C1) values ('1234567890'); insert into T (C1) values ('12345678901234567890'); insert into T (C1) values ('123456789012345678901234567890'); commit; -- Data are there select * from T; -- But Next insert will fail as expected insert into T (C1) values ('1234567890123456789012345678901');

Note that many (GUI) tools will fail with transliteration/data truncation error on attempt to read the "more than expected" data rows, but ISQL will show these rows.

firebird-automations commented 14 years ago
Modified by: @pcisar security: Managers \[ 10013 \] =\>
firebird-automations commented 14 years ago

Commented by: @pcisar

This is "as designed" in Interbase, and we have special support for this hack as compatibility option.

firebird-automations commented 14 years ago
Modified by: @pcisar priority: Critical \[ 2 \] =\> Major \[ 3 \]