Loading mysql-test/r/ndb_config.result +5 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,8 @@ ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysql 1 2 ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,, ndbd,1,localhost ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndb_mgmd,5,localhost mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, Cluster configuration warning line 0: Could not use next node id 2 for section [API], using next unused node id 7. ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndb_mgmd,6,localhost mysqld,1, mysqld,7, mysqld,8, mysqld,9, mysqld,10, ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndbd,6,localhost ndb_mgmd,1,localhost ndb_mgmd,2,localhost mysqld,11, mysqld,12, mysqld,13, mysqld,14, mysqld,15, shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 mysql-test/std_data/ndb_config_mycnf2.cnf 0 → 100644 +31 −0 Original line number Diff line number Diff line # # Testing automatic node id generation # [cluster_config] NoOfReplicas=2 Signum=39 [cluster_config.cluster0] ndbd = localhost,localhost,localhost,localhost ndb_mgmd = localhost mysqld = ,,,, [cluster_config.cluster1] ndbd = localhost,localhost,localhost,localhost ndb_mgmd = localhost mysqld = ,,,, [cluster_config.ndbd.1.cluster1] NodeId=2 [cluster_config.mysqld.1.cluster1] NodeId=1 [cluster_config.cluster2] ndbd = localhost,localhost,localhost,localhost ndb_mgmd = localhost,localhost mysqld = ,,,, [cluster_config.mysqld.1.cluster2] NodeId=11 [cluster_config.ndb_mgmd.1.cluster2] NodeId=1 [cluster_config.ndbd.1.cluster2] NodeId=3 mysql-test/t/ndb_config.test +5 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,8 @@ # End of 4.1 tests --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null ndb/include/mgmapi/mgmapi_config_parameters.h +1 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ #define CFG_CONNECTION_HOSTNAME_1 407 #define CFG_CONNECTION_HOSTNAME_2 408 #define CFG_CONNECTION_GROUP 409 #define CFG_CONNECTION_NODE_ID_SERVER 410 #define CFG_TCP_SERVER 452 #define CFG_TCP_SEND_BUFFER_SIZE 454 Loading ndb/src/common/mgmcommon/IPCConfig.cpp +10 −14 Original line number Diff line number Diff line Loading @@ -231,8 +231,11 @@ IPCConfig::configureTransporters(Uint32 nodeId, Uint32 server_port= 0; if(iter.get(CFG_CONNECTION_SERVER_PORT, &server_port)) break; Uint32 nodeIdServer= 0; if(iter.get(CFG_CONNECTION_NODE_ID_SERVER, &nodeIdServer)) break; /* We check the node type. MGM node becomes server. We check the node type. */ Uint32 node1type, node2type; ndb_mgm_configuration_iterator node1iter(config, CFG_SECTION_NODE); Loading @@ -242,20 +245,12 @@ IPCConfig::configureTransporters(Uint32 nodeId, node1iter.get(CFG_TYPE_OF_SECTION,&node1type); node2iter.get(CFG_TYPE_OF_SECTION,&node2type); conf.serverNodeId= (nodeId1 < nodeId2)? nodeId1:nodeId2; conf.isMgmConnection= false; if(node2type==NODE_TYPE_MGM) { if(node1type==NODE_TYPE_MGM || node2type==NODE_TYPE_MGM) conf.isMgmConnection= true; conf.serverNodeId= nodeId2; } else if(node1type==NODE_TYPE_MGM) { conf.isMgmConnection= true; conf.serverNodeId= nodeId1; } else if (nodeId == conf.serverNodeId) { else conf.isMgmConnection= false; if (nodeId == nodeIdServer && !conf.isMgmConnection) { tr.add_transporter_interface(remoteNodeId, localHostName, server_port); } Loading @@ -279,6 +274,7 @@ IPCConfig::configureTransporters(Uint32 nodeId, conf.s_port = server_port; conf.localHostName = localHostName; conf.remoteHostName = remoteHostName; conf.serverNodeId = nodeIdServer; switch(type){ case CONNECTION_TYPE_SHM: Loading Loading
mysql-test/r/ndb_config.result +5 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,8 @@ ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysql 1 2 ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,, ndbd,1,localhost ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndb_mgmd,5,localhost mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, Cluster configuration warning line 0: Could not use next node id 2 for section [API], using next unused node id 7. ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndb_mgmd,6,localhost mysqld,1, mysqld,7, mysqld,8, mysqld,9, mysqld,10, ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndbd,6,localhost ndb_mgmd,1,localhost ndb_mgmd,2,localhost mysqld,11, mysqld,12, mysqld,13, mysqld,14, mysqld,15, shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2
mysql-test/std_data/ndb_config_mycnf2.cnf 0 → 100644 +31 −0 Original line number Diff line number Diff line # # Testing automatic node id generation # [cluster_config] NoOfReplicas=2 Signum=39 [cluster_config.cluster0] ndbd = localhost,localhost,localhost,localhost ndb_mgmd = localhost mysqld = ,,,, [cluster_config.cluster1] ndbd = localhost,localhost,localhost,localhost ndb_mgmd = localhost mysqld = ,,,, [cluster_config.ndbd.1.cluster1] NodeId=2 [cluster_config.mysqld.1.cluster1] NodeId=1 [cluster_config.cluster2] ndbd = localhost,localhost,localhost,localhost ndb_mgmd = localhost,localhost mysqld = ,,,, [cluster_config.mysqld.1.cluster2] NodeId=11 [cluster_config.ndb_mgmd.1.cluster2] NodeId=1 [cluster_config.ndbd.1.cluster2] NodeId=3
mysql-test/t/ndb_config.test +5 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,8 @@ # End of 4.1 tests --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null --exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null
ndb/include/mgmapi/mgmapi_config_parameters.h +1 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ #define CFG_CONNECTION_HOSTNAME_1 407 #define CFG_CONNECTION_HOSTNAME_2 408 #define CFG_CONNECTION_GROUP 409 #define CFG_CONNECTION_NODE_ID_SERVER 410 #define CFG_TCP_SERVER 452 #define CFG_TCP_SEND_BUFFER_SIZE 454 Loading
ndb/src/common/mgmcommon/IPCConfig.cpp +10 −14 Original line number Diff line number Diff line Loading @@ -231,8 +231,11 @@ IPCConfig::configureTransporters(Uint32 nodeId, Uint32 server_port= 0; if(iter.get(CFG_CONNECTION_SERVER_PORT, &server_port)) break; Uint32 nodeIdServer= 0; if(iter.get(CFG_CONNECTION_NODE_ID_SERVER, &nodeIdServer)) break; /* We check the node type. MGM node becomes server. We check the node type. */ Uint32 node1type, node2type; ndb_mgm_configuration_iterator node1iter(config, CFG_SECTION_NODE); Loading @@ -242,20 +245,12 @@ IPCConfig::configureTransporters(Uint32 nodeId, node1iter.get(CFG_TYPE_OF_SECTION,&node1type); node2iter.get(CFG_TYPE_OF_SECTION,&node2type); conf.serverNodeId= (nodeId1 < nodeId2)? nodeId1:nodeId2; conf.isMgmConnection= false; if(node2type==NODE_TYPE_MGM) { if(node1type==NODE_TYPE_MGM || node2type==NODE_TYPE_MGM) conf.isMgmConnection= true; conf.serverNodeId= nodeId2; } else if(node1type==NODE_TYPE_MGM) { conf.isMgmConnection= true; conf.serverNodeId= nodeId1; } else if (nodeId == conf.serverNodeId) { else conf.isMgmConnection= false; if (nodeId == nodeIdServer && !conf.isMgmConnection) { tr.add_transporter_interface(remoteNodeId, localHostName, server_port); } Loading @@ -279,6 +274,7 @@ IPCConfig::configureTransporters(Uint32 nodeId, conf.s_port = server_port; conf.localHostName = localHostName; conf.remoteHostName = remoteHostName; conf.serverNodeId = nodeIdServer; switch(type){ case CONNECTION_TYPE_SHM: Loading