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
Fields present only in WHERE clause of views WITH CHECK OPTION causes invalid CHECK CONSTRAINT violation [CORE4307] #4630
Comments
Modified by: @asfernandesComponent: Engine [ 10000 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 1 [ 10332 ] |
Commented by: @pavel-zotov It seems to me that some problem still DOES exist. Please look at two scripts: CASE-1recreate view v1 as select 1 n1 from rdb$database; commit; -- drop dependencies (if any) recreate table t1 (id int, n1 int, n2 int); -- field ID has been added to this table in order to distinguish rows when they are displayed select * from v1; The statement marked with [ *** ] will FAIL with message:Statement failed, SQLSTATE = 23000
|
Commented by: @asfernandes Seems you misread this ticket. It talks about "3.0 Alpha 1, 3.0 Alpha 2", and the original test case works in 2.5, so it was about a regression. So you found a new bug which needs a new ticket. |
Modified by: @asfernandes |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @asfernandes
Is related to CORE4724
Is related to QA586
Test case:
recreate table t1 (n1 integer, n2 integer);
insert into t1 values (1, 2);
insert into t1 values (1, 3);
insert into t1 values (1, 4);
insert into t1 values (2, 2);
insert into t1 values (2, 3);
insert into t1 values (2, 4);
insert into t1 values (3, 2);
insert into t1 values (3, 3);
insert into t1 values (3, 4);
--With this one works correctly: recreate view v1 as select n1, n2 from t1 where n1 < n2 with check option;
recreate view v1 as select n1 from t1 where n1 < n2 with check option;
update v1 set n1 = n1 - 1;
Statement failed, SQLSTATE = 23000
Operation violates CHECK constraint on view or table V1
-At trigger 'CHECK_5'
Commits: 980cc3e FirebirdSQL/fbt-repository@dc16e1e
The text was updated successfully, but these errors were encountered: