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
2ef0b326
Commit
2ef0b326
authored
Oct 13, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
parents
2a25659b
039eb3e4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
19 deletions
+41
-19
ndb/include/mgmapi/ndbd_exit_codes.h
ndb/include/mgmapi/ndbd_exit_codes.h
+1
-0
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
+8
-2
ndb/src/kernel/error/ndbd_exit_codes.c
ndb/src/kernel/error/ndbd_exit_codes.c
+3
-0
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+24
-14
ndb/src/mgmsrv/MgmtSrvr.hpp
ndb/src/mgmsrv/MgmtSrvr.hpp
+5
-3
No files found.
ndb/include/mgmapi/ndbd_exit_codes.h
View file @
2ef0b326
...
@@ -104,6 +104,7 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
...
@@ -104,6 +104,7 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
/* NDBCNTR 6100-> */
/* NDBCNTR 6100-> */
#define NDBD_EXIT_RESTART_TIMEOUT 6100
#define NDBD_EXIT_RESTART_TIMEOUT 6100
#define NDBD_EXIT_RESTART_DURING_SHUTDOWN 6101
/* TC 6200-> */
/* TC 6200-> */
/* DIH 6300-> */
/* DIH 6300-> */
...
...
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
View file @
2ef0b326
...
@@ -525,6 +525,9 @@ Ndbcntr::execCNTR_START_REF(Signal * signal){
...
@@ -525,6 +525,9 @@ Ndbcntr::execCNTR_START_REF(Signal * signal){
cmasterNodeId
=
ref
->
masterNodeId
;
cmasterNodeId
=
ref
->
masterNodeId
;
sendCntrStartReq
(
signal
);
sendCntrStartReq
(
signal
);
return
;
return
;
case
CntrStartRef
:
:
StopInProgress
:
jam
();
progError
(
__LINE__
,
NDBD_EXIT_RESTART_DURING_SHUTDOWN
);
}
}
ndbrequire
(
false
);
ndbrequire
(
false
);
}
}
...
@@ -2022,7 +2025,9 @@ Ndbcntr::execSTOP_REQ(Signal* signal){
...
@@ -2022,7 +2025,9 @@ Ndbcntr::execSTOP_REQ(Signal* signal){
return
;
return
;
}
}
if
(
c_stopRec
.
stopReq
.
senderRef
!=
0
){
if
(
c_stopRec
.
stopReq
.
senderRef
!=
0
||
(
cmasterNodeId
==
getOwnNodeId
()
&&
!
c_start
.
m_starting
.
isclear
()))
{
/**
/**
* Requested a system shutdown
* Requested a system shutdown
*/
*/
...
@@ -2036,7 +2041,8 @@ Ndbcntr::execSTOP_REQ(Signal* signal){
...
@@ -2036,7 +2041,8 @@ Ndbcntr::execSTOP_REQ(Signal* signal){
/**
/**
* Requested a node shutdown
* Requested a node shutdown
*/
*/
if
(
StopReq
::
getSystemStop
(
c_stopRec
.
stopReq
.
requestInfo
))
if
(
c_stopRec
.
stopReq
.
senderRef
&&
StopReq
::
getSystemStop
(
c_stopRec
.
stopReq
.
requestInfo
))
ref
->
errorCode
=
StopRef
::
SystemShutdownInProgress
;
ref
->
errorCode
=
StopRef
::
SystemShutdownInProgress
;
else
else
ref
->
errorCode
=
StopRef
::
NodeShutdownInProgress
;
ref
->
errorCode
=
StopRef
::
NodeShutdownInProgress
;
...
...
ndb/src/kernel/error/ndbd_exit_codes.c
View file @
2ef0b326
...
@@ -101,6 +101,9 @@ static const ErrStruct errArray[] =
...
@@ -101,6 +101,9 @@ static const ErrStruct errArray[] =
{
NDBD_EXIT_RESTART_TIMEOUT
,
XCE
,
{
NDBD_EXIT_RESTART_TIMEOUT
,
XCE
,
"Total restart time too long, consider increasing StartFailureTimeout "
"Total restart time too long, consider increasing StartFailureTimeout "
"or investigate error(s) on other node(s)"
},
"or investigate error(s) on other node(s)"
},
{
NDBD_EXIT_RESTART_DURING_SHUTDOWN
,
XRE
,
"Node started while node shutdown in progress. "
"Please wait until shutdown complete before starting node"
},
/* DIH */
/* DIH */
{
NDBD_EXIT_MAX_CRASHED_REPLICAS
,
XFL
,
{
NDBD_EXIT_MAX_CRASHED_REPLICAS
,
XFL
,
...
...
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
2ef0b326
...
@@ -277,15 +277,13 @@ static ErrorItem errorTable[] =
...
@@ -277,15 +277,13 @@ static ErrorItem errorTable[] =
{
MgmtSrvr
::
NOT_POSSIBLE_TO_SEND_CONFIG_UPDATE_TO_PROCESS_TYPE
,
{
MgmtSrvr
::
NOT_POSSIBLE_TO_SEND_CONFIG_UPDATE_TO_PROCESS_TYPE
,
"It is not possible to send an update of a configuration variable "
"It is not possible to send an update of a configuration variable "
"to this kind of process."
},
"to this kind of process."
},
{
5026
,
"Node shutdown in progress"
},
{
MgmtSrvr
::
NODE_SHUTDOWN_IN_PROGESS
,
"Node shutdown in progress"
},
{
5027
,
"System shutdown in progress"
},
{
MgmtSrvr
::
SYSTEM_SHUTDOWN_IN_PROGRESS
,
"System shutdown in progress"
},
{
5028
,
"Node shutdown would cause system crash"
},
{
MgmtSrvr
::
NODE_SHUTDOWN_WOULD_CAUSE_SYSTEM_CRASH
,
{
5029
,
"Only one shutdown at a time is possible via mgm server"
},
"Node shutdown would cause system crash"
},
{
5060
,
"Operation not allowed in single user mode."
},
{
MgmtSrvr
::
NODE_NOT_API_NODE
,
"The specified node is not an API node."
},
{
5061
,
"DB is not in single user mode."
},
{
MgmtSrvr
::
OPERATION_NOT_ALLOWED_START_STOP
,
{
5062
,
"The specified node is not an API node."
},
"Operation not allowed while nodes are starting or stopping."
},
{
5063
,
"Cannot enter single user mode. DB nodes in inconsistent startlevel."
},
{
MgmtSrvr
::
NO_CONTACT_WITH_DB_NODES
,
"No contact with database nodes"
}
{
MgmtSrvr
::
NO_CONTACT_WITH_DB_NODES
,
"No contact with database nodes"
}
};
};
...
@@ -293,13 +291,13 @@ int MgmtSrvr::translateStopRef(Uint32 errCode)
...
@@ -293,13 +291,13 @@ int MgmtSrvr::translateStopRef(Uint32 errCode)
{
{
switch
(
errCode
){
switch
(
errCode
){
case
StopRef
:
:
NodeShutdownInProgress
:
case
StopRef
:
:
NodeShutdownInProgress
:
return
5026
;
return
NODE_SHUTDOWN_IN_PROGESS
;
break
;
break
;
case
StopRef
:
:
SystemShutdownInProgress
:
case
StopRef
:
:
SystemShutdownInProgress
:
return
5027
;
return
SYSTEM_SHUTDOWN_IN_PROGRESS
;
break
;
break
;
case
StopRef
:
:
NodeShutdownWouldCauseSystemCrash
:
case
StopRef
:
:
NodeShutdownWouldCauseSystemCrash
:
return
5028
;
return
NODE_SHUTDOWN_WOULD_CAUSE_SYSTEM_CRASH
;
break
;
break
;
}
}
return
4999
;
return
4999
;
...
@@ -989,6 +987,18 @@ int MgmtSrvr::sendSTOP_REQ(NodeId nodeId,
...
@@ -989,6 +987,18 @@ int MgmtSrvr::sendSTOP_REQ(NodeId nodeId,
int
MgmtSrvr
::
stopNode
(
int
nodeId
,
bool
abort
)
int
MgmtSrvr
::
stopNode
(
int
nodeId
,
bool
abort
)
{
{
if
(
!
abort
)
{
NodeId
nodeId
=
0
;
ClusterMgr
::
Node
node
;
while
(
getNextNodeId
(
&
nodeId
,
NDB_MGM_NODE_TYPE_NDB
))
{
node
=
theFacade
->
theClusterMgr
->
getNodeInfo
(
nodeId
);
if
((
node
.
m_state
.
startLevel
!=
NodeState
::
SL_STARTED
)
&&
(
node
.
m_state
.
startLevel
!=
NodeState
::
SL_NOTHING
))
return
OPERATION_NOT_ALLOWED_START_STOP
;
}
}
NodeBitmask
nodes
;
NodeBitmask
nodes
;
return
sendSTOP_REQ
(
nodeId
,
return
sendSTOP_REQ
(
nodeId
,
nodes
,
nodes
,
...
@@ -1027,7 +1037,7 @@ int MgmtSrvr::stop(int * stopCount, bool abort)
...
@@ -1027,7 +1037,7 @@ int MgmtSrvr::stop(int * stopCount, bool abort)
int
MgmtSrvr
::
enterSingleUser
(
int
*
stopCount
,
Uint32
singleUserNodeId
)
int
MgmtSrvr
::
enterSingleUser
(
int
*
stopCount
,
Uint32
singleUserNodeId
)
{
{
if
(
getNodeType
(
singleUserNodeId
)
!=
NDB_MGM_NODE_TYPE_API
)
if
(
getNodeType
(
singleUserNodeId
)
!=
NDB_MGM_NODE_TYPE_API
)
return
5062
;
return
NODE_NOT_API_NODE
;
NodeId
nodeId
=
0
;
NodeId
nodeId
=
0
;
ClusterMgr
::
Node
node
;
ClusterMgr
::
Node
node
;
while
(
getNextNodeId
(
&
nodeId
,
NDB_MGM_NODE_TYPE_NDB
))
while
(
getNextNodeId
(
&
nodeId
,
NDB_MGM_NODE_TYPE_NDB
))
...
@@ -1035,7 +1045,7 @@ int MgmtSrvr::enterSingleUser(int * stopCount, Uint32 singleUserNodeId)
...
@@ -1035,7 +1045,7 @@ int MgmtSrvr::enterSingleUser(int * stopCount, Uint32 singleUserNodeId)
node
=
theFacade
->
theClusterMgr
->
getNodeInfo
(
nodeId
);
node
=
theFacade
->
theClusterMgr
->
getNodeInfo
(
nodeId
);
if
((
node
.
m_state
.
startLevel
!=
NodeState
::
SL_STARTED
)
&&
if
((
node
.
m_state
.
startLevel
!=
NodeState
::
SL_STARTED
)
&&
(
node
.
m_state
.
startLevel
!=
NodeState
::
SL_NOTHING
))
(
node
.
m_state
.
startLevel
!=
NodeState
::
SL_NOTHING
))
return
5063
;
return
OPERATION_NOT_ALLOWED_START_STOP
;
}
}
NodeBitmask
nodes
;
NodeBitmask
nodes
;
int
ret
=
sendSTOP_REQ
(
0
,
int
ret
=
sendSTOP_REQ
(
0
,
...
...
ndb/src/mgmsrv/MgmtSrvr.hpp
View file @
2ef0b326
...
@@ -174,10 +174,12 @@ public:
...
@@ -174,10 +174,12 @@ public:
STATIC_CONST
(
NODE_SHUTDOWN_IN_PROGESS
=
5026
);
STATIC_CONST
(
NODE_SHUTDOWN_IN_PROGESS
=
5026
);
STATIC_CONST
(
SYSTEM_SHUTDOWN_IN_PROGRESS
=
5027
);
STATIC_CONST
(
SYSTEM_SHUTDOWN_IN_PROGRESS
=
5027
);
STATIC_CONST
(
NODE_SHUTDOWN_WOULD_CAUSE_SYSTEM_CRASH
=
5028
);
STATIC_CONST
(
NODE_SHUTDOWN_WOULD_CAUSE_SYSTEM_CRASH
=
5028
);
STATIC_CONST
(
NO_CONTACT_WITH_CLUSTER
=
6666
);
STATIC_CONST
(
OPERATION_IN_PROGRESS
=
6667
);
STATIC_CONST
(
NO_CONTACT_WITH_DB_NODES
=
5030
);
STATIC_CONST
(
NO_CONTACT_WITH_DB_NODES
=
5030
);
STATIC_CONST
(
NODE_NOT_API_NODE
=
5062
);
STATIC_CONST
(
OPERATION_NOT_ALLOWED_START_STOP
=
5063
);
/**
/**
* This enum specifies the different signal loggig modes possible to set
* This enum specifies the different signal loggig modes possible to set
* with the setSignalLoggingMode method.
* with the setSignalLoggingMode method.
...
...
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