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
f7be6faa
Commit
f7be6faa
authored
Jan 24, 2008
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/51-ndb
parents
79e8f3e4
4d552dbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
54 deletions
+61
-54
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
+61
-54
No files found.
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
View file @
f7be6faa
...
@@ -54,7 +54,14 @@ Dbtup::execACC_SCANREQ(Signal* signal)
...
@@ -54,7 +54,14 @@ Dbtup::execACC_SCANREQ(Signal* signal)
// flags
// flags
Uint32
bits
=
0
;
Uint32
bits
=
0
;
if
(
!
AccScanReq
::
getLcpScanFlag
(
req
->
requestInfo
))
if
(
AccScanReq
::
getLcpScanFlag
(
req
->
requestInfo
))
{
jam
();
bits
|=
ScanOp
::
SCAN_LCP
;
c_scanOpPool
.
getPtr
(
scanPtr
,
c_lcp_scan_op
);
}
else
{
{
// seize from pool and link to per-fragment list
// seize from pool and link to per-fragment list
LocalDLList
<
ScanOp
>
list
(
c_scanOpPool
,
frag
.
m_scanList
);
LocalDLList
<
ScanOp
>
list
(
c_scanOpPool
,
frag
.
m_scanList
);
...
@@ -62,37 +69,26 @@ Dbtup::execACC_SCANREQ(Signal* signal)
...
@@ -62,37 +69,26 @@ Dbtup::execACC_SCANREQ(Signal* signal)
jam
();
jam
();
break
;
break
;
}
}
}
if
(
!
AccScanReq
::
getNoDiskScanFlag
(
req
->
requestInfo
)
&&
tablePtr
.
p
->
m_no_of_disk_attributes
)
if
(
!
AccScanReq
::
getNoDiskScanFlag
(
req
->
requestInfo
)
{
&&
tablePtr
.
p
->
m_no_of_disk_attributes
)
bits
|=
ScanOp
::
SCAN_DD
;
{
}
bits
|=
ScanOp
::
SCAN_DD
;
}
bool
mm
=
(
bits
&
ScanOp
::
SCAN_DD
);
if
(
tablePtr
.
p
->
m_attributes
[
mm
].
m_no_of_varsize
>
0
)
{
bool
mm
=
(
bits
&
ScanOp
::
SCAN_DD
);
bits
|=
ScanOp
::
SCAN_VS
;
if
(
tablePtr
.
p
->
m_attributes
[
mm
].
m_no_of_varsize
>
0
)
{
bits
|=
ScanOp
::
SCAN_VS
;
// disk pages have fixed page format
ndbrequire
(
!
(
bits
&
ScanOp
::
SCAN_DD
));
}
if
(
!
AccScanReq
::
getReadCommittedFlag
(
req
->
requestInfo
))
{
if
(
AccScanReq
::
getLockMode
(
req
->
requestInfo
)
==
0
)
bits
|=
ScanOp
::
SCAN_LOCK_SH
;
else
bits
|=
ScanOp
::
SCAN_LOCK_EX
;
}
}
else
{
jam
();
// LCP scan and disk
ndbrequire
(
frag
.
m_lcp_scan_op
==
c_lcp_scan_op
);
// disk pages have fixed page format
c_scanOpPool
.
getPtr
(
scanPtr
,
frag
.
m_lcp_scan_op
);
ndbrequire
(
!
(
bits
&
ScanOp
::
SCAN_DD
));
ndbrequire
(
scanPtr
.
p
->
m_fragPtrI
==
fragPtr
.
i
);
}
bits
|=
ScanOp
::
SCAN_LCP
;
if
(
!
AccScanReq
::
getReadCommittedFlag
(
req
->
requestInfo
))
{
if
(
tablePtr
.
p
->
m_attributes
[
MM
].
m_no_of_varsize
>
0
)
{
if
(
AccScanReq
::
getLockMode
(
req
->
requestInfo
)
==
0
)
bits
|=
ScanOp
::
SCAN_VS
;
bits
|=
ScanOp
::
SCAN_LOCK_SH
;
}
else
bits
|=
ScanOp
::
SCAN_LOCK_EX
;
}
}
if
(
AccScanReq
::
getNRScanFlag
(
req
->
requestInfo
))
if
(
AccScanReq
::
getNRScanFlag
(
req
->
requestInfo
))
...
@@ -112,6 +108,13 @@ Dbtup::execACC_SCANREQ(Signal* signal)
...
@@ -112,6 +108,13 @@ Dbtup::execACC_SCANREQ(Signal* signal)
jam
();
jam
();
scanPtr
.
p
->
m_endPage
=
RNIL
;
scanPtr
.
p
->
m_endPage
=
RNIL
;
}
}
if
(
AccScanReq
::
getLcpScanFlag
(
req
->
requestInfo
))
{
jam
();
ndbrequire
((
bits
&
ScanOp
::
SCAN_DD
)
==
0
);
ndbrequire
((
bits
&
ScanOp
::
SCAN_LOCK
)
==
0
);
}
// set up scan op
// set up scan op
new
(
scanPtr
.
p
)
ScanOp
();
new
(
scanPtr
.
p
)
ScanOp
();
...
@@ -1159,16 +1162,17 @@ Dbtup::releaseScanOp(ScanOpPtr& scanPtr)
...
@@ -1159,16 +1162,17 @@ Dbtup::releaseScanOp(ScanOpPtr& scanPtr)
fragPtr
.
i
=
scanPtr
.
p
->
m_fragPtrI
;
fragPtr
.
i
=
scanPtr
.
p
->
m_fragPtrI
;
ptrCheckGuard
(
fragPtr
,
cnoOfFragrec
,
fragrecord
);
ptrCheckGuard
(
fragPtr
,
cnoOfFragrec
,
fragrecord
);
if
(
!
(
scanPtr
.
p
->
m_bits
&
ScanOp
::
SCAN_LCP
)
)
if
(
scanPtr
.
p
->
m_bits
&
ScanOp
::
SCAN_LCP
)
{
{
LocalDLList
<
ScanOp
>
list
(
c_scanOpPool
,
fragPtr
.
p
->
m_scanList
);
jam
();
list
.
release
(
scanPtr
);
fragPtr
.
p
->
m_lcp_scan_op
=
RNIL
;
scanPtr
.
p
->
m_fragPtrI
=
RNIL
;
}
}
else
else
{
{
ndbrequire
(
fragPtr
.
p
->
m_lcp_scan_op
==
scanPtr
.
i
);
jam
(
);
fragPtr
.
p
->
m_lcp_scan_op
=
RNIL
;
LocalDLList
<
ScanOp
>
list
(
c_scanOpPool
,
fragPtr
.
p
->
m_scanList
);
scanPtr
.
p
->
m_fragPtrI
=
RNIL
;
list
.
release
(
scanPtr
)
;
}
}
}
}
...
@@ -1181,21 +1185,24 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal)
...
@@ -1181,21 +1185,24 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal)
tablePtr
.
i
=
req
->
tableId
;
tablePtr
.
i
=
req
->
tableId
;
ptrCheckGuard
(
tablePtr
,
cnoOfTablerec
,
tablerec
);
ptrCheckGuard
(
tablePtr
,
cnoOfTablerec
,
tablerec
);
jam
();
if
(
tablePtr
.
p
->
m_no_of_disk_attributes
)
FragrecordPtr
fragPtr
;
{
Uint32
fragId
=
req
->
fragmentId
;
jam
();
fragPtr
.
i
=
RNIL
;
FragrecordPtr
fragPtr
;
getFragmentrec
(
fragPtr
,
fragId
,
tablePtr
.
p
);
Uint32
fragId
=
req
->
fragmentId
;
ndbrequire
(
fragPtr
.
i
!=
RNIL
);
fragPtr
.
i
=
RNIL
;
Fragrecord
&
frag
=
*
fragPtr
.
p
;
getFragmentrec
(
fragPtr
,
fragId
,
tablePtr
.
p
);
ndbrequire
(
fragPtr
.
i
!=
RNIL
);
ndbrequire
(
frag
.
m_lcp_scan_op
==
RNIL
&&
c_lcp_scan_op
!=
RNIL
);
Fragrecord
&
frag
=
*
fragPtr
.
p
;
frag
.
m_lcp_scan_op
=
c_lcp_scan_op
;
ScanOpPtr
scanPtr
;
ndbrequire
(
frag
.
m_lcp_scan_op
==
RNIL
&&
c_lcp_scan_op
!=
RNIL
);
c_scanOpPool
.
getPtr
(
scanPtr
,
frag
.
m_lcp_scan_op
);
frag
.
m_lcp_scan_op
=
c_lcp_scan_op
;
ndbrequire
(
scanPtr
.
p
->
m_fragPtrI
==
RNIL
);
ScanOpPtr
scanPtr
;
scanPtr
.
p
->
m_fragPtrI
=
fragPtr
.
i
;
c_scanOpPool
.
getPtr
(
scanPtr
,
frag
.
m_lcp_scan_op
);
ndbrequire
(
scanPtr
.
p
->
m_fragPtrI
==
RNIL
);
scanFirst
(
signal
,
scanPtr
);
scanPtr
.
p
->
m_fragPtrI
=
fragPtr
.
i
;
scanPtr
.
p
->
m_state
=
ScanOp
::
First
;
scanFirst
(
signal
,
scanPtr
);
scanPtr
.
p
->
m_state
=
ScanOp
::
First
;
}
}
}
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