Commit a31c3502 authored by unknown's avatar unknown

bug fixed parsing with comments on same line

parent c9513074
......@@ -9,13 +9,13 @@ DataDir= CHOOSE_FILESYSTEM
MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes
[ndbd]
HostName= CHOOSE_HOSTNAME_1
HostName= CHOOSE_HOSTNAME_1 # hostname is a valid network adress
[ndbd]
HostName= CHOOSE_HOSTNAME_2
HostName= CHOOSE_HOSTNAME_2 # hostname is a valid network adress
[ndb_mgmd]
DataDir= CHOOSE_FILESYSTEM
DataDir= CHOOSE_FILESYSTEM #
PortNumber= CHOOSE_PORT_MGM
[mysqld]
......
......@@ -228,13 +228,21 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line)
Vector<BaseString> tmp_string_split;
if (BaseString(line).split(tmp_string_split,
BaseString("=:"),
2) != 2)
"=:", 2) != 2)
{
ctx.reportError("Parse error");
return false;
}
// *************************************
// Remove all after #
// *************************************
Vector<BaseString> tmp_string_split2;
tmp_string_split[1].split(tmp_string_split2,
"#", 2);
tmp_string_split[1]=tmp_string_split2[0];
// *************************************
// Remove leading and trailing chars
// *************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment