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
41c876c3
Commit
41c876c3
authored
Aug 21, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
21bfd984
8ea0b133
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
storage/ndb/src/kernel/blocks/pgman.cpp
storage/ndb/src/kernel/blocks/pgman.cpp
+19
-6
No files found.
storage/ndb/src/kernel/blocks/pgman.cpp
View file @
41c876c3
...
@@ -442,13 +442,15 @@ Pgman::release_page_entry(Ptr<Page_entry>& ptr)
...
@@ -442,13 +442,15 @@ Pgman::release_page_entry(Ptr<Page_entry>& ptr)
#endif
#endif
Page_state
state
=
ptr
.
p
->
m_state
;
Page_state
state
=
ptr
.
p
->
m_state
;
ndbrequire
(
!
(
state
&
Page_entry
::
REQUEST
));
ndbrequire
(
ptr
.
p
->
m_requests
.
isEmpty
());
ndbrequire
(
ptr
.
p
->
m_requests
.
isEmpty
());
ndbrequire
(
!
(
state
&
Page_entry
::
ONSTACK
));
ndbrequire
(
!
(
state
&
Page_entry
::
ONSTACK
));
ndbrequire
(
!
(
state
&
Page_entry
::
ONQUEUE
));
ndbrequire
(
!
(
state
&
Page_entry
::
ONQUEUE
));
ndbrequire
(
ptr
.
p
->
m_real_page_i
==
RNIL
);
ndbrequire
(
ptr
.
p
->
m_real_page_i
==
RNIL
);
if
(
!
(
state
&
Page_entry
::
LOCKED
))
ndbrequire
(
!
(
state
&
Page_entry
::
REQUEST
));
set_page_state
(
ptr
,
0
);
set_page_state
(
ptr
,
0
);
m_page_hashlist
.
remove
(
ptr
);
m_page_hashlist
.
remove
(
ptr
);
m_page_entry_pool
.
release
(
ptr
);
m_page_entry_pool
.
release
(
ptr
);
...
@@ -1476,7 +1478,7 @@ Pgman::fsreadreq(Signal* signal, Ptr<Page_entry> ptr)
...
@@ -1476,7 +1478,7 @@ Pgman::fsreadreq(Signal* signal, Ptr<Page_entry> ptr)
FsReadWriteReq
::
fsFormatGlobalPage
);
FsReadWriteReq
::
fsFormatGlobalPage
);
req
->
data
.
pageData
[
0
]
=
ptr
.
p
->
m_real_page_i
;
req
->
data
.
pageData
[
0
]
=
ptr
.
p
->
m_real_page_i
;
sendSignal
(
NDBFS_REF
,
GSN_FSREADREQ
,
signal
,
sendSignal
(
NDBFS_REF
,
GSN_FSREADREQ
,
signal
,
FsReadWriteReq
::
FixedLength
+
1
,
JB
B
);
FsReadWriteReq
::
FixedLength
+
1
,
JB
A
);
}
}
void
void
...
@@ -1518,8 +1520,19 @@ Pgman::fswritereq(Signal* signal, Ptr<Page_entry> ptr)
...
@@ -1518,8 +1520,19 @@ Pgman::fswritereq(Signal* signal, Ptr<Page_entry> ptr)
FsReadWriteReq
::
setFormatFlag
(
req
->
operationFlag
,
FsReadWriteReq
::
setFormatFlag
(
req
->
operationFlag
,
FsReadWriteReq
::
fsFormatGlobalPage
);
FsReadWriteReq
::
fsFormatGlobalPage
);
req
->
data
.
pageData
[
0
]
=
ptr
.
p
->
m_real_page_i
;
req
->
data
.
pageData
[
0
]
=
ptr
.
p
->
m_real_page_i
;
#if ERROR_INSERT_CODE
if
(
ptr
.
p
->
m_state
&
Page_entry
::
LOCKED
)
{
sendSignalWithDelay
(
NDBFS_REF
,
GSN_FSWRITEREQ
,
signal
,
3000
,
FsReadWriteReq
::
FixedLength
+
1
);
ndbout_c
(
"pageout locked (3s)"
);
return
;
}
#endif
sendSignal
(
NDBFS_REF
,
GSN_FSWRITEREQ
,
signal
,
sendSignal
(
NDBFS_REF
,
GSN_FSWRITEREQ
,
signal
,
FsReadWriteReq
::
FixedLength
+
1
,
JB
B
);
FsReadWriteReq
::
FixedLength
+
1
,
JB
A
);
}
}
void
void
...
@@ -1636,7 +1649,7 @@ Pgman::get_page(Signal* signal, Ptr<Page_entry> ptr, Page_request page_req)
...
@@ -1636,7 +1649,7 @@ Pgman::get_page(Signal* signal, Ptr<Page_entry> ptr, Page_request page_req)
}
}
}
}
if
(
!
(
req_flags
&
Page_request
::
LOCK_PAGE
))
if
(
!
(
req_flags
&
(
Page_request
::
LOCK_PAGE
|
Page_request
::
UNLOCK_PAGE
)
))
{
{
ndbrequire
(
!
(
state
&
Page_entry
::
LOCKED
));
ndbrequire
(
!
(
state
&
Page_entry
::
LOCKED
));
}
}
...
@@ -1675,7 +1688,7 @@ Pgman::get_page(Signal* signal, Ptr<Page_entry> ptr, Page_request page_req)
...
@@ -1675,7 +1688,7 @@ Pgman::get_page(Signal* signal, Ptr<Page_entry> ptr, Page_request page_req)
if
(
req_flags
&
Page_request
::
UNLOCK_PAGE
)
if
(
req_flags
&
Page_request
::
UNLOCK_PAGE
)
{
{
state
&=
~
Page_entry
::
LOCKED
;
// keep it locked
}
}
ptr
.
p
->
m_busy_count
+=
busy_count
;
ptr
.
p
->
m_busy_count
+=
busy_count
;
...
...
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