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
Adding a non-null restricted column to a populated table renders the table inconsistent [CORE1518] #789
Comments
Modified by: @pcisarWorkflow: jira [ 13321 ] => Firebird [ 13963 ] |
Modified by: @dyemanovFix Version: 3.0 Alpha 1 [ 10331 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Done successfully Test Details: See also tests that manipulates with NULL fields/domains and check results: |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Dmitry D (dmitry.d)
Relate to CORE2696
Is duplicated by CORE3298
Relate to CORE1404
Is related to QA534
Relate to CORE5019
Votes: 1
Consider the following sequence:
create table dyd(c1 integer)
commit
insert into dyd(c1) values (1)
commit
alter table dyd add c2 integer not null
commit
update dyd set c1 = 2 where c1 = 1
All the statements succeed but the last one which yields [The insert failed because a column definition includes validation constraints.validation error for column C2, value "*** null ***".].
I think the third commit should have failed as committing the change puts the table into an inconsistent state where further updates would fail.
The problem is easily solved by updating the c2 column to a non-null value but the real issue is an application developer would add a column and pass the DB to an end user being reasonably sure the DB is consistent since commit succeeded (which is not true).
Commits: 218f419
====== 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: