On Thu, 04 Sep 2008, Miguel Angel Marchuet wrote:
Hi Miguel,
> #command SET TURBOREAD ON => Sx_SetTurbo( .t. )
> generates internal error 9106, "hb_cdxIndexUnLockRead: bad count of locks."
> Can we change the code ?
> static BOOL hb_cdxIndexUnLockRead( LPCDXINDEX pIndex )
> {
> pIndex->lockRead--;
> if ( HB_DIRTYREAD( pIndex->pArea ) )
> {
> if ( pIndex->lockRead < 0 )
> pIndex->lockRead = 0;
> return TRUE;
> }
> ...
> I don't know why lockRead are break with SET TURBOREAD ON
The above only diables debug code but does not fix the problem
which is in different place few line below:
if ( pIndex->pArea->fShared && pIndex->fShared )
Should be changed to:
if ( pIndex->pArea->fShared && pIndex->fShared &&
!HB_DIRTYREAD( pIndex->pArea ) )
I'll commit the fix ASAP.
BTW Please remember that using Sx_SetTurbo() (It should be rather called
"dirty read") may cause wrong results when other station update index
concurrently. Do you use some other manual lock mechanism too?
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour