Product Documentation

V11.5 Release Notes

Previous Topic

Next Topic

Next Record fix using co-files

After updating a key value in client/server mode, a call to read the next record from an index could return the wrong value in certain, very specific situations.

The following specific steps are required to reproduce this issue:

  1. Open a variable-length TRNLOG data file and its associated index file at ISAM level two times in one connection (this is referred to as "co-files"). The data file has two records that we will refer to as record "A" and record "B."
  2. Call FRSVREC() on the first instance of the index to read record "A".
  3. Call FRSVREC() on the second instance of the index to read record "A".
  4. Call RWTVREC() on the second instance of the data file to update record "A", causing the record to move without changing the key values.
  5. Call NXTVREC() on the first instance of the index. We expect this call to return record "B", but it returns record "A".

To improve the efficiency of next key and previous key operations, FairCom Server maintains "current low-level key" state variables for each open index file. It also has logic to identify situations in which it must ignore those variables and perform a full tree search for the next or previous key.

The logic has been enhanced to correctly handle this situation: The logic has been extended so that, when adding a key when co-files are in use, it will check if any of the co-files are positioned on this same index node and perform the appropriate key search.

TOCIndex