[ https://issues.apache.org/jira/browse/TRAFODION-251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708610#comment-14708610 ]
Atanu Mishra commented on TRAFODION-251: ---------------------------------------- Anoop Sharma (anoop-sharma) on 2014-05-08 Changed in trafodion: status: New → In Progress Weishiun Tsai (wei-shiun-tsai) on 2014-05-08 tags: added: sql-exe Weishiun Tsai (wei-shiun-tsai) wrote on 2014-05-27: #1 Verified on the datalake v40963 build, this problem has been fixed: >>create table a12tab1 (int1 int not null not droppable, vch2 varchar(3), >>primary key (int1) not droppable); --- SQL operation complete. >>create table a12tab2 (int1 int not null, vch2 varchar(3)) store by (int1); --- SQL operation complete. >>alter table a12tab1 add c7 interval second check (c7 > '100'); *** ERROR[4041] Type INTERVAL SECOND(2,6) cannot be compared with type CHAR(3). --- SQL operation failed with errors. >>alter table a12tab1 add c90 pic x(3) references a12tab2 (vch2); *** ERROR[1044] Constraint TRAFODION.SEABASE.A12TAB1_212397978_5514 could not be created because the referenced columns in the referenced table are not part of a unique constraint. --- SQL operation failed with errors. >>alter table a12tab1 add c91 int references a12tab2(int1); *** ERROR[1044] Constraint TRAFODION.SEABASE.A12TAB1_446697978_5514 could not be created because the referenced columns in the referenced table are not part of a unique constraint. --- SQL operation failed with errors. >>alter table a12tab1 add c92 int unique references a12tab2 (int1); *** ERROR[1044] Constraint TRAFODION.SEABASE.A12TAB1_297118978_5514 could not be created because the referenced columns in the referenced table are not part of a unique constraint. --- SQL operation failed with errors. Changed in trafodion: status: In Progress → Fix Released > LP Bug: 1317301 - Unsupported column-level constraints should return errors > instead of being ignored > ---------------------------------------------------------------------------------------------------- > > Key: TRAFODION-251 > URL: https://issues.apache.org/jira/browse/TRAFODION-251 > Project: Apache Trafodion > Issue Type: Bug > Components: sql-exe > Reporter: Weishiun Tsai > Assignee: Anoop Sharma > Priority: Critical > Fix For: 0.8 (pre-incubation) > > > Trafodion does not support column-level constraints right now, but they are > ignored as opposed to return an error. All of the following examples are > meant to see one error or another, but they now just return SQL operation > complete. They should return errors indicating that the feature is not > supported. > >>create table a12tab1 (int1 int not null not droppable, vch2 varchar(3), > >>primary key (int1) not droppable); > --- SQL operation complete. > >> > >>create table a12tab2 (int1 int not null, vch2 varchar(3)) store by (int1); > --- SQL operation complete. > >> > >>-- SQ sees ERROR 4041 Type <a> cannot be compared with type <b> > >>alter table a12tab1 add c7 interval second check (c7 > '100'); > --- SQL operation complete. > >> > >>-- SQ sees error 1044 Constraint could not be created because the > >>-- referenced columns in the referenced table are not part of a > >>-- unique constraint. > >>alter table a12tab1 add c90 pic x(3) references a12tab2 (vch2); > --- SQL operation complete. > >> > >>-- SQ sees error 1044 Constraint could not be created because the > >>-- referenced columns in the referenced table are not part of a > >>-- unique constraint. > >>alter table a12tab1 add c91 int references a12tab2(int1); > --- SQL operation complete. > >> > >>-- SQ sees error 1042 All PRIMARY KEY or UNIQUE constraint columns > >>-- must be NOT NULL > >>alter table a12tab1 add c92 int unique references a12tab2 (int1); > --- SQL operation complete. -- This message was sent by Atlassian JIRA (v6.3.4#6332)