NPRao
29th May 2003, 21:50
This is from the release notes of the Porting Set - 7.3a.03

I hope it will be useful for everyone.

Problem Description (Customer terms)
Baan error 512 (corrupt DD) on tables in a company that have been reconfigurated
for another, similar, company.

Problem Description (Technical terms)
The database driver cache stores DD images per (physical) company. When
a reconfiguration is done, only the DD's for the reconfigured companies
have been invalidated in the cache.
Other companies that with the same VRC are not invalidated.

Workaround
Refresh shared memory after reconfigurations.

Test Procedure
1. Restart shared memory
% shmmanger6.2 -s should show:
Db driver DD 0x00000000

Note: run all following steps with DBSLOG=1000 and check the generated log.

2. Touch ttaad050 compnr 0
% qptool6.2 -c 0 -q "select * from ttaad050"
dbs.log contains lines like:
Search DBS_DD in shared memory for 'ttaad050000' - Not found
Msg_type 8 received.
Handle DD of 'ttaad050' compnr 000.
Store dbs_dd in shared memory, key = 'ttaad050000' - hash created

3. Repeat step 2, and verify that the cache is used now.
dbs.log contains lines like:
Search DBS_DD in shared memory for 'ttaad050000' - Found

4. Repeat step 2, for another company number
% qptool6.2 -c 1 -q "select * from ttaad050"
dbs.log contains lines like:
Search DBS_DD in shared memory for 'ttaad050001' - Not found
Msg_type 8 received.
Handle DD of 'ttaad050' compnr 001.
Store dbs_dd in shared memory, key = 'ttaad050001'

5. Change the DD (remove a reference) and reconfigure table.
% bdbreconfig6.2 -N ttaad050 -C 000
dbs.log contains lines like:
Invalidate DBS_DD in shared memory. tname = 'ttaad050' - invalidated

6. Repeat step 2, verify that the cache is not used anymore.
dbs.log contains lines like:
Search DBS_DD in shared memory for 'ttaad050000' - Found but invalidated

Note: run all following step with DBSLOG=1001 and check the generated log.

7. Repeat step 4, verify that the cache is not used anymore.
dbs.log contains lines like:
Search DBS_DD in shared memory for 'ttaad050001' - Found but invalidated

An older database driver without this fix would pickup a DD from the cache and use it.
The Dictionary dump shows that the old driver is still using an old DD.
The dbs.log of the old driver contains lines like:
Search DBS_DD in shared memory for 'ttaad050001' - Found