summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.bredbandsbolaget.se>2004-06-08 00:12:55 +0000
committerunknown <tomas@poseidon.bredbandsbolaget.se>2004-06-08 00:12:55 +0000
commit3b1a93bf89f8055d6de2d4b083187420a406acf9 (patch)
tree414f0aa2e7068e08815661a0375556efb9b04853 /ndb
parent80213d665d361dabbd2978149df538e740f0fd13 (diff)
parent457aca6746541305f6327b77a509f85d380d2a99 (diff)
downloadmariadb-git-3b1a93bf89f8055d6de2d4b083187420a406acf9.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into poseidon.bredbandsbolaget.se:/home/tomas/mysql-4.1-ndb
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/common/mgmcommon/ConfigInfo.cpp14
-rw-r--r--ndb/src/common/mgmcommon/InitConfigFileParser.cpp2
-rw-r--r--ndb/src/common/util/ConfigValues.cpp4
3 files changed, 13 insertions, 7 deletions
diff --git a/ndb/src/common/mgmcommon/ConfigInfo.cpp b/ndb/src/common/mgmcommon/ConfigInfo.cpp
index 57d1a2fe8fd..1766fbe967f 100644
--- a/ndb/src/common/mgmcommon/ConfigInfo.cpp
+++ b/ndb/src/common/mgmcommon/ConfigInfo.cpp
@@ -602,7 +602,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::INT64,
3000 * 8192,
128 * 8192,
- 192000 * 8192 },
+ ((Uint64)192000) * ((Uint64)8192) },
{
KEY_INTERNAL,
@@ -638,7 +638,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::INT64,
10000 * 8192,
128 * 8192,
- 400000 * 8192 },
+ ((Uint64)400000) * ((Uint64)8192) },
{
KEY_INTERNAL,
@@ -2446,6 +2446,8 @@ void ConfigInfo::print(const Properties * section,
}
ndbout << endl;
break;
+ case ConfigInfo::SECTION:
+ break;
}
}
@@ -2495,13 +2497,15 @@ fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){
ctx.reportError("Computer \"%s\" not declared"
"- [%s] starting at line: %d",
compId, ctx.fname, ctx.m_sectionLineno);
+ return false;
}
const char * hostname;
if(!computer->get("HostName", &hostname)){
- ctx.reportError("HostName missing in [COMPUTER] Id: %s"
- "- [%s] starting at line: %d",
+ ctx.reportError("HostName missing in [COMPUTER] (Id: %d) "
+ " - [%s] starting at line: %d",
compId, ctx.fname, ctx.m_sectionLineno);
+ return false;
}
require(ctx.m_currentSection->put("HostName", hostname));
@@ -2643,6 +2647,8 @@ applyDefaultValues(InitConfigFileParser::Context & ctx,
ctx.m_currentSection->put(name, val);
break;
}
+ case ConfigInfo::SECTION:
+ break;
}
}
}
diff --git a/ndb/src/common/mgmcommon/InitConfigFileParser.cpp b/ndb/src/common/mgmcommon/InitConfigFileParser.cpp
index d01b8189545..f4a8e1a8cd4 100644
--- a/ndb/src/common/mgmcommon/InitConfigFileParser.cpp
+++ b/ndb/src/common/mgmcommon/InitConfigFileParser.cpp
@@ -305,7 +305,7 @@ InitConfigFileParser::storeNameValuePair(Context& ctx,
}
if (!m_info->verify(ctx.m_currentInfo, fname, value_int)) {
ctx.reportError("Illegal value %s for parameter %s.\n"
- "Legal values are between %d and %d", value, fname,
+ "Legal values are between %Lu and %Lu", value, fname,
m_info->getMin(ctx.m_currentInfo, fname),
m_info->getMax(ctx.m_currentInfo, fname));
return false;
diff --git a/ndb/src/common/util/ConfigValues.cpp b/ndb/src/common/util/ConfigValues.cpp
index 948b96135fd..18ecf4bcdc4 100644
--- a/ndb/src/common/util/ConfigValues.cpp
+++ b/ndb/src/common/util/ConfigValues.cpp
@@ -193,7 +193,7 @@ ConfigValues::Iterator::set(Uint32 key, const char * value){
char * & str = m_cfg.getString(m_cfg.m_values[pos+1]);
free(str);
- str = strdup(value);
+ str = strdup(value ? value : "");
return true;
}
@@ -457,7 +457,7 @@ ConfigValuesFactory::put(const ConfigValues::Entry & entry){
case ConfigValues::StringType:{
Uint32 index = m_cfg->m_stringCount++;
m_cfg->m_values[pos+1] = index;
- m_cfg->getString(index) = strdup(entry.m_string);
+ m_cfg->getString(index) = strdup(entry.m_string ? entry.m_string : "");
m_freeKeys--;
m_freeData -= sizeof(char *);
DEBUG printf("Putting at: %d(%d) (loop = %d) key: %d value(%d): %s\n",