Back to SPR List Previous Next
Secondary indexes can become corrupt after some data entry through master
Moderate Closed - Fixed Found:2002.20.30 10 JAN 2004 Fixed:2002.20.32 29 JAN 2004

DETAILS
 Secondary indexes may become corrupt after much data entry through master on
 records that have secondary indexes applied.
EXAMPLE PROGRAM
 This problem has only been reproduced on a specific database. Details
 follow for information.

 1. Get a good copy of the heart database (Use the 12/29 zip of St.
    Thomas and export/import to get a clean database).  Bring up Master and
    establish a session to the Heart database via Master.

 2. PREAD in the attached file to the heartbase database (secondprob.pwr).
    It will create 2 families, TEST and INDEXES.  Copy the attached file
    mr.lis to the Startin directory.

 3. Run Indexes.drop to get rid of any secondary indices.

 4. Run Indexes.define to create the secondary indices.

 5. Run TEST.PTADD - This will add new patients.

 6. Run TEST.LISTPTin - This will navigate thru the secondary indices and
    produce a listing in alphabetical order.  This pass should look 'Normal'.

 7. Repeat step 5 a couple of times.

 8. Run TEST.LISTPTin - This run will not look 'Normal'.  You will see
    repeats of last names A thru D followed by some very strange data.  The
    run may have to be terminated due to an infinite loop.  Anyway, it is
    pretty obvious that there is a messed up secondary index.
WORKAROUND
Delete and rebuild the indexes if they become corrupt. The program at http://www.sir.com.au/download/reindex.pql will automatically rebuild all secondary indexes on any database.
Back to SPR List Previous Next