You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:14:23 UTC

[jira] [Created] (TRAFODION-148) LP Bug: 1248732 - check (b < 99) constraint has no effect

Alice Chen created TRAFODION-148:
------------------------------------

             Summary: LP Bug: 1248732 - check (b < 99) constraint has no effect
                 Key: TRAFODION-148
                 URL: https://issues.apache.org/jira/browse/TRAFODION-148
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-general
            Reporter: Weishiun Tsai
            Assignee: Anoop Sharma
            Priority: Critical


The check constraint has no effect.  As shown in the following example, check (b < 99) constraint is in place for table t, but the insert statement is able to insert a row where b = 200.  The insert statement is supposed to see the 8101 error, as in “*** ERROR[8101] The operation is prevented by check constraint SEABASE.MYTEST.MY_CONSTRAINT on table SEABASE.MYTEST.T.”

>>set schema seabase.mytest;

--- SQL operation complete.
>>create table t (a char(2) not null not droppable primary key, b int, constrain
t my_constraint check (b < 99));

--- SQL operation complete.
>>insert into t values ('AZ', 200);

--- 1 row(s) inserted.
>>select * from t;

A   B
--  -----------

AZ          200

--- 1 row(s) selected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)