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
ed5b30df
Commit
ed5b30df
authored
Jan 12, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/home/jonas/src/mysql-5.0-ndb
parents
134e7f94
408b489e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
7 deletions
+63
-7
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+1
-1
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+13
-5
ndb/test/ndbapi/testScan.cpp
ndb/test/ndbapi/testScan.cpp
+44
-0
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+4
-0
ndb/test/src/HugoTransactions.cpp
ndb/test/src/HugoTransactions.cpp
+1
-1
No files found.
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
View file @
ed5b30df
...
...
@@ -1177,7 +1177,7 @@ public:
Uint32
nextScan
;
// Length of expected attribute information
Uint32
scanAiLength
;
union
{
Uint32
scanAiLength
;
Uint32
m_booked_fragments_count
;
}
;
Uint32
scanKeyLen
;
...
...
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
ed5b30df
...
...
@@ -3195,7 +3195,6 @@ void Dbtc::attrinfoDihReceivedLab(Signal* signal)
CacheRecord
*
const
regCachePtr
=
cachePtr
.
p
;
TcConnectRecord
*
const
regTcPtr
=
tcConnectptr
.
p
;
Uint16
Tnode
=
regTcPtr
->
tcNodedata
[
0
];
Uint16
TscanTakeOverInd
=
regCachePtr
->
scanTakeOverInd
;
TableRecordPtr
localTabptr
;
localTabptr
.
i
=
regCachePtr
->
tableref
;
...
...
@@ -8931,6 +8930,7 @@ void Dbtc::diFcountReqLab(Signal* signal, ScanRecordPtr scanptr)
}
scanptr
.
p
->
scanNextFragId
=
0
;
scanptr
.
p
->
m_booked_fragments_count
=
0
;
scanptr
.
p
->
scanState
=
ScanRecord
::
WAIT_FRAGMENT_COUNT
;
if
(
!
cachePtr
.
p
->
distributionKeyIndicator
)
...
...
@@ -9573,6 +9573,9 @@ void Dbtc::execSCAN_NEXTREQ(Signal* signal)
*/
jam
();
ndbrequire
(
scanptr
.
p
->
scanNextFragId
<
scanptr
.
p
->
scanNoFrag
);
jam
();
ndbassert
(
scanptr
.
p
->
m_booked_fragments_count
);
scanptr
.
p
->
m_booked_fragments_count
--
;
scanFragptr
.
p
->
scanFragState
=
ScanFragRec
::
WAIT_GET_PRIMCONF
;
tcConnectptr
.
i
=
scanptr
.
p
->
scanTcrec
;
...
...
@@ -9814,8 +9817,9 @@ void Dbtc::sendScanTabConf(Signal* signal, ScanRecordPtr scanPtr) {
jam
();
ops
+=
21
;
}
Uint32
left
=
scanPtr
.
p
->
scanNoFrag
-
scanPtr
.
p
->
scanNextFragId
;
Uint32
booked
=
scanPtr
.
p
->
m_booked_fragments_count
;
ScanTabConf
*
conf
=
(
ScanTabConf
*
)
&
signal
->
theData
[
0
];
conf
->
apiConnectPtr
=
apiConnectptr
.
p
->
ndbapiConnect
;
...
...
@@ -9831,8 +9835,10 @@ void Dbtc::sendScanTabConf(Signal* signal, ScanRecordPtr scanPtr) {
ScanFragRecPtr
curr
=
ptr
;
// Remove while iterating...
queued
.
next
(
ptr
);
bool
done
=
curr
.
p
->
m_scan_frag_conf_status
&&
--
left
;
bool
done
=
curr
.
p
->
m_scan_frag_conf_status
&&
(
left
==
booked
);
if
(
curr
.
p
->
m_scan_frag_conf_status
&&
(
booked
<
left
))
booked
++
;
*
ops
++
=
curr
.
p
->
m_apiPtr
;
*
ops
++
=
done
?
RNIL
:
curr
.
i
;
*
ops
++
=
(
curr
.
p
->
m_totalLen
<<
10
)
+
curr
.
p
->
m_ops
;
...
...
@@ -9850,8 +9856,10 @@ void Dbtc::sendScanTabConf(Signal* signal, ScanRecordPtr scanPtr) {
}
}
scanPtr
.
p
->
m_booked_fragments_count
=
booked
;
if
(
scanPtr
.
p
->
m_delivered_scan_frags
.
isEmpty
()
&&
scanPtr
.
p
->
m_running_scan_frags
.
isEmpty
()){
scanPtr
.
p
->
m_running_scan_frags
.
isEmpty
())
{
conf
->
requestInfo
=
op_count
|
ScanTabConf
::
EndOfData
;
releaseScanResources
(
scanPtr
);
}
...
...
ndb/test/ndbapi/testScan.cpp
View file @
ed5b30df
...
...
@@ -1065,6 +1065,44 @@ int runScanRestart(NDBT_Context* ctx, NDBT_Step* step){
}
int
runScanParallelism
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
loops
=
ctx
->
getNumLoops
()
+
3
;
int
records
=
ctx
->
getNumRecords
();
int
abort
=
ctx
->
getProperty
(
"AbortProb"
,
15
);
Uint32
fib
[]
=
{
1
,
2
};
Uint32
parallelism
=
0
;
// start with 0
int
i
=
0
;
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
while
(
i
<
loops
&&
!
ctx
->
isTestStopped
())
{
g_info
<<
i
<<
": "
;
if
(
hugoTrans
.
scanReadRecords
(
GETNDB
(
step
),
records
,
abort
,
parallelism
,
NdbOperation
::
LM_Read
)
!=
0
){
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
scanReadRecords
(
GETNDB
(
step
),
records
,
abort
,
parallelism
,
NdbOperation
::
LM_Exclusive
)
!=
0
){
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
scanReadRecords
(
GETNDB
(
step
),
records
,
abort
,
parallelism
,
NdbOperation
::
LM_CommittedRead
)
!=
0
){
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
scanUpdateRecords
(
GETNDB
(
step
),
records
,
abort
,
parallelism
)
!=
0
){
return
NDBT_FAILED
;
}
i
++
;
parallelism
=
fib
[
0
];
Uint32
next
=
fib
[
0
]
+
fib
[
1
];
fib
[
0
]
=
fib
[
1
];
fib
[
1
]
=
next
;
}
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testScan
);
TESTCASE
(
"ScanRead"
,
"Verify scan requirement: It should be possible "
\
...
...
@@ -1515,6 +1553,12 @@ TESTCASE("ScanRestart",
STEP
(
runScanRestart
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"ScanParallelism"
,
"Test scan with different parallelism"
){
INITIALIZER
(
runLoadTable
);
STEP
(
runScanParallelism
);
FINALIZER
(
runClearTable
);
}
NDBT_TESTSUITE_END
(
testScan
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
ed5b30df
...
...
@@ -345,6 +345,10 @@ max-time: 500
cmd: testScan
args: -n ScanRestart T1
max-time: 500
cmd: testScan
args: -n ScanParallelism
#
# DICT TESTS
max-time: 1500
...
...
ndb/test/src/HugoTransactions.cpp
View file @
ed5b30df
...
...
@@ -72,7 +72,7 @@ HugoTransactions::scanReadRecords(Ndb* pNdb,
return
NDBT_FAILED
;
}
if
(
pOp
->
readTuples
(
lm
)
)
{
if
(
pOp
->
readTuples
(
lm
,
0
,
parallelism
)
)
{
ERR
(
pTrans
->
getNdbError
());
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
...
...
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