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
97a956ca
Commit
97a956ca
authored
Aug 25, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - fix some bug in testSRBank
parent
c6e8be98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
11 deletions
+37
-11
storage/ndb/test/ndbapi/testSRBank.cpp
storage/ndb/test/ndbapi/testSRBank.cpp
+37
-11
No files found.
storage/ndb/test/ndbapi/testSRBank.cpp
View file @
97a956ca
...
...
@@ -124,6 +124,7 @@ int runBankSum(NDBT_Context* ctx, NDBT_Step* step){
result = NDBT_FAILED; \
continue; }
static
int
restart_cluster
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
,
NdbRestarter
&
restarter
)
{
...
...
@@ -177,6 +178,7 @@ restart_cluster(NDBT_Context* ctx, NDBT_Step* step, NdbRestarter& restarter)
return
result
;
}
static
ndb_mgm_node_state
*
select_node_to_stop
(
Vector
<
ndb_mgm_node_state
>&
nodes
)
{
...
...
@@ -215,6 +217,7 @@ select_node_to_stop(Vector<ndb_mgm_node_state>& nodes)
}
}
static
ndb_mgm_node_state
*
select_node_to_start
(
Vector
<
ndb_mgm_node_state
>&
nodes
)
{
...
...
@@ -294,23 +297,27 @@ runMixRestart(NDBT_Context* ctx, NDBT_Step* step)
goto
loop
;
if
(
action
==
AA_RestartNode
)
{
g_err
<<
"Restarting "
<<
node
->
node_id
<<
endl
;
if
(
restarter
.
restartOneDbNode
(
node
->
node_id
,
false
,
false
,
true
))
return
NDBT_FAILED
;
}
if
(
action
==
AA_StopNode
)
{
else
g_err
<<
"Stopping "
<<
node
->
node_id
<<
endl
;
if
(
restarter
.
restartOneDbNode
(
node
->
node_id
,
false
,
true
,
true
))
return
NDBT_FAILED
;
node
->
node_status
=
NDB_MGM_NODE_STATUS_NOT_STARTED
;
}
break
;
if
(
restarter
.
restartOneDbNode
(
node
->
node_id
,
false
,
true
,
true
))
return
NDBT_FAILED
;
if
(
restarter
.
waitNodesNoStart
(
&
node
->
node_id
,
1
))
return
NDBT_FAILED
;
node
->
node_status
=
NDB_MGM_NODE_STATUS_NOT_STARTED
;
if
(
action
==
AA_StopNode
)
break
;
else
goto
start
;
}
case
AA_StartNode
:
if
((
node
=
select_node_to_start
(
nodes
))
==
0
)
goto
loop
;
start:
g_err
<<
"Starting "
<<
node
->
node_id
<<
endl
;
if
(
restarter
.
startNodes
(
&
node
->
node_id
,
1
))
return
NDBT_FAILED
;
...
...
@@ -321,7 +328,26 @@ runMixRestart(NDBT_Context* ctx, NDBT_Step* step)
break
;
}
}
Vector
<
int
>
not_started
;
{
ndb_mgm_node_state
*
node
=
0
;
while
((
node
=
select_node_to_start
(
nodes
)))
{
not_started
.
push_back
(
node
->
node_id
);
node
->
node_status
=
NDB_MGM_NODE_STATUS_STARTED
;
}
}
if
(
not_started
.
size
())
{
g_err
<<
"Starting stopped nodes "
<<
endl
;
if
(
restarter
.
startNodes
(
not_started
.
getBase
(),
not_started
.
size
()))
return
NDBT_FAILED
;
if
(
restarter
.
waitClusterStarted
())
return
NDBT_FAILED
;
}
ctx
->
stopTest
();
return
NDBT_OK
;
}
...
...
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