ndb - bug#20892

Correction of bug#19852 (that also revealed another bug)
  Do grow noOfPagesToGrow with more than was actually allocated
This commit is contained in:
jonas@perch.ndb.mysql.com 2006-08-03 14:46:11 +02:00
parent 7d5a9b8df0
commit ff9a106b24

View file

@ -397,12 +397,12 @@ void Dbtup::allocMoreFragPages(Fragrecord* const regFragPtr)
Uint32 noAllocPages = regFragPtr->noOfPagesToGrow >> 3; // 12.5% Uint32 noAllocPages = regFragPtr->noOfPagesToGrow >> 3; // 12.5%
noAllocPages += regFragPtr->noOfPagesToGrow >> 4; // 6.25% noAllocPages += regFragPtr->noOfPagesToGrow >> 4; // 6.25%
noAllocPages += 2; noAllocPages += 2;
regFragPtr->noOfPagesToGrow += noAllocPages;
/* -----------------------------------------------------------------*/ /* -----------------------------------------------------------------*/
// We will grow by 18.75% plus two more additional pages to grow // We will grow by 18.75% plus two more additional pages to grow
// a little bit quicker in the beginning. // a little bit quicker in the beginning.
/* -----------------------------------------------------------------*/ /* -----------------------------------------------------------------*/
allocFragPages(regFragPtr, noAllocPages); Uint32 allocated = allocFragPages(regFragPtr, noAllocPages);
regFragPtr->noOfPagesToGrow += allocated;
}//Dbtup::allocMoreFragPages() }//Dbtup::allocMoreFragPages()
Uint32 Dbtup::leafPageRangeFull(Fragrecord* const regFragPtr, PageRangePtr currPageRangePtr) Uint32 Dbtup::leafPageRangeFull(Fragrecord* const regFragPtr, PageRangePtr currPageRangePtr)