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
SQL> create domain dm_01 varchar(20) not null; --- ::: NB ::: "NOT null" clause here
SQL> commit;
SQL> create table t_01(s dm_01, x int); commit;
SQL> insert into t_01(x) values(100); -- PASSED!! Why ?
SQL> commit;
SQL> select * from t_01 where s is null;
S X
==================== ============
100
PS-1. No such error in 2.5.
PS-2. No such error in case when not null clause is included in field declaration rather than in domain, i.e.:
SQL> create domain dm_02 varchar(20); commit; -- this domain is declared WITHOUT not-null clause...
SQL> create table t_02(s dm_02 not null, x int); commit; -- ... but field 'S' *does* contain explicit "not null" declaration
SQL> insert into t_02(x) values(100);
Statement failed, SQLSTATE = 23000
validation error for column "T_02"."S", value "*** null ***"
See also tests that manipulates with NULL fields/domains and check results: CORE1518 Adding a non-null restricted column to a populated table renders the table inconsistent; CORE4453 (Regression: NOT NULL constraint, declared in domain, does not work); CORE4725 (Inconsistencies with ALTER DOMAIN and ALTER TABLE with DROP NOT NULL and PRIMARY KEYs); CORE4733 (Command "Alter table <T> alter TYPE <C> <DOMAIN_WITH_NOT_NULL" does not verifies data in column <C> and makes incorrect assignments in <C> to ZERO / JULIAN_DATE / ASCII(0) for types INT, TIMESTAMP and VARCHAR);
The text was updated successfully, but these errors were encountered:
Test Details: See also tests that manipulates with NULL fields/domains and check results: CORE1518 Adding a non-null restricted column to a populated table renders the table inconsistent; CORE4453 (Regression: NOT NULL constraint, declared in domain, does not work); CORE4725 (Inconsistencies with ALTER DOMAIN and ALTER TABLE with DROP NOT NULL and PRIMARY KEYs); CORE4733 (Command "Alter table <T> alter TYPE <C> <DOMAIN_WITH_NOT_NULL" does not verifies data in column <C> and makes incorrect assignments in <C> to ZERO / JULIAN_DATE / ASCII(0) for types INT, TIMESTAMP and VARCHAR);
Submitted by: @pavel-zotov
LI-T3.0.0.31155:
SQL> create domain dm_01 varchar(20) not null; --- ::: NB ::: "NOT null" clause here
SQL> commit;
SQL> create table t_01(s dm_01, x int); commit;
SQL> insert into t_01(x) values(100); -- PASSED!! Why ?
SQL> commit;
SQL> select * from t_01 where s is null;
S X
==================== ============
100
PS-1. No such error in 2.5.
PS-2. No such error in case when not null clause is included in field declaration rather than in domain, i.e.:
SQL> create domain dm_02 varchar(20); commit; -- this domain is declared WITHOUT not-null clause...
SQL> create table t_02(s dm_02 not null, x int); commit; -- ... but field 'S' *does* contain explicit "not null" declaration
SQL> insert into t_02(x) values(100);
Statement failed, SQLSTATE = 23000
validation error for column "T_02"."S", value "*** null ***"
Commits: 1277bf5 FirebirdSQL/fbt-repository@3bcc9b8
====== Test Details ======
See also tests that manipulates with NULL fields/domains and check results:
CORE1518 Adding a non-null restricted column to a populated table renders the table inconsistent;
CORE4453 (Regression: NOT NULL constraint, declared in domain, does not work);
CORE4725 (Inconsistencies with ALTER DOMAIN and ALTER TABLE with DROP NOT NULL and PRIMARY KEYs);
CORE4733 (Command "Alter table <T> alter TYPE <C> <DOMAIN_WITH_NOT_NULL" does not verifies data in column <C> and makes incorrect assignments in <C> to ZERO / JULIAN_DATE / ASCII(0) for types INT, TIMESTAMP and VARCHAR);
The text was updated successfully, but these errors were encountered: