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
1778ac4f
Commit
1778ac4f
authored
20 years ago
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NDB ndb_mgm: fix dump and signal log (more to do)
parent
f05a92ce
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
67 deletions
+38
-67
ndb/include/mgmapi/mgmapi.h
ndb/include/mgmapi/mgmapi.h
+9
-2
ndb/src/common/debugger/signaldata/SignalNames.cpp
ndb/src/common/debugger/signaldata/SignalNames.cpp
+2
-0
ndb/src/mgmapi/mgmapi.cpp
ndb/src/mgmapi/mgmapi.cpp
+6
-3
ndb/src/mgmclient/CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp
+21
-62
No files found.
ndb/include/mgmapi/mgmapi.h
View file @
1778ac4f
...
...
@@ -122,7 +122,10 @@ extern "C" {
/* Service errors - Single User Mode */
NDB_MGM_COULD_NOT_ENTER_SINGLE_USER_MODE
=
4001
,
NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE
=
4002
NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE
=
4002
,
/* Usage errors */
NDB_MGM_USAGE_ERROR
=
5001
};
struct
Ndb_Mgm_Error_Msg
{
...
...
@@ -158,7 +161,11 @@ extern "C" {
{
NDB_MGM_COULD_NOT_ENTER_SINGLE_USER_MODE
,
"Could not enter single user mode"
},
{
NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE
,
"Could not exit single user mode"
}
"Could not exit single user mode"
},
/* Usage errors */
{
NDB_MGM_USAGE_ERROR
,
"Usage error"
}
};
const
int
ndb_mgm_noOfErrorMsgs
=
...
...
This diff is collapsed.
Click to expand it.
ndb/src/common/debugger/signaldata/SignalNames.cpp
View file @
1778ac4f
...
...
@@ -446,6 +446,8 @@ const GsnName SignalNames [] = {
,{
GSN_STOP_REQ
,
"STOP_REQ"
}
,{
GSN_STOP_REF
,
"STOP_REF"
}
,{
GSN_API_VERSION_REQ
,
"API_VERSION_REQ"
}
,{
GSN_API_VERSION_CONF
,
"API_VERSION_CONF"
}
,{
GSN_ABORT_ALL_REQ
,
"ABORT_ALL_REQ"
}
,{
GSN_ABORT_ALL_REF
,
"ABORT_ALL_REF"
}
...
...
This diff is collapsed.
Click to expand it.
ndb/src/mgmapi/mgmapi.cpp
View file @
1778ac4f
...
...
@@ -1153,11 +1153,14 @@ ndb_mgm_dump_state(NdbMgmHandle handle, int nodeId, int* _args,
CHECK_CONNECTED
(
handle
,
-
1
);
char
buf
[
256
];
char
buf2
[
6
];
buf
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
_num_args
;
i
++
){
snprintf
(
buf2
,
6
,
"%d "
,
_args
[
i
]);
strncat
(
buf
,
buf2
,
256
);
unsigned
n
=
strlen
(
buf
);
if
(
n
+
20
>
sizeof
(
buf
))
{
SET_ERROR
(
handle
,
NDB_MGM_USAGE_ERROR
,
"arguments too long"
);
return
-
1
;
}
sprintf
(
buf
+
n
,
"%s%d"
,
i
?
" "
:
""
,
_args
[
i
]);
}
Properties
args
;
...
...
This diff is collapsed.
Click to expand it.
ndb/src/mgmclient/CommandInterpreter.cpp
View file @
1778ac4f
...
...
@@ -1363,36 +1363,29 @@ CommandInterpreter::executeLog(int processId,
if
(
!
parseBlockSpecification
(
parameters
,
blocks
))
{
return
;
}
int
len
=
0
;
int
len
=
1
;
Uint32
i
;
for
(
i
=
0
;
i
<
blocks
.
size
();
i
++
)
{
ndbout_c
(
"blocks %s %d"
,
blocks
[
i
],
strlen
(
blocks
[
i
]));
len
+=
strlen
(
blocks
[
i
]);
len
+=
strlen
(
blocks
[
i
])
+
1
;
}
len
+=
blocks
.
size
()
*
2
;
char
*
blockNames
=
(
char
*
)
my_malloc
(
len
,
MYF
(
MY_WME
));
My_auto_ptr
<
char
>
ap1
(
blockNames
);
blockNames
[
0
]
=
0
;
for
(
i
=
0
;
i
<
blocks
.
size
();
i
++
)
{
strcat
(
blockNames
,
blocks
[
i
]);
strcat
(
blockNames
,
"|"
);
}
strcat
(
blockNames
,
"
\0
"
);
ndbout_c
(
"blocknames %s"
,
blockNames
);
/*int res =*/
ndb_mgm_log_signals
(
m_mgmsrv
,
int
result
=
ndb_mgm_log_signals
(
m_mgmsrv
,
processId
,
NDB_MGM_SIGNAL_LOG_MODE_INOUT
,
blockNames
,
&
reply
);
#if 0
int result =
_mgmtSrvr.setSignalLoggingMode(processId, MgmtSrvr::InOut, blocks);
if
(
result
!=
0
)
{
ndbout << _mgmtSrvr.getErrorText(result) << endl;
ndbout_c
(
"Execute LOG on node %d failed."
,
processId
);
printError
();
}
#endif
}
//*****************************************************************************
...
...
@@ -1401,17 +1394,7 @@ void
CommandInterpreter
::
executeLogIn
(
int
/* processId */
,
const
char
*
parameters
,
bool
/* all */
)
{
Vector
<
const
char
*>
blocks
;
if
(
!
parseBlockSpecification
(
parameters
,
blocks
))
{
return
;
}
#if 0
int result = _mgmtSrvr.setSignalLoggingMode(processId, MgmtSrvr::In, blocks);
if (result != 0) {
ndbout << _mgmtSrvr.getErrorText(result) << endl;
}
#endif
ndbout
<<
"Command LOGIN not implemented."
<<
endl
;
}
//*****************************************************************************
...
...
@@ -1420,19 +1403,7 @@ void
CommandInterpreter
::
executeLogOut
(
int
/*processId*/
,
const
char
*
parameters
,
bool
/*all*/
)
{
Vector
<
const
char
*>
blocks
;
if
(
!
parseBlockSpecification
(
parameters
,
blocks
))
{
return
;
}
#if 0
int result = _mgmtSrvr.setSignalLoggingMode(processId, MgmtSrvr::Out,
blocks);
if (result != 0) {
ndbout << _mgmtSrvr.getErrorText(result) << endl;
}
#endif
ndbout
<<
"Command LOGOUT not implemented."
<<
endl
;
}
//*****************************************************************************
...
...
@@ -1441,57 +1412,45 @@ void
CommandInterpreter
::
executeLogOff
(
int
/*processId*/
,
const
char
*
parameters
,
bool
/*all*/
)
{
Vector
<
const
char
*>
blocks
;
if
(
!
parseBlockSpecification
(
parameters
,
blocks
))
{
return
;
}
#if 0
int result = _mgmtSrvr.setSignalLoggingMode(processId, MgmtSrvr::Off,
blocks);
if (result != 0) {
ndbout << _mgmtSrvr.getErrorText(result) << endl;
}
#endif
ndbout
<<
"Command LOGOFF not implemented."
<<
endl
;
}
//*****************************************************************************
//*****************************************************************************
void
CommandInterpreter
::
executeTestOn
(
int
/*processId*/
,
CommandInterpreter
::
executeTestOn
(
int
processId
,
const
char
*
parameters
,
bool
/*all*/
)
{
if
(
!
emptyString
(
parameters
))
{
ndbout
<<
"No parameters expected to this command."
<<
endl
;
return
;
}
#if 0
int result =
_mgmtSrvr.startSignalTracing(processId
);
connect
();
struct
ndb_mgm_reply
reply
;
int
result
=
ndb_mgm_start_signallog
(
m_mgmsrv
,
processId
,
&
reply
);
if
(
result
!=
0
)
{
ndbout << _mgmtSrvr.getErrorText(result) << endl;
ndbout_c
(
"Execute TESTON failed."
);
printError
();
}
#endif
}
//*****************************************************************************
//*****************************************************************************
void
CommandInterpreter
::
executeTestOff
(
int
/*processId*/
,
CommandInterpreter
::
executeTestOff
(
int
processId
,
const
char
*
parameters
,
bool
/*all*/
)
{
if
(
!
emptyString
(
parameters
))
{
ndbout
<<
"No parameters expected to this command."
<<
endl
;
return
;
}
#if 0
int result =
_mgmtSrvr.stopSignalTracing(processId
);
connect
();
struct
ndb_mgm_reply
reply
;
int
result
=
ndb_mgm_stop_signallog
(
m_mgmsrv
,
processId
,
&
reply
);
if
(
result
!=
0
)
{
ndbout << _mgmtSrvr.getErrorText(result) << endl;
ndbout_c
(
"Execute TESTOFF failed."
);
printError
();
}
#endif
}
...
...
This diff is collapsed.
Click to expand it.
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