Commit f6b99c23 authored by unknown's avatar unknown

ndb - bug#20892

  Correction of bug#19852 (that also revealed another bug)
  Do grow noOfPagesToGrow with more than was actually allocated


ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp:
  Dont grow "noOfPagesToGrow" with more than was actually allocated
    (as it will then grow indefinitly)
parent f8766e8f
......@@ -397,12 +397,12 @@ void Dbtup::allocMoreFragPages(Fragrecord* const regFragPtr)
Uint32 noAllocPages = regFragPtr->noOfPagesToGrow >> 3; // 12.5%
noAllocPages += regFragPtr->noOfPagesToGrow >> 4; // 6.25%
noAllocPages += 2;
regFragPtr->noOfPagesToGrow += noAllocPages;
/* -----------------------------------------------------------------*/
// We will grow by 18.75% plus two more additional pages to grow
// a little bit quicker in the beginning.
/* -----------------------------------------------------------------*/
allocFragPages(regFragPtr, noAllocPages);
Uint32 allocated = allocFragPages(regFragPtr, noAllocPages);
regFragPtr->noOfPagesToGrow += allocated;
}//Dbtup::allocMoreFragPages()
Uint32 Dbtup::leafPageRangeFull(Fragrecord* const regFragPtr, PageRangePtr currPageRangePtr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment