diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ba2ac210a8..6b93ddfd0c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2002-10-04 15:552 UTC+0300 Alexander Kresin + * source/rdd/dbfntx/dbfntx1.c + ! Bug fixed in key appending with few open indexes + 2002-10-04 14:42 UTC+0300 Alexander Kresin * source/rdd/dbcmd.c ! Bug fixed in COPY TO, APPEND FROM with aliased fields diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index c7527fb87a..ccf111e4f1 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -3187,13 +3187,13 @@ static ERRCODE ntxGoCold( NTXAREAP pArea ) { lpTagTmp = pArea->lpCurTag; pTag = pArea->lpNtxTag; - while( pTag ) + if( fAppend && pArea->fShared ) { - if( fAppend && pArea->fShared ) - { - pArea->fNtxAppend = 1; - } - else + pArea->fNtxAppend = 1; + } + else + { + while( pTag ) { pKey = hb_ntxKeyNew( NULL,pTag->KeyLength ); hb_ntxGetCurrentKey( pTag, pKey ); @@ -3246,11 +3246,11 @@ static ERRCODE ntxGoCold( NTXAREAP pArea ) hb_ntxPageFree( pTag,FALSE ); hb_fsLock( pTag->Owner->DiskFile, NTX_LOCK_OFFSET, 1, FL_UNLOCK ); } - pArea->fNtxAppend = 0; } hb_ntxKeyFree( pKey ); + pTag = pTag->pNext; } - pTag = pTag->pNext; + pArea->fNtxAppend = 0; } pArea->lpCurTag = lpTagTmp; }