summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <pekka@clam.ndb.mysql.com>2006-07-04 15:11:11 +0200
committerunknown <pekka@clam.ndb.mysql.com>2006-07-04 15:11:11 +0200
commit99e4dee4ff36cb38735d5da032e29d46ae996da2 (patch)
tree20417e0985090844683612ad1d5b43d9bc681f34 /ndb
parentf260771d131f00b22dd21f3837dd2c8262d25f3b (diff)
downloadmariadb-git-99e4dee4ff36cb38735d5da032e29d46ae996da2.tar.gz
ndb - bug#20847 fix (4.1)
ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp: DROP did not do merge with right buddies
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp b/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
index 642ba270760..e74ac93f3f8 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
@@ -59,7 +59,7 @@ Uint32 Dbtup::allocTabDescr(const Tablerec* regTabPtr, Uint32* offset)
Uint32 reference = RNIL;
Uint32 allocSize = getTabDescrOffsets(regTabPtr, offset);
/* ---------------------------------------------------------------- */
-/* ALWAYS ALLOCATE A MULTIPLE OF 16 BYTES */
+/* ALWAYS ALLOCATE A MULTIPLE OF 16 WORDS */
/* ---------------------------------------------------------------- */
allocSize = (((allocSize - 1) >> 4) + 1) << 4;
Uint32 list = nextHigherTwoLog(allocSize - 1); /* CALCULATE WHICH LIST IT BELONGS TO */
@@ -73,7 +73,6 @@ Uint32 Dbtup::allocTabDescr(const Tablerec* regTabPtr, Uint32* offset)
if (retNo >= ZTD_FREE_SIZE) {
ljam();
Uint32 retRef = reference + allocSize; /* SET THE RETURN POINTER */
- retNo = itdaMergeTabDescr(retRef, retNo); /* MERGE WITH POSSIBLE RIGHT NEIGHBOURS */
freeTabDescr(retRef, retNo); /* RETURN UNUSED TD SPACE TO THE TD AREA */
} else {
ljam();
@@ -102,6 +101,7 @@ Uint32 Dbtup::allocTabDescr(const Tablerec* regTabPtr, Uint32* offset)
void Dbtup::freeTabDescr(Uint32 retRef, Uint32 retNo)
{
+ retNo = itdaMergeTabDescr(retRef, retNo); /* MERGE WITH POSSIBLE RIGHT NEIGHBOURS */
while (retNo >= ZTD_FREE_SIZE) {
ljam();
Uint32 list = nextHigherTwoLog(retNo);
@@ -111,6 +111,7 @@ void Dbtup::freeTabDescr(Uint32 retRef, Uint32 retNo)
retRef += sizeOfChunk;
retNo -= sizeOfChunk;
}//while
+ ndbassert(retNo == 0);
}//Dbtup::freeTabDescr()
Uint32