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
ef77deda
Commit
ef77deda
authored
Apr 26, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #27205 Occational 899 if delete+insert during LCP
- put page of deleted row last in list
parent
8dd90e88
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
13 deletions
+30
-13
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+1
-1
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
+8
-8
storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp
+1
-1
storage/ndb/src/kernel/vm/DLFifoList.hpp
storage/ndb/src/kernel/vm/DLFifoList.hpp
+20
-3
No files found.
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
View file @
ef77deda
...
...
@@ -610,7 +610,7 @@ struct Fragrecord {
Uint32
noOfPagesToGrow
;
DLList
<
Page
>::
Head
emptyPrimPage
;
// allocated pages (not init)
DLList
<
Page
>::
Head
thFreeFirst
;
// pages with atleast 1 free record
DL
Fifo
List
<
Page
>::
Head
thFreeFirst
;
// pages with atleast 1 free record
SLList
<
Page
>::
Head
m_empty_pages
;
// Empty pages not in logical/physical map
Uint32
m_lcp_scan_op
;
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
View file @
ef77deda
...
...
@@ -92,8 +92,8 @@ Dbtup::alloc_fix_rec(Fragrecord* const regFragPtr,
pagePtr
.
p
->
page_state
=
ZTH_MM_FREE
;
LocalDL
List
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
free_pages
.
add
(
pagePtr
);
LocalDL
FifoList
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
free_pages
.
add
First
(
pagePtr
);
}
else
{
ljam
();
/* ---------------------------------------------------------------- */
...
...
@@ -176,7 +176,7 @@ Dbtup::alloc_tuple_from_page(Fragrecord* const regFragPtr,
/* ARE MAINTAINED EVEN AFTER A SYSTEM CRASH. */
/* ---------------------------------------------------------------- */
ndbrequire
(
regPagePtr
->
page_state
==
ZTH_MM_FREE
);
LocalDLList
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
LocalDL
Fifo
List
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
free_pages
.
remove
((
Page
*
)
regPagePtr
);
regPagePtr
->
page_state
=
ZTH_MM_FULL
;
}
...
...
@@ -196,10 +196,10 @@ void Dbtup::free_fix_rec(Fragrecord* regFragPtr,
{
ljam
();
PagePtr
pagePtr
=
{
(
Page
*
)
regPagePtr
,
key
->
m_page_no
};
LocalDLList
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
LocalDL
Fifo
List
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
ndbrequire
(
regPagePtr
->
page_state
==
ZTH_MM_FULL
);
regPagePtr
->
page_state
=
ZTH_MM_FREE
;
free_pages
.
add
(
pagePtr
);
free_pages
.
add
Last
(
pagePtr
);
}
}
//Dbtup::freeTh()
...
...
@@ -227,13 +227,13 @@ Dbtup::alloc_page(Tablerec* tabPtrP, Fragrecord* fragPtrP,
c_page_pool
.
getPtr
(
pagePtr
,
getRealpid
(
fragPtrP
,
page_no
));
LocalDLList
<
Page
>
alloc_pages
(
c_page_pool
,
fragPtrP
->
emptyPrimPage
);
LocalDLList
<
Page
>
free_pages
(
c_page_pool
,
fragPtrP
->
thFreeFirst
);
LocalDL
Fifo
List
<
Page
>
free_pages
(
c_page_pool
,
fragPtrP
->
thFreeFirst
);
if
(
pagePtr
.
p
->
page_state
==
ZEMPTY_MM
)
{
convertThPage
((
Fix_page
*
)
pagePtr
.
p
,
tabPtrP
,
MM
);
pagePtr
.
p
->
page_state
=
ZTH_MM_FREE
;
alloc_pages
.
remove
(
pagePtr
);
free_pages
.
add
(
pagePtr
);
free_pages
.
add
First
(
pagePtr
);
}
*
ret
=
pagePtr
;
...
...
@@ -257,7 +257,7 @@ Dbtup::alloc_fix_rowid(Fragrecord* regFragPtr,
}
Uint32
state
=
pagePtr
.
p
->
page_state
;
LocalDLList
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
LocalDL
Fifo
List
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
switch
(
state
){
case
ZTH_MM_FREE
:
if
(((
Fix_page
*
)
pagePtr
.
p
)
->
alloc_record
(
idx
)
!=
idx
)
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp
View file @
ef77deda
...
...
@@ -295,7 +295,7 @@ void Dbtup::releaseFragPages(Fragrecord* regFragPtr)
}
{
LocalDLList
<
Page
>
tmp
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
LocalDL
Fifo
List
<
Page
>
tmp
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
tmp
.
remove
();
}
...
...
storage/ndb/src/kernel/vm/DLFifoList.hpp
View file @
ef77deda
...
...
@@ -62,8 +62,9 @@ public:
*/
void
insert
(
Ptr
<
T
>
&
ptr
,
Ptr
<
T
>&
loc
);
void
remove
();
void
remove
(
Ptr
<
T
>
&
);
void
remove
(
T
*
);
/**
* Update i & p value according to <b>i</b>
*/
...
...
@@ -274,12 +275,28 @@ DLFifoListImpl<P,T,U>::insert(Ptr<T> & ptr, Ptr<T> & loc)
ptr
.
p
->
U
::
nextList
=
loc
.
i
;
}
template
<
typename
P
,
typename
T
,
typename
U
>
inline
void
DLFifoListImpl
<
P
,
T
,
U
>::
remove
()
{
head
.
firstItem
=
RNIL
;
head
.
lastItem
=
RNIL
;
}
template
<
typename
P
,
typename
T
,
typename
U
>
inline
void
DLFifoListImpl
<
P
,
T
,
U
>::
remove
(
Ptr
<
T
>
&
p
)
{
T
*
t
=
p
.
p
;
remove
(
p
.
p
);
}
template
<
typename
P
,
typename
T
,
typename
U
>
inline
void
DLFifoListImpl
<
P
,
T
,
U
>::
remove
(
T
*
t
)
{
Uint32
ni
=
t
->
U
::
nextList
;
Uint32
pi
=
t
->
U
::
prevList
;
...
...
@@ -328,7 +345,7 @@ inline
void
DLFifoListImpl
<
P
,
T
,
U
>::
release
(
Ptr
<
T
>
&
p
)
{
remove
(
p
);
remove
(
p
.
p
);
thePool
.
release
(
p
);
}
...
...
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