diff options
author | unknown <tulin@dl145b.mysql.com> | 2005-07-19 16:34:56 +0200 |
---|---|---|
committer | unknown <tulin@dl145b.mysql.com> | 2005-07-19 16:34:56 +0200 |
commit | 43a550aede1c54423be23a6669c374a7024bb2bd (patch) | |
tree | 47e792a708e604cc04860ec7c29438ba6d1cb6e0 | |
parent | ac2209a1f961b81f398deaf583b9d1831865b6f2 (diff) | |
download | mariadb-git-43a550aede1c54423be23a6669c374a7024bb2bd.tar.gz |
printout of cluster config to use same tokens as documentation
-rw-r--r-- | ndb/src/mgmsrv/ConfigInfo.cpp | 15 | ||||
-rw-r--r-- | ndb/src/mgmsrv/ConfigInfo.hpp | 3 |
2 files changed, 15 insertions, 3 deletions
diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp index 118dd197ce0..03119ef3609 100644 --- a/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/ndb/src/mgmsrv/ConfigInfo.cpp @@ -2367,7 +2367,15 @@ ConfigInfo::isSection(const char * section) const { } const char* -ConfigInfo::getAlias(const char * section) const { +ConfigInfo::nameToAlias(const char * name) { + for (int i = 0; m_sectionNameAliases[i].name != 0; i++) + if(!strcasecmp(name, m_sectionNameAliases[i].name)) + return m_sectionNameAliases[i].alias; + return 0; +} + +const char* +ConfigInfo::getAlias(const char * section) { for (int i = 0; m_sectionNameAliases[i].name != 0; i++) if(!strcasecmp(section, m_sectionNameAliases[i].alias)) return m_sectionNameAliases[i].name; @@ -3416,7 +3424,10 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){ } if (g_print_full_config) - printf("[%s]\n", ctx.fname); + { + const char *alias= ConfigInfo::nameToAlias(ctx.fname); + printf("[%s]\n", alias ? alias : ctx.fname); + } Uint32 no = 0; ctx.m_userProperties.get("$Section", id, &no); diff --git a/ndb/src/mgmsrv/ConfigInfo.hpp b/ndb/src/mgmsrv/ConfigInfo.hpp index dff8b34bf4a..871ee62040e 100644 --- a/ndb/src/mgmsrv/ConfigInfo.hpp +++ b/ndb/src/mgmsrv/ConfigInfo.hpp @@ -105,7 +105,8 @@ public: * @note Result is not defined if section/name are wrong! */ bool verify(const Properties* secti, const char* fname, Uint64 value) const; - const char* getAlias(const char*) const; + static const char* nameToAlias(const char*); + static const char* getAlias(const char*); bool isSection(const char*) const; const char* getDescription(const Properties * sec, const char* fname) const; |