#At file:///home/msvensson/mysql/bug44448/ based on revid:magnus.blaudd@stripped1ws6vd1sq4iu001
3082 Magnus Blåudd 2009-10-06
Bug#44448 ndb_mgmd declares FragmentLogFileSize=2G invalid by "1" and adjusts
- Problem only exist when using my.cnf file for passing options to ndb_mgmd
- Fix by telling my_getopt to parse CI_INT and CI_INT64 as _unsigned_ values.
- Thus allowing for example DiskSyncSize to be set to 4294967039 bytes(ie. MAX_INT_RNIL)
modified:
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
=== modified file 'storage/ndb/src/mgmsrv/InitConfigFileParser.cpp'
--- a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp 2009-10-01 07:16:52 +0000
+++ b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp 2009-10-06 14:24:04 +0000
@@ -649,9 +649,10 @@ InitConfigFileParser::store_in_propertie
Uint64 value_int;
switch(options[i].var_type){
case GET_INT:
+ case GET_UINT:
value_int = *(Uint32*)options[i].value;
break;
- case GET_LL:
+ case GET_ULL:
value_int = *(Uint64*)options[i].value;
break;
case GET_STR:
@@ -681,11 +682,19 @@ InitConfigFileParser::store_in_propertie
ctx.reportWarning("[%s] %s is depricated", ctx.fname, fname);
}
}
-
- if (options[i].var_type == GET_INT)
+
+ switch(options[i].var_type){
+ case GET_INT:
+ case GET_UINT:
ctx.m_currentSection->put(options[i].name, (Uint32)value_int);
- else
- ctx.m_currentSection->put64(options[i].name, value_int);
+ break;
+ case GET_ULL:
+ ctx.m_currentSection->put64(options[i].name, value_int);
+ break;
+ default:
+ abort();
+ break;
+ }
}
}
return true;
@@ -800,12 +809,12 @@ InitConfigFileParser::parse_mycnf()
opt.var_type = GET_INT;
break;
case ConfigInfo::CI_INT:
- opt.value = (uchar**)malloc(sizeof(int));
- opt.var_type = GET_INT;
+ opt.value = (uchar**)malloc(sizeof(uint));
+ opt.var_type = GET_UINT;
break;
case ConfigInfo::CI_INT64:
- opt.value = (uchar**)malloc(sizeof(Int64));
- opt.var_type = GET_LL;
+ opt.value = (uchar**)malloc(sizeof(Uint64));
+ opt.var_type = GET_ULL;
break;
case ConfigInfo::CI_ENUM:
case ConfigInfo::CI_STRING:
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20091006142404-ho10xpgy0rcso9xm.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3082)Bug#44448 | Magnus Blåudd | 6 Oct |