Subject Re: Bug in create table?
Author maverickthunder
--- In firebird-support@yahoogroups.com, Mark Rotteveel <Avalanche1979@...> wrote:
>
> If I execute your table creation code (without the collate) on my
> Firebird 2.1.1.17910 using ISQL I get an error:
>
> "
> Statement failed, SQLCODE = -607
> unsuccessful metadata update
> -STORE RDB$RELATION_FIELDS failed
> -attempt to store duplicate value (visible to active transactions) in
> unique index "RDB$INDEX_15"
> "
>
> So it looks like your case is not reproducible.
>
> Mark
>
> maverickthunder wrote:
> > The point is that CREATE TABLE should fail always if the table have 2 rows with the same name.
> >
> > The table was like this:
> >
> > (some fields)
> > "Observaciones" BLOB SUB_TYPE TEXT SEGMENT SIZE 4096,
> > (some other fields)
> > "Observaciones" BLOB SUB_TYPE TEXT SEGMENT SIZE 8192
> > (end of definition)
> >
> > Both fields inside quotes. I tested again:
> >
> > CREATE TABLE "Demo" (
> > "Codigo" INTEGER NOT NULL,
> > "Observaciones" BLOB SUB_TYPE TEXT SEGMENT SIZE 8192,
> > "Nombre" VARCHAR(50) NOT NULL COLLATE PXW_SPAN,
> > "Observaciones" BLOB SUB_TYPE TEXT SEGMENT SIZE 4096
> > );
> >
> > You will have only one field named Observaciones... then try this:
> >
> > ALTER TABLE "Demo"
> > DROP "Observaciones";
> >
> > You will get an error.
> >
> > Using latest firebird 2.1.1.17910
>
>
> --
> Mark Rotteveel
>

Mark, thank you for the tip. I catched the problem!

By some reason RDB$INDEX_15 in RDB$RELATION_FIELDS was not active. It is strange because it was a new database but at some point perhaps it got damaged.

Best regards,
Mauro.