[ https://issues.apache.org/jira/browse/TRAFODION-1858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15184182#comment-15184182 ]
liu ming commented on TRAFODION-1858: ------------------------------------- TRAFODION-1880 is created for same issue and replace this JIRA. This JIRA will be closed with a temp ,simple solution. TRAFODION-1880 will track the effort to find a complete total solution to this kind of issue. > RI predicate generating string should not contain _SALT_ column > --------------------------------------------------------------- > > Key: TRAFODION-1858 > URL: https://issues.apache.org/jira/browse/TRAFODION-1858 > Project: Apache Trafodion > Issue Type: Bug > Reporter: liu ming > Assignee: liu ming > > When table created with SALT, it cannot be used in a foreign key reference. > To reproduce: > >>CREATE TABLE a ( id int not null, PRIMARY KEY (id))SALT USING 9 PARTITIONS; > --- SQL operation complete. > >>CREATE TABLE b ( id int not null, val int, > +> PRIMARY KEY (id), > +> CONSTRAINT FK FOREIGN KEY (val) REFERENCES a (id)) > +>SALT USING 9 PARTITIONS; > --- SQL operation complete. > >>INSERT INTO a values(1); > --- 1 row(s) inserted. > >>INSERT INTO b values(1,1); > *** ERROR[15001] A syntax error occurred at or before: > ("NEW@".VAL)=(TRAFODION.SEABASE.A."_SALT_",TRAFODION.SEABASE.A.ID); > ^ (43 characters from start of SQL > statement) > *** ERROR[8822] The statement was not prepared. -- This message was sent by Atlassian JIRA (v6.3.4#6332)