Subject Re: [firebird-support] db became corrupt - why?
Author Nick Upson
On 25 June 2010 15:25, Ann W. Harrison <aharrison@...> wrote:
> Nick Upson wrote:
>> Hi, I'm running FirebirdCS-2.1.2.18118-0 or FC8, suddenly yesturday
>> programs using the database started throwing errors like this one:
>>
>> (this is from gbak)
>> internal gds software consistency check (decompression overran buffer
>> (179), file: sqz.cpp line: 222)
>>
>> gfix gave ...
>>
>> I did a backup and restore, which partially failed (fk indexes) which
>> I was able to correct by restoring with inactive indexes and removing
>> the data that was causing the problem, then I enabled the indexes.
>
> Did you have a backup that succeeded after you started getting the
> errors?

No

>Did you do a gfix -mend?

yes, that allowed me to do a backup, attempt to restore, and use the
errors from the restore to restore RI by deleting invalid data

> Could the foreign key errors indicate that you lost records in the master (referenced) table?

yes, that is what happened. The question is how given that
a) there is no code that deletes from that table
b) several tables refer to it in their FK definition which should have
stopped it being deleted

>
>
> Best regards,
>
> Ann