Subject | Re: Firebird restoration problem |
---|---|
Author | Adam |
Post date | 2006-02-10T09:53:51Z |
> This query returns many records with a count(*) of 2That is correct, if you have defined the primary key on the table then
> but this should not be possible since
> storeid, deptcode, commoditycode makes up the
> primary key of this table.
>
> select storeid,deptcode,commoditycode, count(*)
> from commodities
> group by storeid,deptcode,commoditycode
> having count(*) > 1
>
> This primary key has NEVER been deactivated.
> How can this be?
it should never allow duplicates. Older versions of IB allowed you to
deactivate PK indices, so has it always been FB 1.5?
I have never seen this occur in 300 installs, but practically all of
our primary keys are based on generator values, so I seldom attempt to
insert a duplicate value.
Are forced writes enabled (synchronous writes)? If not then it may be
theoretically possible for a problem to occur at an unfortunate time,
but otherwise i am baffled.
Also check the release notes to see if any known issues could have
caused this.
Adam