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
a12244c5
Commit
a12244c5
authored
Jan 09, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CommandInterpreter.cpp:
adopted to changes in mgmapi
parent
06216f6a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
ndb/src/mgmclient/CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp
+20
-17
No files found.
ndb/src/mgmclient/CommandInterpreter.cpp
View file @
a12244c5
...
@@ -1246,7 +1246,7 @@ CommandInterpreter::executeClusterLog(char* parameters)
...
@@ -1246,7 +1246,7 @@ CommandInterpreter::executeClusterLog(char* parameters)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
enum
ndb_mgm_
clusterlog_level
severity
=
NDB_MGM_CLUSTERLOG
_ALL
;
enum
ndb_mgm_
event_severity
severity
=
NDB_MGM_EVENT_SEVERITY
_ALL
;
char
*
tmpString
=
my_strdup
(
parameters
,
MYF
(
MY_WME
));
char
*
tmpString
=
my_strdup
(
parameters
,
MYF
(
MY_WME
));
My_auto_ptr
<
char
>
ap1
(
tmpString
);
My_auto_ptr
<
char
>
ap1
(
tmpString
);
...
@@ -1254,7 +1254,7 @@ CommandInterpreter::executeClusterLog(char* parameters)
...
@@ -1254,7 +1254,7 @@ CommandInterpreter::executeClusterLog(char* parameters)
char
*
item
=
strtok_r
(
tmpString
,
" "
,
&
tmpPtr
);
char
*
item
=
strtok_r
(
tmpString
,
" "
,
&
tmpPtr
);
int
enable
;
int
enable
;
Uint32
*
enabled
=
ndb_mgm_get_logfilter
(
m_mgmsrv
);
const
unsigned
int
*
enabled
=
ndb_mgm_get_logfilter
(
m_mgmsrv
);
if
(
enabled
==
NULL
)
{
if
(
enabled
==
NULL
)
{
ndbout
<<
"Couldn't get status"
<<
endl
;
ndbout
<<
"Couldn't get status"
<<
endl
;
printError
();
printError
();
...
@@ -1276,8 +1276,8 @@ CommandInterpreter::executeClusterLog(char* parameters)
...
@@ -1276,8 +1276,8 @@ CommandInterpreter::executeClusterLog(char* parameters)
printf("enabled[%d] = %d\n", i, enabled[i]);
printf("enabled[%d] = %d\n", i, enabled[i]);
#endif
#endif
ndbout
<<
"Severities enabled: "
;
ndbout
<<
"Severities enabled: "
;
for
(
i
=
1
;
i
<
(
int
)
NDB_MGM_
CLUSTERLOG
_ALL
;
i
++
)
{
for
(
i
=
1
;
i
<
(
int
)
NDB_MGM_
EVENT_SEVERITY
_ALL
;
i
++
)
{
const
char
*
str
=
ndb_mgm_get_
clusterlog_level_string
((
ndb_mgm_clusterlog_level
)
i
);
const
char
*
str
=
ndb_mgm_get_
event_severity_string
((
ndb_mgm_event_severity
)
i
);
if
(
str
==
0
)
if
(
str
==
0
)
{
{
DBUG_ASSERT
(
false
);
DBUG_ASSERT
(
false
);
...
@@ -1311,8 +1311,10 @@ CommandInterpreter::executeClusterLog(char* parameters)
...
@@ -1311,8 +1311,10 @@ CommandInterpreter::executeClusterLog(char* parameters)
int
res_enable
;
int
res_enable
;
item
=
strtok_r
(
NULL
,
" "
,
&
tmpPtr
);
item
=
strtok_r
(
NULL
,
" "
,
&
tmpPtr
);
if
(
item
==
NULL
)
{
if
(
item
==
NULL
)
{
res_enable
=
ndb_mgm_filter_clusterlog
(
m_mgmsrv
,
res_enable
=
NDB_MGM_CLUSTERLOG_ON
,
enable
,
NULL
);
ndb_mgm_set_clusterlog_severity_filter
(
m_mgmsrv
,
NDB_MGM_EVENT_SEVERITY_ON
,
enable
,
NULL
);
if
(
res_enable
<
0
)
if
(
res_enable
<
0
)
{
{
ndbout
<<
"Couldn't set filter"
<<
endl
;
ndbout
<<
"Couldn't set filter"
<<
endl
;
...
@@ -1324,32 +1326,33 @@ CommandInterpreter::executeClusterLog(char* parameters)
...
@@ -1324,32 +1326,33 @@ CommandInterpreter::executeClusterLog(char* parameters)
}
}
do
{
do
{
severity
=
NDB_MGM_ILLEGAL_
CLUSTERLOG_LEVEL
;
severity
=
NDB_MGM_ILLEGAL_
EVENT_SEVERITY
;
if
(
strcasecmp
(
item
,
"ALL"
)
==
0
)
{
if
(
strcasecmp
(
item
,
"ALL"
)
==
0
)
{
severity
=
NDB_MGM_
CLUSTERLOG
_ALL
;
severity
=
NDB_MGM_
EVENT_SEVERITY
_ALL
;
}
else
if
(
strcasecmp
(
item
,
"ALERT"
)
==
0
)
{
}
else
if
(
strcasecmp
(
item
,
"ALERT"
)
==
0
)
{
severity
=
NDB_MGM_
CLUSTERLOG
_ALERT
;
severity
=
NDB_MGM_
EVENT_SEVERITY
_ALERT
;
}
else
if
(
strcasecmp
(
item
,
"CRITICAL"
)
==
0
)
{
}
else
if
(
strcasecmp
(
item
,
"CRITICAL"
)
==
0
)
{
severity
=
NDB_MGM_
CLUSTERLOG
_CRITICAL
;
severity
=
NDB_MGM_
EVENT_SEVERITY
_CRITICAL
;
}
else
if
(
strcasecmp
(
item
,
"ERROR"
)
==
0
)
{
}
else
if
(
strcasecmp
(
item
,
"ERROR"
)
==
0
)
{
severity
=
NDB_MGM_
CLUSTERLOG
_ERROR
;
severity
=
NDB_MGM_
EVENT_SEVERITY
_ERROR
;
}
else
if
(
strcasecmp
(
item
,
"WARNING"
)
==
0
)
{
}
else
if
(
strcasecmp
(
item
,
"WARNING"
)
==
0
)
{
severity
=
NDB_MGM_
CLUSTERLOG
_WARNING
;
severity
=
NDB_MGM_
EVENT_SEVERITY
_WARNING
;
}
else
if
(
strcasecmp
(
item
,
"INFO"
)
==
0
)
{
}
else
if
(
strcasecmp
(
item
,
"INFO"
)
==
0
)
{
severity
=
NDB_MGM_
CLUSTERLOG
_INFO
;
severity
=
NDB_MGM_
EVENT_SEVERITY
_INFO
;
}
else
if
(
strcasecmp
(
item
,
"DEBUG"
)
==
0
)
{
}
else
if
(
strcasecmp
(
item
,
"DEBUG"
)
==
0
)
{
severity
=
NDB_MGM_
CLUSTERLOG
_DEBUG
;
severity
=
NDB_MGM_
EVENT_SEVERITY
_DEBUG
;
}
else
if
(
strcasecmp
(
item
,
"OFF"
)
==
0
||
}
else
if
(
strcasecmp
(
item
,
"OFF"
)
==
0
||
strcasecmp
(
item
,
"ON"
)
==
0
)
{
strcasecmp
(
item
,
"ON"
)
==
0
)
{
if
(
enable
<
0
)
// only makes sense with toggle
if
(
enable
<
0
)
// only makes sense with toggle
severity
=
NDB_MGM_
CLUSTERLOG
_ON
;
severity
=
NDB_MGM_
EVENT_SEVERITY
_ON
;
}
}
if
(
severity
==
NDB_MGM_ILLEGAL_
CLUSTERLOG_LEVEL
)
{
if
(
severity
==
NDB_MGM_ILLEGAL_
EVENT_SEVERITY
)
{
ndbout
<<
"Invalid severity level: "
<<
item
<<
endl
;
ndbout
<<
"Invalid severity level: "
<<
item
<<
endl
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
res_enable
=
ndb_mgm_filter_clusterlog
(
m_mgmsrv
,
severity
,
enable
,
NULL
);
res_enable
=
ndb_mgm_set_clusterlog_severity_filter
(
m_mgmsrv
,
severity
,
enable
,
NULL
);
if
(
res_enable
<
0
)
if
(
res_enable
<
0
)
{
{
ndbout
<<
"Couldn't set filter"
<<
endl
;
ndbout
<<
"Couldn't set filter"
<<
endl
;
...
...
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