@@ -1195,7 +1195,7 @@ void MtmUpdateNodeConnStr(int nodeId, char const* connStr)
11951195elog (ERROR ,"Host not specified in connection string: '%s'" ,connStr );
11961196}
11971197host += 5 ;
1198- for (end = host ;* end != ' ' && * end != ',' && * end != ' \0' ;end ++ );
1198+ for (end = host ;* end != ' ' && * end != '\0' ;end ++ );
11991199hostLen = end - host ;
12001200if (hostLen >=MULTIMASTER_MAX_HOST_NAME_SIZE ) {
12011201elog (ERROR ,"Too long (%d) host name '%.*s' for node %d, limit is %d" ,
@@ -1229,7 +1229,7 @@ static void MtmSplitConnStrs(void)
12291229elog (ERROR ,"Database not specified in connection string: '%s'" ,connStr );
12301230}
12311231dbName += 7 ;
1232- for (end = dbName ;* end != ' ' && * end != ',' && * end != ' \0' ;end ++ );
1232+ for (end = dbName ;* end != ' ' && * end != '\0' ;end ++ );
12331233len = end - dbName ;
12341234MtmDatabaseName = (char * )malloc (len + 1 );
12351235memcpy (MtmDatabaseName ,dbName ,len );
@@ -1242,6 +1242,9 @@ static void MtmSplitConnStrs(void)
12421242elog (ERROR ,"Multimaster should have at least two nodes" );
12431243}
12441244MtmNodes = i ;
1245+ if (MtmNodeId > MtmNodes ) {
1246+ elog (ERROR ,"Invalid node id %d for specified nubmer of nodes %d" ,MtmNodeId ,MtmNodes );
1247+ }
12451248}
12461249
12471250void
@@ -1353,7 +1356,7 @@ _PG_init(void)
13531356"Multimaster node ID" ,
13541357NULL ,
13551358& MtmNodeId ,
1356- 1 ,
1359+ INT_MAX ,
135713601 ,
13581361INT_MAX ,
13591362PGC_BACKEND ,