diff options
author | unknown <stewart@willster.(none)> | 2007-02-14 15:47:34 +1100 |
---|---|---|
committer | unknown <stewart@willster.(none)> | 2007-02-14 15:47:34 +1100 |
commit | e953dd8a35631fc3051d1b0f57fc3867b17bc851 (patch) | |
tree | 3ffa52a1a65046215e0a851641b5d83f74c50312 /ndb | |
parent | a031b4307cfc78262bc512be27dcc7f2c9a5267f (diff) | |
download | mariadb-git-e953dd8a35631fc3051d1b0f57fc3867b17bc851.tar.gz |
BUG#26355 FIXME: use constant for max loglevel in ndb_mgmd
ndb/include/mgmapi/mgmapi.h:
use constant for max log level in ndb_mgmd.
(more useful in 5.1 due to other defines and refinements of mgmapi)
ndb/src/mgmsrv/Services.cpp:
fix the XXX fixme of constant for max log level
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/include/mgmapi/mgmapi.h | 2 | ||||
-rw-r--r-- | ndb/src/mgmsrv/Services.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h index 2423048f98f..e5889a1ee6d 100644 --- a/ndb/include/mgmapi/mgmapi.h +++ b/ndb/include/mgmapi/mgmapi.h @@ -16,6 +16,8 @@ #ifndef MGMAPI_H #define MGMAPI_H +#define NDB_MGM_MAX_LOGLEVEL 15 + /** * @mainpage MySQL Cluster Management API * diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp index aa35c826535..01f71aa24f5 100644 --- a/ndb/src/mgmsrv/Services.cpp +++ b/ndb/src/mgmsrv/Services.cpp @@ -764,8 +764,7 @@ MgmApiSession::setClusterLogLevel(Parser<MgmApiSession>::Context &, DBUG_PRINT("enter",("node=%d, category=%d, level=%d", node, cat, level)); - /* XXX should use constants for this value */ - if(level > 15) { + if(level > NDB_MGM_MAX_LOGLEVEL) { m_output->println(reply); m_output->println("result: Invalid loglevel %d", level); m_output->println(""); @@ -809,8 +808,7 @@ MgmApiSession::setLogLevel(Parser<MgmApiSession>::Context &, args.get("category", &cat); args.get("level", &level); - /* XXX should use constants for this value */ - if(level > 15) { + if(level > NDB_MGM_MAX_LOGLEVEL) { m_output->println("set loglevel reply"); m_output->println("result: Invalid loglevel", errorString.c_str()); m_output->println(""); @@ -1510,7 +1508,7 @@ MgmApiSession::listen_event(Parser<MgmApiSession>::Context & ctx, } int level = atoi(spec[1].c_str()); - if(level < 0 || level > 15){ + if(level < 0 || level > NDB_MGM_MAX_LOGLEVEL){ msg.appfmt("Invalid level: >%s<", spec[1].c_str()); result = -1; goto done; |