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
29dc2696
Commit
29dc2696
authored
Aug 31, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#12833 corrected parsing of CLUSTERLOG command in ndb_mgm
parent
f1b97218
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
35 deletions
+42
-35
ndb/src/mgmclient/CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp
+42
-35
No files found.
ndb/src/mgmclient/CommandInterpreter.cpp
View file @
29dc2696
...
@@ -1909,47 +1909,54 @@ CommandInterpreter::executeEventReporting(int processId,
...
@@ -1909,47 +1909,54 @@ CommandInterpreter::executeEventReporting(int processId,
return
;
return
;
}
}
BaseString
tmp
(
parameters
);
BaseString
tmp
(
parameters
);
Vector
<
BaseString
>
spec
;
Vector
<
BaseString
>
specs
;
tmp
.
split
(
spec
,
"="
);
tmp
.
split
(
specs
,
" "
);
if
(
spec
.
size
()
!=
2
){
ndbout
<<
"Invalid loglevel specification: "
<<
parameters
<<
endl
;
return
;
}
spec
[
0
].
trim
().
ndb_toupper
();
for
(
int
i
=
0
;
i
<
specs
.
size
();
i
++
)
int
category
=
ndb_mgm_match_event_category
(
spec
[
0
].
c_str
());
{
if
(
category
==
NDB_MGM_ILLEGAL_EVENT_CATEGORY
){
Vector
<
BaseString
>
spec
;
if
(
!
convert
(
spec
[
0
].
c_str
(),
category
)
||
specs
[
i
].
split
(
spec
,
"="
);
category
<
NDB_MGM_MIN_EVENT_CATEGORY
||
if
(
spec
.
size
()
!=
2
){
category
>
NDB_MGM_MAX_EVENT_CATEGORY
){
ndbout
<<
"Invalid loglevel specification: "
<<
specs
[
i
]
<<
endl
;
ndbout
<<
"Unknown category:
\"
"
<<
spec
[
0
].
c_str
()
<<
"
\"
"
<<
endl
;
continue
;
return
;
}
}
}
int
level
;
spec
[
0
].
trim
().
ndb_toupper
();
if
(
!
convert
(
spec
[
1
].
c_str
(),
level
))
int
category
=
ndb_mgm_match_event_category
(
spec
[
0
].
c_str
());
{
if
(
category
==
NDB_MGM_ILLEGAL_EVENT_CATEGORY
){
ndbout
<<
"Invalid level: "
<<
spec
[
1
].
c_str
()
<<
endl
;
if
(
!
convert
(
spec
[
0
].
c_str
(),
category
)
||
return
;
category
<
NDB_MGM_MIN_EVENT_CATEGORY
||
}
category
>
NDB_MGM_MAX_EVENT_CATEGORY
){
ndbout
<<
"Unknown category:
\"
"
<<
spec
[
0
].
c_str
()
<<
"
\"
"
<<
endl
;
continue
;
}
}
ndbout
<<
"Executing CLUSTERLOG on node "
<<
processId
<<
flush
;
int
level
;
if
(
!
convert
(
spec
[
1
].
c_str
(),
level
))
{
ndbout
<<
"Invalid level: "
<<
spec
[
1
].
c_str
()
<<
endl
;
continue
;
}
struct
ndb_mgm_reply
reply
;
ndbout
<<
"Executing CLUSTERLOG "
<<
spec
[
0
]
<<
"="
<<
spec
[
1
]
int
result
;
<<
" on node "
<<
processId
<<
flush
;
result
=
ndb_mgm_set_loglevel_clusterlog
(
m_mgmsrv
,
processId
,
struct
ndb_mgm_reply
reply
;
(
ndb_mgm_event_category
)
category
,
int
result
;
level
,
result
=
ndb_mgm_set_loglevel_clusterlog
(
m_mgmsrv
,
&
reply
);
processId
,
(
ndb_mgm_event_category
)
category
,
level
,
&
reply
);
if
(
result
!=
0
)
{
if
(
result
!=
0
)
{
ndbout_c
(
" failed."
);
ndbout_c
(
" failed."
);
printError
();
printError
();
}
else
{
}
else
{
ndbout_c
(
" OK!"
);
ndbout_c
(
" 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