Icon View Incident Report

Serious Serious
Reported By: Steve Apiki
Reported On: 4/1/2002
For: Version 3.05 Build 1
# 1075 VerifyTable Method of TDBISAMTable Component Causes Table Writes to Occur

It appears that VerifyTable() can cause the data file and index file to become out of sync. On a particular file with a lot of deleted records causing VerifyTable causes a write to the datafile which appears to cause damage that shows up only after further use.
I believe this is because in dbisamen.pas line 11585:

SetNextFreeRecord(TempRecord);

Eventually causes TRecord.SetIsDeleted() to get called, which marks the record dirty. Since the record buffers are dirty, they are flushed to the file in FlushRecordBuffers() which is called when the next segment of record buffers needs to be loaded.

For my own application, if I replace line 11585 with:

if not VerifyOnly then SetNextFreeRecord(TempRecord);

The symptoms go away, although of course I don't really know what I'm doing here. Also, the symptoms go away if I just RepairTable instead of VerifyTable.


Comments Comments
Fix is as indicated exactly - problem was with VerifyTable not checking the VerifyOnly flag internally properly when marking deleted records.


Resolution Resolution
Fixed Problem on 4/5/2002 in version 3.09 build 1
Image