Icon View Incident Report

Serious Serious
Reported By: Jose Eduardo Helminsky
Reported On: 2/15/2005
For: Version 4.16 Build 1
# 2074 Change Detection Causing Index Corruption Due to Buffers Not Being Freed Properly

I have a table with inconsistent recordnumber. This is not the problem with RecordCount. After restructure or repair it then the recordnumber is corrected. If I start browse records from begininig then when I reach the bottom (7010 of 7019), but if I start from bottom to top then the 9 first records appears with 0 as recordnumber.

Comments Comments
In 4.20, we added a check for this type of problem and had it trigger an #8965 engine error if it found the condition. The problem was caused by the change detection kicking in due to a .dat or .blb modification only. This would cause the .dat record buffers and .blb block buffers to be freed, but DBISAM was not freeing the .idx page buffers. However, the higher level table cursor performing the operation that caused the change detection expected the .idx page buffers to be freed and would
re-request the same .idx page buffer without first putting the one it had back. This would cause the "double-pin" situation that the above-mentioned check was intended to catch. The usage count for the index page buffer would go to 2 and never get below 1 again, preventing DBISAM from flushing it to disk as needed when it was dirty due to modifications during an append, update, or delete.

Many thanks to Roy Lambert for sending us a project that replicated the problem. We tried to replicate this issue for many months before we were able to do so with his help.

Resolution Resolution
Fixed Problem on 6/16/2005 in version 4.21 build 4

Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard with Source
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard with Source