|
From: Lachlan A. <lh...@us...> - 2003-03-05 11:52:29
|
Just following up on that, the problem seems to be that =20
dbmfp->mfp->last_pgno doesn't get read in properly when the database=20
is reopened. I *assume* that it should be the last page actually=20
used, but at some point the free list allocates 71 (which was used=20
in the database when it was written in the previous program) despite=20
dbmfp->mfp->last_pgno having been reset to 33. I added the if =20
statement below in the diagnostic section at the end of=20
CDB___memp_cmpr_alloc, and the only place it reports an error is the=20
one that causes the crash...
#ifdef DEBUG_CMPR
fprintf(stderr,"CDB___memp_cmpr_alloc:: reuse free page %d from=20
weakcmpr\n", *pgnop);
if (*pgnop > dbmfp->mfp->last_pgno)
fprintf (stderr, "*******ERROR?? dbmfp->mfp->last_pgno %d,\=20
allocating %d\n", dbmfp->mfp->last_pgno, *pgnop);
#endif
Good night :)
Lachlan
On Wednesday 05 March 2003 22:08, Lachlan Andrew wrote:
> I've got as far as finding that, at some point, page 3 has a chain
> 3->71->34, but that page 27 is then allocated the chain 27->70->71,
> so page 3 gets corrupted. I'm about to start looking for the
> free-list.
|