Fields present only in WHERE clause of views WITH CHECK OPTION causes invalid 
CHECK CONSTRAINT violation
--------------------------------------------------------------------------------------------------------

                 Key: CORE-4307
                 URL: http://tracker.firebirdsql.org/browse/CORE-4307
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 3.0 Alpha 1, 3.0 Alpha 2
            Reporter: Adriano dos Santos Fernandes


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'


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to