Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0f8ec3a8
Commit
0f8ec3a8
authored
Jul 04, 2006
by
pekka@clam.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#20847 fix (4.1)
parent
225f0707
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
+3
-2
No files found.
ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
View file @
0f8ec3a8
...
...
@@ -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
BYTE
S */
/* ALWAYS ALLOCATE A MULTIPLE OF 16
WORD
S */
/* ---------------------------------------------------------------- */
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment