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:17:54 UTC

[jira] [Created] (TRAFODION-713) LP Bug: 1384479 - Cannot drop a constraint with disabled indexes

Alice Chen created TRAFODION-713:
------------------------------------

             Summary: LP Bug: 1384479 - Cannot drop a constraint with disabled indexes
                 Key: TRAFODION-713
                 URL: https://issues.apache.org/jira/browse/TRAFODION-713
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmu
            Reporter: Roberta Marton
            Assignee: Anoop Sharma


The error:  "*** ERROR[1005] Constraint  does not exist." is returned when trying to drop a primary key or foreign key constraint that references an index and that index is disabled.  Either a different error message should be reported, or the constraint should be dropped.

Test case:

create table t1 (c1 int not null, c2 int);
insert into t1 values (1,1), (2,2);
alter table t1 add constraint t1_pk primary key (c1);
alter table t1 disable all indexes;
showddl t1;

alter table t1 drop constraint t1_pk;
*** ERROR[1005] Constraint  does not exist.

But if indexes are enabled, the drop constraint succeeds:

alter table t1 enable all indexes;
alter table t1 drop constraint t1_pk;
--- SQL operation complete.



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