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

Regression: NOT NULL constraint, declared in domain, does not work [CORE4453] #4773

Closed
firebird-automations opened this issue Jun 7, 2014 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

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);

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 1 [ 10332 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

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);

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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

No branches or pull requests

2 participants