Firebird 2.5 drop constraint error

I'm using Firebird 2.5.4 on WinXP. I have a table with the following structure:

CREATE TABLE "MY_TABLE_1"
(
  "ID" "D_ID" NOT NULL,
  ...
  "WHATEVER" VARCHAR(20) CHARACTER SET WIN1250 COLLATE PXW_HUN,
  ...
  CONSTRAINT "C_MY_TABLE_1_U1" UNIQUE ("WHATEVER"),
  PRIMARY KEY ("ID")
);

I want to drop the "C_MY_TABLE_1_U1" constraint:

ALTER TABLE MY_TABLE_1 DROP CONSTRAINT C_MY_TABLE_1_U1;

Then I got this error:

unsuccessful metadata update
ERASE RDB$RELATION_CONSTRAINTS failed
index unexpectedly deleted
At trigger 'RDB$TRIGGER_19'
At trigger 'RDB$TRIGGER_11'

Where do I fail?

Answers


I've added

CREATE DOMAIN "D_ID" BIGINT;

as it is requierd to test ypur script and get no error (FB 2.5.4).

Can you be more specific about OS / FB version on which you get the error ?

CREATE DOMAIN "D_ID" BIGINT;
CREATE TABLE "MY_TABLE_1"
(
   "ID" "D_ID" NOT NULL,
   "WHATEVER" VARCHAR(20) CHARACTER SET WIN1250 COLLATE PXW_HUN,
   CONSTRAINT "C_MY_TABLE_1_U1" UNIQUE ("WHATEVER"),
   PRIMARY KEY ("ID")
);

ALTER TABLE MY_TABLE_1 DROP CONSTRAINT C_MY_TABLE_1_U1;

The database was corrupted, after a backup/restore I was able to drop the constraint.


Need Your Help

Data Transfer Between Databases Using SQL Queries

mysql sql innodb

I have changed the structure of my database, and need to copy data from the old instance to the new one. Since the columns of the tables have been altered I can't simply export/import the data.

jQuery autocomple and knockoutjs observable arrays

jquery asp.net-mvc-3 autocomplete knockout.js

Trying to update knockoutjs generated list, when i use jquery autocomplete functionality and select some possible values. But list doesn't update when i call the addItem function inside Select meth...