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
cb6feb3a
Commit
cb6feb3a
authored
Dec 21, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - testIndex -n NFNR3
parent
84a91585
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
ndb/test/ndbapi/testIndex.cpp
ndb/test/ndbapi/testIndex.cpp
+8
-1
ndb/test/src/UtilTransactions.cpp
ndb/test/src/UtilTransactions.cpp
+18
-5
No files found.
ndb/test/ndbapi/testIndex.cpp
View file @
cb6feb3a
...
@@ -1277,7 +1277,7 @@ TESTCASE("CreateLoadDrop_O",
...
@@ -1277,7 +1277,7 @@ TESTCASE("CreateLoadDrop_O",
TESTCASE
(
"NFNR1"
,
TESTCASE
(
"NFNR1"
,
"Test that indexes are correctly maintained during node fail and node restart"
){
"Test that indexes are correctly maintained during node fail and node restart"
){
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
//TC_PROPERTY("
Threads", 2);
TC_PROPERTY
(
"Pause
Threads"
,
2
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runLoadTable
);
...
@@ -1292,6 +1292,7 @@ TESTCASE("NFNR1_O",
...
@@ -1292,6 +1292,7 @@ TESTCASE("NFNR1_O",
"Test that indexes are correctly maintained during node fail and node restart"
){
"Test that indexes are correctly maintained during node fail and node restart"
){
TC_PROPERTY
(
"OrderedIndex"
,
1
);
TC_PROPERTY
(
"OrderedIndex"
,
1
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"PauseThreads"
,
2
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runLoadTable
);
...
@@ -1305,6 +1306,7 @@ TESTCASE("NFNR1_O",
...
@@ -1305,6 +1306,7 @@ TESTCASE("NFNR1_O",
TESTCASE
(
"NFNR2"
,
TESTCASE
(
"NFNR2"
,
"Test that indexes are correctly maintained during node fail and node restart"
){
"Test that indexes are correctly maintained during node fail and node restart"
){
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"PauseThreads"
,
2
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createPkIndex
);
INITIALIZER
(
createPkIndex
);
...
@@ -1321,6 +1323,7 @@ TESTCASE("NFNR2_O",
...
@@ -1321,6 +1323,7 @@ TESTCASE("NFNR2_O",
"Test that indexes are correctly maintained during node fail and node restart"
){
"Test that indexes are correctly maintained during node fail and node restart"
){
TC_PROPERTY
(
"OrderedIndex"
,
1
);
TC_PROPERTY
(
"OrderedIndex"
,
1
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"PauseThreads"
,
2
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createPkIndex
);
INITIALIZER
(
createPkIndex
);
...
@@ -1336,6 +1339,7 @@ TESTCASE("NFNR2_O",
...
@@ -1336,6 +1339,7 @@ TESTCASE("NFNR2_O",
TESTCASE
(
"NFNR3"
,
TESTCASE
(
"NFNR3"
,
"Test that indexes are correctly maintained during node fail and node restart"
){
"Test that indexes are correctly maintained during node fail and node restart"
){
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"PauseThreads"
,
2
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createPkIndex
);
INITIALIZER
(
createPkIndex
);
...
@@ -1351,6 +1355,7 @@ TESTCASE("NFNR3_O",
...
@@ -1351,6 +1355,7 @@ TESTCASE("NFNR3_O",
"Test that indexes are correctly maintained during node fail and node restart"
){
"Test that indexes are correctly maintained during node fail and node restart"
){
TC_PROPERTY
(
"OrderedIndex"
,
1
);
TC_PROPERTY
(
"OrderedIndex"
,
1
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"PauseThreads"
,
2
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createPkIndex
);
INITIALIZER
(
createPkIndex
);
...
@@ -1365,6 +1370,7 @@ TESTCASE("NFNR3_O",
...
@@ -1365,6 +1370,7 @@ TESTCASE("NFNR3_O",
TESTCASE
(
"NFNR4"
,
TESTCASE
(
"NFNR4"
,
"Test that indexes are correctly maintained during node fail and node restart"
){
"Test that indexes are correctly maintained during node fail and node restart"
){
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"PauseThreads"
,
4
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createPkIndex
);
INITIALIZER
(
createPkIndex
);
...
@@ -1383,6 +1389,7 @@ TESTCASE("NFNR4_O",
...
@@ -1383,6 +1389,7 @@ TESTCASE("NFNR4_O",
"Test that indexes are correctly maintained during node fail and node restart"
){
"Test that indexes are correctly maintained during node fail and node restart"
){
TC_PROPERTY
(
"OrderedIndex"
,
1
);
TC_PROPERTY
(
"OrderedIndex"
,
1
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
TC_PROPERTY
(
"PauseThreads"
,
4
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
runClearTable
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createRandomIndex
);
INITIALIZER
(
createPkIndex
);
INITIALIZER
(
createPkIndex
);
...
...
ndb/test/src/UtilTransactions.cpp
View file @
cb6feb3a
...
@@ -629,7 +629,7 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
...
@@ -629,7 +629,7 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
parallelism
=
1
;
parallelism
=
1
;
while
(
true
){
while
(
true
){
restart:
if
(
retryAttempt
>=
retryMax
){
if
(
retryAttempt
>=
retryMax
){
g_info
<<
"ERROR: has retried this operation "
<<
retryAttempt
g_info
<<
"ERROR: has retried this operation "
<<
retryAttempt
<<
" times, failing!"
<<
endl
;
<<
" times, failing!"
<<
endl
;
...
@@ -719,11 +719,26 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
...
@@ -719,11 +719,26 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
// ndbout << row.c_str().c_str() << endl;
// ndbout << row.c_str().c_str() << endl;
if
(
readRowFromTableAndIndex
(
pNdb
,
if
(
readRowFromTableAndIndex
(
pNdb
,
pTrans
,
pTrans
,
pIndex
,
pIndex
,
row
)
!=
NDBT_OK
){
row
)
!=
NDBT_OK
){
while
((
eof
=
pOp
->
nextResult
(
false
))
==
0
);
if
(
eof
==
2
)
eof
=
pOp
->
nextResult
(
true
);
// this should give -1
if
(
eof
==
-
1
)
{
const
NdbError
err
=
pTrans
->
getNdbError
();
if
(
err
.
status
==
NdbError
::
TemporaryError
){
ERR
(
err
);
pNdb
->
closeTransaction
(
pTrans
);
NdbSleep_MilliSleep
(
50
);
retryAttempt
++
;
goto
restart
;
}
}
pNdb
->
closeTransaction
(
pTrans
);
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
return
NDBT_FAILED
;
}
}
...
@@ -736,7 +751,6 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
...
@@ -736,7 +751,6 @@ UtilTransactions::scanAndCompareUniqueIndex(Ndb* pNdb,
pNdb
->
closeTransaction
(
pTrans
);
pNdb
->
closeTransaction
(
pTrans
);
NdbSleep_MilliSleep
(
50
);
NdbSleep_MilliSleep
(
50
);
retryAttempt
++
;
retryAttempt
++
;
rows
--
;
continue
;
continue
;
}
}
ERR
(
err
);
ERR
(
err
);
...
@@ -811,7 +825,6 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
...
@@ -811,7 +825,6 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
check
=
pOp
->
readTuple
();
check
=
pOp
->
readTuple
();
if
(
check
==
-
1
)
{
if
(
check
==
-
1
)
{
ERR
(
pTrans1
->
getNdbError
());
ERR
(
pTrans1
->
getNdbError
());
pNdb
->
closeTransaction
(
pTrans1
);
goto
close_all
;
goto
close_all
;
}
}
...
@@ -943,7 +956,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
...
@@ -943,7 +956,7 @@ UtilTransactions::readRowFromTableAndIndex(Ndb* pNdb,
#if VERBOSE
#if VERBOSE
printf
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
#endif
scanTrans
->
refresh
();
check
=
pTrans1
->
execute
(
Commit
);
check
=
pTrans1
->
execute
(
Commit
);
if
(
check
==
-
1
)
{
if
(
check
==
-
1
)
{
const
NdbError
err
=
pTrans1
->
getNdbError
();
const
NdbError
err
=
pTrans1
->
getNdbError
();
...
...
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