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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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 {
...
@@ -610,7 +610,7 @@ struct Fragrecord {
Uint32
noOfPagesToGrow
;
Uint32
noOfPagesToGrow
;
DLList
<
Page
>::
Head
emptyPrimPage
;
// allocated pages (not init)
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
SLList
<
Page
>::
Head
m_empty_pages
;
// Empty pages not in logical/physical map
Uint32
m_lcp_scan_op
;
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,
...
@@ -92,8 +92,8 @@ Dbtup::alloc_fix_rec(Fragrecord* const regFragPtr,
pagePtr
.
p
->
page_state
=
ZTH_MM_FREE
;
pagePtr
.
p
->
page_state
=
ZTH_MM_FREE
;
LocalDL
List
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
LocalDL
FifoList
<
Page
>
free_pages
(
c_page_pool
,
regFragPtr
->
thFreeFirst
);
free_pages
.
add
(
pagePtr
);
free_pages
.
add
First
(
pagePtr
);
}
else
{
}
else
{
ljam
();
ljam
();
/* ---------------------------------------------------------------- */
/* ---------------------------------------------------------------- */
...
@@ -176,7 +176,7 @@ Dbtup::alloc_tuple_from_page(Fragrecord* const regFragPtr,
...
@@ -176,7 +176,7 @@ Dbtup::alloc_tuple_from_page(Fragrecord* const regFragPtr,
/* ARE MAINTAINED EVEN AFTER A SYSTEM CRASH. */
/* ARE MAINTAINED EVEN AFTER A SYSTEM CRASH. */
/* ---------------------------------------------------------------- */
/* ---------------------------------------------------------------- */
ndbrequire
(
regPagePtr
->
page_state
==
ZTH_MM_FREE
);
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
);
free_pages
.
remove
((
Page
*
)
regPagePtr
);
regPagePtr
->
page_state
=
ZTH_MM_FULL
;
regPagePtr
->
page_state
=
ZTH_MM_FULL
;
}
}
...
@@ -196,10 +196,10 @@ void Dbtup::free_fix_rec(Fragrecord* regFragPtr,
...
@@ -196,10 +196,10 @@ void Dbtup::free_fix_rec(Fragrecord* regFragPtr,
{
{
ljam
();
ljam
();
PagePtr
pagePtr
=
{
(
Page
*
)
regPagePtr
,
key
->
m_page_no
};
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
);
ndbrequire
(
regPagePtr
->
page_state
==
ZTH_MM_FULL
);
regPagePtr
->
page_state
=
ZTH_MM_FREE
;
regPagePtr
->
page_state
=
ZTH_MM_FREE
;
free_pages
.
add
(
pagePtr
);
free_pages
.
add
Last
(
pagePtr
);
}
}
}
//Dbtup::freeTh()
}
//Dbtup::freeTh()
...
@@ -227,13 +227,13 @@ Dbtup::alloc_page(Tablerec* tabPtrP, Fragrecord* fragPtrP,
...
@@ -227,13 +227,13 @@ Dbtup::alloc_page(Tablerec* tabPtrP, Fragrecord* fragPtrP,
c_page_pool
.
getPtr
(
pagePtr
,
getRealpid
(
fragPtrP
,
page_no
));
c_page_pool
.
getPtr
(
pagePtr
,
getRealpid
(
fragPtrP
,
page_no
));
LocalDLList
<
Page
>
alloc_pages
(
c_page_pool
,
fragPtrP
->
emptyPrimPage
);
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
)
if
(
pagePtr
.
p
->
page_state
==
ZEMPTY_MM
)
{
{
convertThPage
((
Fix_page
*
)
pagePtr
.
p
,
tabPtrP
,
MM
);
convertThPage
((
Fix_page
*
)
pagePtr
.
p
,
tabPtrP
,
MM
);
pagePtr
.
p
->
page_state
=
ZTH_MM_FREE
;
pagePtr
.
p
->
page_state
=
ZTH_MM_FREE
;
alloc_pages
.
remove
(
pagePtr
);
alloc_pages
.
remove
(
pagePtr
);
free_pages
.
add
(
pagePtr
);
free_pages
.
add
First
(
pagePtr
);
}
}
*
ret
=
pagePtr
;
*
ret
=
pagePtr
;
...
@@ -257,7 +257,7 @@ Dbtup::alloc_fix_rowid(Fragrecord* regFragPtr,
...
@@ -257,7 +257,7 @@ Dbtup::alloc_fix_rowid(Fragrecord* regFragPtr,
}
}
Uint32
state
=
pagePtr
.
p
->
page_state
;
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
){
switch
(
state
){
case
ZTH_MM_FREE
:
case
ZTH_MM_FREE
:
if
(((
Fix_page
*
)
pagePtr
.
p
)
->
alloc_record
(
idx
)
!=
idx
)
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)
...
@@ -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
();
tmp
.
remove
();
}
}
...
...
storage/ndb/src/kernel/vm/DLFifoList.hpp
View file @
ef77deda
...
@@ -62,8 +62,9 @@ public:
...
@@ -62,8 +62,9 @@ public:
*/
*/
void
insert
(
Ptr
<
T
>
&
ptr
,
Ptr
<
T
>&
loc
);
void
insert
(
Ptr
<
T
>
&
ptr
,
Ptr
<
T
>&
loc
);
void
remove
();
void
remove
(
Ptr
<
T
>
&
);
void
remove
(
Ptr
<
T
>
&
);
void
remove
(
T
*
);
/**
/**
* Update i & p value according to <b>i</b>
* Update i & p value according to <b>i</b>
*/
*/
...
@@ -274,12 +275,28 @@ DLFifoListImpl<P,T,U>::insert(Ptr<T> & ptr, Ptr<T> & loc)
...
@@ -274,12 +275,28 @@ DLFifoListImpl<P,T,U>::insert(Ptr<T> & ptr, Ptr<T> & loc)
ptr
.
p
->
U
::
nextList
=
loc
.
i
;
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
>
template
<
typename
P
,
typename
T
,
typename
U
>
inline
inline
void
void
DLFifoListImpl
<
P
,
T
,
U
>::
remove
(
Ptr
<
T
>
&
p
)
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
ni
=
t
->
U
::
nextList
;
Uint32
pi
=
t
->
U
::
prevList
;
Uint32
pi
=
t
->
U
::
prevList
;
...
@@ -328,7 +345,7 @@ inline
...
@@ -328,7 +345,7 @@ inline
void
void
DLFifoListImpl
<
P
,
T
,
U
>::
release
(
Ptr
<
T
>
&
p
)
DLFifoListImpl
<
P
,
T
,
U
>::
release
(
Ptr
<
T
>
&
p
)
{
{
remove
(
p
);
remove
(
p
.
p
);
thePool
.
release
(
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