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
f70e030f
Commit
f70e030f
authored
Jan 12, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - more test of partitioning wrt scans & lock modes
parent
f0834007
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
18 deletions
+52
-18
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+3
-3
ndb/test/ndbapi/testPartitioning.cpp
ndb/test/ndbapi/testPartitioning.cpp
+49
-15
No files found.
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
f70e030f
...
...
@@ -9818,7 +9818,7 @@ void Dbtc::sendScanTabConf(Signal* signal, ScanRecordPtr scanPtr) {
ops
+=
21
;
}
Uint32
left
=
scanPtr
.
p
->
scanNoFrag
-
scanPtr
.
p
->
scanNextFragId
;
int
left
=
scanPtr
.
p
->
scanNoFrag
-
scanPtr
.
p
->
scanNextFragId
;
Uint32
booked
=
scanPtr
.
p
->
m_booked_fragments_count
;
ScanTabConf
*
conf
=
(
ScanTabConf
*
)
&
signal
->
theData
[
0
];
...
...
@@ -9835,8 +9835,8 @@ 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
==
booked
);
if
(
curr
.
p
->
m_scan_frag_conf_status
&&
(
booked
<
left
))
bool
done
=
curr
.
p
->
m_scan_frag_conf_status
&&
(
left
<=
(
int
)
booked
);
if
(
curr
.
p
->
m_scan_frag_conf_status
&&
(
(
int
)
booked
<
left
))
booked
++
;
*
ops
++
=
curr
.
p
->
m_apiPtr
;
...
...
ndb/test/ndbapi/testPartitioning.cpp
View file @
f70e030f
...
...
@@ -22,17 +22,6 @@
#define GETNDB(ps) ((NDBT_NdbApiStep*)ps)->getNdb()
static
int
runLoadTable
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
records
=
ctx
->
getNumRecords
();
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
if
(
hugoTrans
.
loadTable
(
GETNDB
(
step
),
records
)
!=
0
){
return
NDBT_FAILED
;
}
return
NDBT_OK
;
}
static
Uint32
max_dks
=
0
;
static
...
...
@@ -238,10 +227,26 @@ run_tests(Ndb* p_ndb, HugoTransactions& hugoTrans, int records)
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
scanReadRecords
(
p_ndb
,
records
)
!=
0
)
Uint32
abort
=
23
;
for
(
Uint32
j
=
0
;
j
<
5
;
j
++
){
Uint32
parallelism
=
(
j
==
1
?
1
:
j
*
3
);
ndbout_c
(
"parallelism: %d"
,
parallelism
);
if
(
hugoTrans
.
scanReadRecords
(
p_ndb
,
records
,
abort
,
parallelism
,
NdbOperation
::
LM_Read
)
!=
0
)
{
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
scanReadRecords
(
p_ndb
,
records
,
abort
,
parallelism
,
NdbOperation
::
LM_Exclusive
)
!=
0
)
{
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
scanReadRecords
(
p_ndb
,
records
,
abort
,
parallelism
,
NdbOperation
::
LM_CommittedRead
)
!=
0
)
{
return
NDBT_FAILED
;
}
}
if
(
hugoTrans
.
clearTable
(
p_ndb
,
records
)
!=
0
)
{
...
...
@@ -297,6 +302,26 @@ run_index_dk(NDBT_Context* ctx, NDBT_Step* step)
return
run_tests
(
p_ndb
,
hugoTrans
,
records
);
}
static
int
run_startHint
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
Ndb
*
p_ndb
=
GETNDB
(
step
);
int
records
=
ctx
->
getNumRecords
();
const
NdbDictionary
::
Table
*
tab
=
p_ndb
->
getDictionary
()
->
getTable
(
ctx
->
getTab
()
->
getName
());
if
(
!
tab
)
return
NDBT_OK
;
HugoTransactions
hugoTrans
(
*
tab
);
if
(
hugoTrans
.
loadTable
(
p_ndb
,
records
)
!=
0
)
{
return
NDBT_FAILED
;
}
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testPartitioning
);
TESTCASE
(
"pk_dk"
,
...
...
@@ -332,6 +357,15 @@ TESTCASE("ordered_index_dk",
INITIALIZER
(
run_create_pk_index_drop
);
INITIALIZER
(
run_drop_table
);
}
TESTCASE
(
"startTransactionHint"
,
"Test startTransactionHint"
)
{
TC_PROPERTY
(
"distributionkey"
,
~
0
);
INITIALIZER
(
run_drop_table
);
INITIALIZER
(
run_create_table
);
INITIALIZER
(
run_startHint
);
INITIALIZER
(
run_drop_table
);
}
NDBT_TESTSUITE_END
(
testPartitioning
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
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