mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 15:24:16 +01:00
Fix for bug#9896, each fragment has a twin fragment (in 4.1,5.0), pages in this were not counted, giving incorrect memory consumption
This commit is contained in:
parent
cb0a436c1e
commit
0c84cf4c0d
1 changed files with 13 additions and 2 deletions
|
@ -1004,8 +1004,19 @@ Dbtup::read_psuedo(Uint32 attrId, Uint32* outBuffer){
|
|||
return 1;
|
||||
case AttributeHeader::FRAGMENT_MEMORY:
|
||||
{
|
||||
Uint64 tmp= fragptr.p->noOfPages;
|
||||
tmp*= 32768;
|
||||
Uint64 tmp = 0;
|
||||
tmp += fragptr.p->noOfPages;
|
||||
{
|
||||
/**
|
||||
* Each fragment is split into 2...get #pages from other as well
|
||||
*/
|
||||
Uint32 twin = fragptr.p->fragmentId ^ 1;
|
||||
FragrecordPtr twinPtr;
|
||||
getFragmentrec(twinPtr, twin, tabptr.p);
|
||||
ndbrequire(twinPtr.p != 0);
|
||||
tmp += twinPtr.p->noOfPages;
|
||||
}
|
||||
tmp *= 32768;
|
||||
memcpy(outBuffer,&tmp,8);
|
||||
}
|
||||
return 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue