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
61c6f532
Commit
61c6f532
authored
Dec 01, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
add testcase for bug#24717 + fix typo
parent
9d1ff70e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
6 deletions
+64
-6
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+18
-4
ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp
ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp
+2
-1
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
+1
-1
ndb/test/ndbapi/testNodeRestart.cpp
ndb/test/ndbapi/testNodeRestart.cpp
+39
-0
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
View file @
61c6f532
...
...
@@ -91,6 +91,7 @@ Cmvmi::Cmvmi(const Configuration & conf) :
addRecSignal
(
GSN_DUMP_STATE_ORD
,
&
Cmvmi
::
execDUMP_STATE_ORD
);
addRecSignal
(
GSN_TESTSIG
,
&
Cmvmi
::
execTESTSIG
);
addRecSignal
(
GSN_NODE_START_REP
,
&
Cmvmi
::
execNODE_START_REP
,
true
);
subscriberPool
.
setSize
(
5
);
...
...
@@ -423,7 +424,8 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal)
if
(
len
==
2
){
#ifdef ERROR_INSERT
if
(
!
(
ERROR_INSERTED
(
9000
)
&&
c_error_9000_nodes_mask
.
get
(
tStartingNode
)))
if
(
!
((
ERROR_INSERTED
(
9000
)
||
ERROR_INSERTED
(
9002
))
&&
c_error_9000_nodes_mask
.
get
(
tStartingNode
)))
#endif
{
globalTransporterRegistry
.
do_connect
(
tStartingNode
);
...
...
@@ -444,7 +446,8 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal)
jam
();
#ifdef ERROR_INSERT
if
(
ERROR_INSERTED
(
9000
)
&&
c_error_9000_nodes_mask
.
get
(
i
))
if
((
ERROR_INSERTED
(
9000
)
||
ERROR_INSERTED
(
9002
))
&&
c_error_9000_nodes_mask
.
get
(
i
))
continue
;
#endif
...
...
@@ -1142,9 +1145,9 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
}
#ifdef ERROR_INSERT
if
(
arg
==
9000
)
if
(
arg
==
9000
||
arg
==
9002
)
{
SET_ERROR_INSERT_VALUE
(
9000
);
SET_ERROR_INSERT_VALUE
(
arg
);
for
(
Uint32
i
=
1
;
i
<
signal
->
getLength
();
i
++
)
c_error_9000_nodes_mask
.
set
(
signal
->
theData
[
i
]);
}
...
...
@@ -1191,6 +1194,17 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
#endif
}
//Cmvmi::execDUMP_STATE_ORD()
void
Cmvmi
::
execNODE_START_REP
(
Signal
*
signal
)
{
#ifdef ERROR_INSERT
if
(
ERROR_INSERTED
(
9002
)
&&
signal
->
theData
[
0
]
==
getOwnNodeId
())
{
signal
->
theData
[
0
]
=
9001
;
execDUMP_STATE_ORD
(
signal
);
}
#endif
}
BLOCK_FUNCTIONS
(
Cmvmi
)
...
...
ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp
View file @
61c6f532
...
...
@@ -72,7 +72,8 @@ private:
void
handleSET_VAR_REQ
(
Signal
*
signal
);
void
execTESTSIG
(
Signal
*
signal
);
void
execNODE_START_REP
(
Signal
*
signal
);
char
theErrorMessage
[
256
];
void
sendSTTORRY
(
Signal
*
signal
);
...
...
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
View file @
61c6f532
...
...
@@ -269,7 +269,7 @@ Dbdih::Dbdih(const class Configuration & config):
addRecSignal
(
GSN_DICT_LOCK_CONF
,
&
Dbdih
::
execDICT_LOCK_CONF
);
addRecSignal
(
GSN_DICT_LOCK_REF
,
&
Dbdih
::
execDICT_LOCK_REF
);
addRecSignal
(
GSN_NODE_START_REP
,
&
Dbdih
::
execNODE_START_REP
);
addRecSignal
(
GSN_NODE_START_REP
,
&
Dbdih
::
execNODE_START_REP
,
true
);
apiConnectRecord
=
0
;
connectRecord
=
0
;
...
...
ndb/test/ndbapi/testNodeRestart.cpp
View file @
61c6f532
...
...
@@ -23,6 +23,7 @@
#include <Vector.hpp>
#include <signaldata/DumpStateOrd.hpp>
#include <Bitmask.hpp>
#include <RefConvert.hpp>
int
runLoadTable
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
...
...
@@ -919,6 +920,41 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
return
NDBT_OK
;
}
int
runBug24717
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
restarter
;
Ndb
*
pNdb
=
GETNDB
(
step
);
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
int
dump
[]
=
{
9002
,
0
}
;
Uint32
ownNode
=
refToNode
(
pNdb
->
getReference
());
dump
[
1
]
=
ownNode
;
for
(;
loops
;
loops
--
)
{
int
nodeId
=
restarter
.
getRandomNotMasterNodeId
(
rand
());
restarter
.
restartOneDbNode
(
nodeId
,
false
,
true
,
true
);
restarter
.
waitNodesNoStart
(
&
nodeId
,
1
);
if
(
restarter
.
dumpStateOneNode
(
nodeId
,
dump
,
2
))
return
NDBT_FAILED
;
restarter
.
startNodes
(
&
nodeId
,
1
);
for
(
Uint32
i
=
0
;
i
<
100
;
i
++
)
{
hugoTrans
.
pkReadRecords
(
pNdb
,
100
,
1
,
NdbOperation
::
LM_CommittedRead
);
}
restarter
.
waitClusterStarted
();
}
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testNodeRestart
);
TESTCASE
(
"NoLoad"
,
...
...
@@ -1232,6 +1268,9 @@ TESTCASE("Bug20185",
STEP
(
runBug20185
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"Bug24717"
,
""
){
INITIALIZER
(
runBug24717
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
61c6f532
...
...
@@ -457,6 +457,10 @@ max-time: 1000
cmd: testIndex
args: -n Bug21384
max-time: 1000
cmd: testNodeRestart
args: -n Bug24717 T1
# OLD FLEX
max-time: 500
cmd: flexBench
...
...
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