2002-04-19 19:32 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
For example:
|
||||
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
! fixed autopen bug on Linux
|
||||
! fixed recno() while indexing
|
||||
|
||||
2002-04-24 00:42 UTC-0300 Horacio Roldan <harbour_ar@yahoo.com.ar>
|
||||
* source/rdd/workarea.c
|
||||
! fixed bug with set relation to, found by Walter Negro.
|
||||
|
||||
|
||||
@@ -212,20 +212,28 @@ static ULONG* hb_ntxKeysInPage( ULONG ulRecCount, USHORT maxkeys )
|
||||
for( i=1; i<=iLevel; i++ )
|
||||
lpArray[i] = 0;
|
||||
|
||||
for( i=iLevel; i; i-- )
|
||||
if( recCount > 0 )
|
||||
{
|
||||
koeff = dSum / recCount;
|
||||
lpArray[i] = (ULONG) ceil( _maxkeys/koeff );
|
||||
dMul = 1;
|
||||
for( j=iLevel,dSum=0; j; j-- )
|
||||
for( i=iLevel; i; i-- )
|
||||
{
|
||||
dSum += ( (lpArray[j])? lpArray[j]:maxkeys ) * dMul;
|
||||
if( j > 1 )
|
||||
dMul *= (double)(( (lpArray[j])? lpArray[j]:maxkeys )+1);
|
||||
koeff = dSum / recCount;
|
||||
lpArray[i] = (ULONG) ceil( _maxkeys/koeff );
|
||||
dMul = 1;
|
||||
for( j=iLevel,dSum=0; j; j-- )
|
||||
{
|
||||
dSum += ( (lpArray[j])? lpArray[j]:maxkeys ) * dMul;
|
||||
if( j > 1 )
|
||||
dMul *= (double)(( (lpArray[j])? lpArray[j]:maxkeys )+1);
|
||||
}
|
||||
}
|
||||
dSum -= recCount;
|
||||
lpArray[iLevel+1] = (dMul > dSum)? (ULONG)(dMul - dSum):(ULONG)dMul;
|
||||
}
|
||||
else
|
||||
{
|
||||
lpArray[1] = maxkeys;
|
||||
lpArray[2] = 0;
|
||||
}
|
||||
dSum -= recCount;
|
||||
lpArray[iLevel+1] = (dMul > dSum)? (ULONG)(dMul - dSum):(ULONG)dMul;
|
||||
|
||||
return lpArray;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user