Dear Marco,
In Harbour source code we have this:
if( ! fLeaf )
{
hb_cdxPageGetChild( pPage );
#ifdef HB_CDX_DBGCODE
if( memcmp( hb_cdxPageGetKeyVal( pPage, pPage->iCurKey ),
hb_cdxPageGetKeyVal( pPage->Child, pPage->Child->iKeys - 1 ),
pPage->TagParent->uiLen ) != 0 ||
hb_cdxPageGetKeyRec( pPage, pPage->iCurKey ) !=
hb_cdxPageGetKeyRec( pPage->Child, pPage->Child->iKeys - 1 ) )
{
fprintf( stderr, "\r\nkeyLen=%u", pPage->TagParent->uiLen );
fprintf( stderr, "\r\nparent=%lx, iKey=%d, rec=%lu", pPage->Page, pPage->iCurKey, hb_cdxPageGetKeyRec( pPage, pPage->iCurKey ) );
fprintf( stderr, "\r\n child=%lx, iKey=%d, rec=%lu", pPage->Child->Page, pPage->Child->iKeys - 1, hb_cdxPageGetKeyRec( pPage->Child, pPage->Child->iKeys - 1 ) );
fprintf( stderr, "\r\nparent val=[%s]", hb_cdxPageGetKeyVal( pPage, pPage->iCurKey ) );
fprintf( stderr, "\r\n child val=[%s]", hb_cdxPageGetKeyVal( pPage->Child, pPage->Child->iKeys - 1 ) );
fflush( stderr );
hb_cdxErrInternal( "hb_cdxPageSeekKey: wrong parent key." );
}
#endif
k = hb_cdxPageSeekKey( pPage->Child, pKey, ulKeyRec );
}
and hb_cdxErrInternal() has this code:
static void hb_cdxErrInternal( const char * szMsg )
{
hb_errInternal( 9201, szMsg ? szMsg : "hb_cdxErrInternal: data integrity error.", NULL, NULL );
}
You can modify it to force the error. What exactly is what you want to avoid ? Please provide a screenshot