From 19b2d7a10e663a011aecbf6cf7f761709abb8a6c Mon Sep 17 00:00:00 2001 From: Antonio Carlos Pantaglione Date: Mon, 22 Sep 2008 19:16:31 +0000 Subject: [PATCH] 2008-09-22 16:19 UTC-0300 Antonio Carlos Pantaglione * harbour/contrib/rddads/ads1.c * using AdsCreateIndex61 when ADS_LIB_VERSION >= 610. This functions use ADS_DEFAULT as index page size parameter and force Advantage to compute a page size based on the key size to provide optimal balancing. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/rddads/ads1.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d97c13fa94..4f720329a2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-09-22 16:19 UTC-0300 Antonio Carlos Pantaglione + * harbour/contrib/rddads/ads1.c + * using AdsCreateIndex61 when ADS_LIB_VERSION >= 610. This functions use + ADS_DEFAULT as index page size parameter and force Advantage to compute + a page size based on the key size to provide optimal balancing. + 2008-09-22 20:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rdd/dbfntx/dbfntx1.c * harbour/source/rdd/dbfcdx/dbfcdx1.c diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index 68d915207e..f165b25ecd 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -3572,11 +3572,19 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo ) if( pOrderInfo->fUnique ) u32Options |= ADS_UNIQUE; +#if ADS_LIB_VERSION >= 610 + u32RetVal = AdsCreateIndex61( hTableOrIndex, pOrderInfo->abBagName, + pOrderInfo->atomBagName, ( UNSIGNED8 * ) hb_itemGetCPtr( pExprItem ), + ( pArea->lpdbOrdCondInfo && pArea->lpdbOrdCondInfo->abFor ) ? + ( UNSIGNED8 * ) pArea->lpdbOrdCondInfo->abFor : ( UNSIGNED8 * ) "", + pucWhile, u32Options, ADS_DEFAULT, &hIndex); +#else u32RetVal = AdsCreateIndex( hTableOrIndex, pOrderInfo->abBagName, pOrderInfo->atomBagName, ( UNSIGNED8 * ) hb_itemGetCPtr( pExprItem ), ( pArea->lpdbOrdCondInfo && pArea->lpdbOrdCondInfo->abFor ) ? ( UNSIGNED8 * ) pArea->lpdbOrdCondInfo->abFor : ( UNSIGNED8 * ) "", pucWhile, u32Options, &hIndex); +#endif SELF_ORDSETCOND( ( AREAP ) pArea, NULL );