Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.