Commit d159d111 authored by unknown's avatar unknown

Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb

into mc04.(none):/space/mysql/mysql-4.1-ndb


acinclude.m4:
  Auto merged
configure.in:
  Auto merged
ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/Makefile.am:
  Auto merged
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
parents 149b45b8 49dc3a53
...@@ -100,6 +100,7 @@ miguel@hegel.txg.br ...@@ -100,6 +100,7 @@ miguel@hegel.txg.br
miguel@light. miguel@light.
miguel@light.local miguel@light.local
miguel@sartre.local miguel@sartre.local
mikael@mc04.(none)
mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
mikron@mikael-ronstr-ms-dator.local mikron@mikael-ronstr-ms-dator.local
mmatthew@markslaptop. mmatthew@markslaptop.
...@@ -129,6 +130,7 @@ mwagner@here.mwagner.org ...@@ -129,6 +130,7 @@ mwagner@here.mwagner.org
mwagner@work.mysql.com mwagner@work.mysql.com
mydev@mysql.com mydev@mysql.com
mysql@home.(none) mysql@home.(none)
mysql@mc04.(none)
mysqldev@build.mysql2.com mysqldev@build.mysql2.com
mysqldev@melody.local mysqldev@melody.local
mysqldev@mysql.com mysqldev@mysql.com
...@@ -158,6 +160,7 @@ ram@ram.(none) ...@@ -158,6 +160,7 @@ ram@ram.(none)
ranger@regul.home.lan ranger@regul.home.lan
rburnett@build.mysql.com rburnett@build.mysql.com
root@home.(none) root@home.(none)
root@mc04.(none)
root@x3.internalnet root@x3.internalnet
salle@banica.(none) salle@banica.(none)
salle@geopard.(none) salle@geopard.(none)
......
...@@ -1551,16 +1551,43 @@ dnl Sets HAVE_NDBCLUSTER_DB if --with-ndbcluster is used ...@@ -1551,16 +1551,43 @@ dnl Sets HAVE_NDBCLUSTER_DB if --with-ndbcluster is used
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
AC_ARG_WITH([ndb-sci],
AC_HELP_STRING([--with-ndb-sci=DIR],
[Provide MySQL with a custom location of
sci library. Given DIR, sci library is
assumed to be in $DIR/lib and header files
in $DIR/include.]),
[mysql_sci_dir=${withval}],
[mysql_sci_dir=""])
case "$mysql_sci_dir" in
"no" )
have_ndb_sci=no
AC_MSG_RESULT([-- not including sci transporter])
;;
* )
if test -f "$mysql_sci_dir/lib/libsisci.a" -a \
-f "$mysql_sci_dir/include/sisci_api.h"; then
NDB_SCI_INCLUDES="-I$mysql_sci_dir/include"
NDB_SCI_LIBS="-L$mysql_sci_dir/lib -lsisci"
AC_MSG_RESULT([-- including sci transporter])
AC_DEFINE([NDB_SCI_TRANSPORTER], [1],
[Including Ndb Cluster DB sci transporter])
AC_SUBST(NDB_SCI_INCLUDES)
AC_SUBST(NDB_SCI_LIBS)
have_ndb_sci="yes"
AC_MSG_RESULT([found sci transporter in $mysql_sci_dir/{include, lib}])
else
AC_MSG_RESULT([could not find sci transporter in $mysql_sci_dir/{include, lib}])
fi
;;
esac
AC_ARG_WITH([ndb-shm], AC_ARG_WITH([ndb-shm],
[ [
--with-ndb-shm Include the NDB Cluster shared memory transporter], --with-ndb-shm Include the NDB Cluster shared memory transporter],
[ndb_shm="$withval"], [ndb_shm="$withval"],
[ndb_shm=no]) [ndb_shm=no])
AC_ARG_WITH([ndb-sci],
[
--with-ndb-sci Include the NDB Cluster sci transporter],
[ndb_sci="$withval"],
[ndb_sci=no])
AC_ARG_WITH([ndb-test], AC_ARG_WITH([ndb-test],
[ [
--with-ndb-test Include the NDB Cluster ndbapi test programs], --with-ndb-test Include the NDB Cluster ndbapi test programs],
...@@ -1593,19 +1620,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ...@@ -1593,19 +1620,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
;; ;;
esac esac
have_ndb_sci=no
case "$ndb_sci" in
yes )
AC_MSG_RESULT([-- including sci transporter])
AC_DEFINE([NDB_SCI_TRANSPORTER], [1],
[Including Ndb Cluster DB sci transporter])
have_ndb_sci="yes"
;;
* )
AC_MSG_RESULT([-- not including sci transporter])
;;
esac
have_ndb_test=no have_ndb_test=no
case "$ndb_test" in case "$ndb_test" in
yes ) yes )
......
...@@ -3024,11 +3024,11 @@ AC_SUBST([ndb_port_base]) ...@@ -3024,11 +3024,11 @@ AC_SUBST([ndb_port_base])
ndb_transporter_opt_objs="" ndb_transporter_opt_objs=""
if test X"$have_ndb_shm" = Xyes if test X"$have_ndb_shm" = Xyes
then then
ndb_transporter_opt_objs="$(ndb_transporter_opt_objs) SHM_Transporter.lo SHM_Transporter.unix.lo" ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo"
fi fi
if test X"$have_ndb_sci" = Xyes if test X"$have_ndb_sci" = Xyes
then then
ndb_transporter_opt_objs="$(ndb_transporter_opt_objs) SCI_Transporter.lo" ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo"
fi fi
AC_SUBST([ndb_transporter_opt_objs]) AC_SUBST([ndb_transporter_opt_objs])
......
...@@ -3,7 +3,7 @@ LDADD += $(top_builddir)/ndb/test/src/libNDBT.a \ ...@@ -3,7 +3,7 @@ LDADD += $(top_builddir)/ndb/test/src/libNDBT.a \
$(top_builddir)/ndb/src/libndbclient.la \ $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \ $(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \ $(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a $(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \ INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \ -I$(top_srcdir)/ndb/include \
......
...@@ -3,7 +3,7 @@ LDADD += \ ...@@ -3,7 +3,7 @@ LDADD += \
$(top_builddir)/ndb/src/libndbclient.la \ $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \ $(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \ $(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a $(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \ INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \ -I$(top_srcdir)/ndb/include \
......
...@@ -117,16 +117,14 @@ ...@@ -117,16 +117,14 @@
#define CFG_SHM_KEY 502 #define CFG_SHM_KEY 502
#define CFG_SHM_BUFFER_MEM 503 #define CFG_SHM_BUFFER_MEM 503
#define CFG_SCI_ID_0 550 #define CFG_SCI_HOST1_ID_0 550
#define CFG_SCI_ID_1 551 #define CFG_SCI_HOST1_ID_1 551
#define CFG_SCI_SEND_LIMIT 552 #define CFG_SCI_HOST2_ID_0 552
#define CFG_SCI_BUFFER_MEM 553 #define CFG_SCI_HOST2_ID_1 553
#define CFG_SCI_NODE1_ADAPTERS 554 #define CFG_SCI_HOSTNAME_1 554
#define CFG_SCI_NODE1_ADAPTER0 555 #define CFG_SCI_HOSTNAME_2 555
#define CFG_SCI_NODE1_ADAPTER1 556 #define CFG_SCI_SEND_LIMIT 556
#define CFG_SCI_NODE2_ADAPTERS 554 #define CFG_SCI_BUFFER_MEM 557
#define CFG_SCI_NODE2_ADAPTER0 555
#define CFG_SCI_NODE2_ADAPTER1 556
#define CFG_OSE_HOSTNAME_1 600 #define CFG_OSE_HOSTNAME_1 600
#define CFG_OSE_HOSTNAME_2 601 #define CFG_OSE_HOSTNAME_2 601
......
...@@ -59,8 +59,6 @@ struct TCP_TransporterConfiguration { ...@@ -59,8 +59,6 @@ struct TCP_TransporterConfiguration {
NodeId localNodeId; NodeId localNodeId;
Uint32 sendBufferSize; // Size of SendBuffer of priority B Uint32 sendBufferSize; // Size of SendBuffer of priority B
Uint32 maxReceiveSize; // Maximum no of bytes to receive Uint32 maxReceiveSize; // Maximum no of bytes to receive
Uint32 byteOrder;
bool compression;
bool checksum; bool checksum;
bool signalId; bool signalId;
}; };
...@@ -72,10 +70,8 @@ struct SHM_TransporterConfiguration { ...@@ -72,10 +70,8 @@ struct SHM_TransporterConfiguration {
Uint32 port; Uint32 port;
NodeId remoteNodeId; NodeId remoteNodeId;
NodeId localNodeId; NodeId localNodeId;
bool compression;
bool checksum; bool checksum;
bool signalId; bool signalId;
int byteOrder;
Uint32 shmKey; Uint32 shmKey;
Uint32 shmSize; Uint32 shmSize;
...@@ -89,10 +85,8 @@ struct OSE_TransporterConfiguration { ...@@ -89,10 +85,8 @@ struct OSE_TransporterConfiguration {
const char *localHostName; const char *localHostName;
NodeId remoteNodeId; NodeId remoteNodeId;
NodeId localNodeId; NodeId localNodeId;
bool compression;
bool checksum; bool checksum;
bool signalId; bool signalId;
int byteOrder;
Uint32 prioASignalSize; Uint32 prioASignalSize;
Uint32 prioBSignalSize; Uint32 prioBSignalSize;
...@@ -103,20 +97,20 @@ struct OSE_TransporterConfiguration { ...@@ -103,20 +97,20 @@ struct OSE_TransporterConfiguration {
* SCI Transporter Configuration * SCI Transporter Configuration
*/ */
struct SCI_TransporterConfiguration { struct SCI_TransporterConfiguration {
const char *remoteHostName;
const char *localHostName;
Uint32 port;
Uint32 sendLimit; // Packet size Uint32 sendLimit; // Packet size
Uint32 bufferSize; // Buffer size Uint32 bufferSize; // Buffer size
Uint32 nLocalAdapters; // 1 or 2, the number of adapters on local host Uint32 nLocalAdapters; // 1 or 2, the number of adapters on local host
Uint32 nRemoteAdapters;
Uint32 remoteSciNodeId0; // SCInodeId for adapter 1 Uint32 remoteSciNodeId0; // SCInodeId for adapter 1
Uint32 remoteSciNodeId1; // SCInodeId for adapter 2 Uint32 remoteSciNodeId1; // SCInodeId for adapter 2
NodeId localNodeId; // Local node Id NodeId localNodeId; // Local node Id
NodeId remoteNodeId; // Remote node Id NodeId remoteNodeId; // Remote node Id
Uint32 byteOrder;
bool compression;
bool checksum; bool checksum;
bool signalId; bool signalId;
......
...@@ -133,7 +133,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){ ...@@ -133,7 +133,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){
Uint32 compression; Uint32 compression;
Uint32 checksum; Uint32 checksum;
if(!tmp->get("SendSignalId", &sendSignalId)) continue; if(!tmp->get("SendSignalId", &sendSignalId)) continue;
if(!tmp->get("Compression", &compression)) continue;
if(!tmp->get("Checksum", &checksum)) continue; if(!tmp->get("Checksum", &checksum)) continue;
const char * type; const char * type;
...@@ -143,8 +142,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){ ...@@ -143,8 +142,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){
SHM_TransporterConfiguration conf; SHM_TransporterConfiguration conf;
conf.localNodeId = the_ownId; conf.localNodeId = the_ownId;
conf.remoteNodeId = (nodeId1 != the_ownId ? nodeId1 : nodeId2); conf.remoteNodeId = (nodeId1 != the_ownId ? nodeId1 : nodeId2);
conf.byteOrder = 0;
conf.compression = compression;
conf.checksum = checksum; conf.checksum = checksum;
conf.signalId = sendSignalId; conf.signalId = sendSignalId;
...@@ -164,8 +161,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){ ...@@ -164,8 +161,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){
SCI_TransporterConfiguration conf; SCI_TransporterConfiguration conf;
conf.localNodeId = the_ownId; conf.localNodeId = the_ownId;
conf.remoteNodeId = (nodeId1 != the_ownId ? nodeId1 : nodeId2); conf.remoteNodeId = (nodeId1 != the_ownId ? nodeId1 : nodeId2);
conf.byteOrder = 0;
conf.compression = compression;
conf.checksum = checksum; conf.checksum = checksum;
conf.signalId = sendSignalId; conf.signalId = sendSignalId;
...@@ -174,18 +169,16 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){ ...@@ -174,18 +169,16 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){
if(the_ownId == nodeId1){ if(the_ownId == nodeId1){
if(!tmp->get("Node1_NoOfAdapters", &conf.nLocalAdapters)) continue; if(!tmp->get("Node1_NoOfAdapters", &conf.nLocalAdapters)) continue;
if(!tmp->get("Node2_NoOfAdapters", &conf.nRemoteAdapters)) continue;
if(!tmp->get("Node2_Adapter", 0, &conf.remoteSciNodeId0)) continue; if(!tmp->get("Node2_Adapter", 0, &conf.remoteSciNodeId0)) continue;
if(conf.nRemoteAdapters > 1){ if(conf.nLocalAdapters > 1){
if(!tmp->get("Node2_Adapter", 1, &conf.remoteSciNodeId1)) continue; if(!tmp->get("Node2_Adapter", 1, &conf.remoteSciNodeId1)) continue;
} }
} else { } else {
if(!tmp->get("Node2_NoOfAdapters", &conf.nLocalAdapters)) continue; if(!tmp->get("Node2_NoOfAdapters", &conf.nLocalAdapters)) continue;
if(!tmp->get("Node1_NoOfAdapters", &conf.nRemoteAdapters)) continue;
if(!tmp->get("Node1_Adapter", 0, &conf.remoteSciNodeId0)) continue; if(!tmp->get("Node1_Adapter", 0, &conf.remoteSciNodeId0)) continue;
if(conf.nRemoteAdapters > 1){ if(conf.nLocalAdapters > 1){
if(!tmp->get("Node1_Adapter", 1, &conf.remoteSciNodeId1)) continue; if(!tmp->get("Node1_Adapter", 1, &conf.remoteSciNodeId1)) continue;
} }
} }
...@@ -243,8 +236,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){ ...@@ -243,8 +236,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){
conf.localHostName = ownHostName; conf.localHostName = ownHostName;
conf.remoteNodeId = remoteNodeId; conf.remoteNodeId = remoteNodeId;
conf.localNodeId = ownNodeId; conf.localNodeId = ownNodeId;
conf.byteOrder = 0;
conf.compression = compression;
conf.checksum = checksum; conf.checksum = checksum;
conf.signalId = sendSignalId; conf.signalId = sendSignalId;
...@@ -270,8 +261,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){ ...@@ -270,8 +261,6 @@ IPCConfig::configureTransporters(TransporterRegistry * theTransporterRegistry){
conf.localHostName = ownHostName; conf.localHostName = ownHostName;
conf.remoteNodeId = remoteNodeId; conf.remoteNodeId = remoteNodeId;
conf.localNodeId = ownNodeId; conf.localNodeId = ownNodeId;
conf.byteOrder = 0;
conf.compression = compression;
conf.checksum = checksum; conf.checksum = checksum;
conf.signalId = sendSignalId; conf.signalId = sendSignalId;
...@@ -344,6 +333,7 @@ Uint32 ...@@ -344,6 +333,7 @@ Uint32
IPCConfig::configureTransporters(Uint32 nodeId, IPCConfig::configureTransporters(Uint32 nodeId,
const class ndb_mgm_configuration & config, const class ndb_mgm_configuration & config,
class TransporterRegistry & tr){ class TransporterRegistry & tr){
DBUG_ENTER("IPCConfig::configureTransporters");
Uint32 noOfTransportersCreated= 0, server_port= 0; Uint32 noOfTransportersCreated= 0, server_port= 0;
ndb_mgm_configuration_iterator iter(config, CFG_SECTION_CONNECTION); ndb_mgm_configuration_iterator iter(config, CFG_SECTION_CONNECTION);
...@@ -374,14 +364,13 @@ IPCConfig::configureTransporters(Uint32 nodeId, ...@@ -374,14 +364,13 @@ IPCConfig::configureTransporters(Uint32 nodeId,
} }
server_port= tmp_server_port; server_port= tmp_server_port;
} }
DBUG_PRINT("info", ("Transporter between this node %d and node %d using port %d, signalId %d, checksum %d",
nodeId, remoteNodeId, tmp_server_port, sendSignalId, checksum));
switch(type){ switch(type){
case CONNECTION_TYPE_SHM:{ case CONNECTION_TYPE_SHM:{
SHM_TransporterConfiguration conf; SHM_TransporterConfiguration conf;
conf.localNodeId = nodeId; conf.localNodeId = nodeId;
conf.remoteNodeId = remoteNodeId; conf.remoteNodeId = remoteNodeId;
conf.byteOrder = 0;
conf.compression = 0;
conf.checksum = checksum; conf.checksum = checksum;
conf.signalId = sendSignalId; conf.signalId = sendSignalId;
...@@ -391,45 +380,60 @@ IPCConfig::configureTransporters(Uint32 nodeId, ...@@ -391,45 +380,60 @@ IPCConfig::configureTransporters(Uint32 nodeId,
conf.port= tmp_server_port; conf.port= tmp_server_port;
if(!tr.createTransporter(&conf)){ if(!tr.createTransporter(&conf)){
DBUG_PRINT("error", ("Failed to create SCI Transporter from %d to %d",
conf.localNodeId, conf.remoteNodeId));
ndbout << "Failed to create SHM Transporter from: " ndbout << "Failed to create SHM Transporter from: "
<< conf.localNodeId << " to: " << conf.remoteNodeId << endl; << conf.localNodeId << " to: " << conf.remoteNodeId << endl;
} else { } else {
noOfTransportersCreated++; noOfTransportersCreated++;
} }
DBUG_PRINT("info", ("Created SHM Transporter using shmkey %d, buf size = %d",
conf.shmKey, conf.shmSize));
break; break;
} }
case CONNECTION_TYPE_SCI:{ case CONNECTION_TYPE_SCI:{
SCI_TransporterConfiguration conf; SCI_TransporterConfiguration conf;
const char * host1, * host2;
conf.localNodeId = nodeId; conf.localNodeId = nodeId;
conf.remoteNodeId = remoteNodeId; conf.remoteNodeId = remoteNodeId;
conf.byteOrder = 0;
conf.compression = 0;
conf.checksum = checksum; conf.checksum = checksum;
conf.signalId = sendSignalId; conf.signalId = sendSignalId;
conf.port= tmp_server_port;
if(iter.get(CFG_SCI_HOSTNAME_1, &host1)) break;
if(iter.get(CFG_SCI_HOSTNAME_2, &host2)) break;
conf.localHostName = (nodeId == nodeId1 ? host1 : host2);
conf.remoteHostName = (nodeId == nodeId1 ? host2 : host1);
if(iter.get(CFG_SCI_SEND_LIMIT, &conf.sendLimit)) break; if(iter.get(CFG_SCI_SEND_LIMIT, &conf.sendLimit)) break;
if(iter.get(CFG_SCI_BUFFER_MEM, &conf.bufferSize)) break; if(iter.get(CFG_SCI_BUFFER_MEM, &conf.bufferSize)) break;
if (nodeId == nodeId1) {
if(nodeId == nodeId1){ if(iter.get(CFG_SCI_HOST2_ID_0, &conf.remoteSciNodeId0)) break;
if(iter.get(CFG_SCI_NODE1_ADAPTERS, &conf.nLocalAdapters)) break; if(iter.get(CFG_SCI_HOST2_ID_1, &conf.remoteSciNodeId1)) break;
if(iter.get(CFG_SCI_NODE2_ADAPTERS, &conf.nRemoteAdapters)) break;
if(iter.get(CFG_SCI_NODE2_ADAPTER0, &conf.remoteSciNodeId0)) break;
if(conf.nRemoteAdapters > 1){
if(iter.get(CFG_SCI_NODE2_ADAPTER1, &conf.remoteSciNodeId1)) break;
}
} else { } else {
if(iter.get(CFG_SCI_NODE2_ADAPTERS, &conf.nLocalAdapters)) break; if(iter.get(CFG_SCI_HOST1_ID_0, &conf.remoteSciNodeId0)) break;
if(iter.get(CFG_SCI_NODE1_ADAPTERS, &conf.nRemoteAdapters)) break; if(iter.get(CFG_SCI_HOST1_ID_1, &conf.remoteSciNodeId1)) break;
if(iter.get(CFG_SCI_NODE1_ADAPTER0, &conf.remoteSciNodeId0)) break;
if(conf.nRemoteAdapters > 1){
if(iter.get(CFG_SCI_NODE1_ADAPTER1, &conf.remoteSciNodeId1)) break;
}
} }
if (conf.remoteSciNodeId1 == 0) {
if(!tr.createTransporter(&conf)){ conf.nLocalAdapters = 1;
} else {
conf.nLocalAdapters = 2;
}
if(!tr.createTransporter(&conf)){
DBUG_PRINT("error", ("Failed to create SCI Transporter from %d to %d",
conf.localNodeId, conf.remoteNodeId));
ndbout << "Failed to create SCI Transporter from: " ndbout << "Failed to create SCI Transporter from: "
<< conf.localNodeId << " to: " << conf.remoteNodeId << endl; << conf.localNodeId << " to: " << conf.remoteNodeId << endl;
} else { } else {
DBUG_PRINT("info", ("Created SCI Transporter: Adapters = %d, remote SCI node id %d",
conf.nLocalAdapters, conf.remoteSciNodeId0));
DBUG_PRINT("info", ("Host 1 = %s, Host 2 = %s, sendLimit = %d, buf size = %d",
conf.localHostName, conf.remoteHostName, conf.sendLimit, conf.bufferSize));
if (conf.nLocalAdapters > 1) {
DBUG_PRINT("info", ("Fault-tolerant with 2 Remote Adapters, second remote SCI node id = %d",
conf.remoteSciNodeId1));
}
noOfTransportersCreated++; noOfTransportersCreated++;
continue; continue;
} }
...@@ -457,8 +461,6 @@ IPCConfig::configureTransporters(Uint32 nodeId, ...@@ -457,8 +461,6 @@ IPCConfig::configureTransporters(Uint32 nodeId,
conf.remoteNodeId = remoteNodeId; conf.remoteNodeId = remoteNodeId;
conf.localHostName = (nodeId == nodeId1 ? host1 : host2); conf.localHostName = (nodeId == nodeId1 ? host1 : host2);
conf.remoteHostName = (nodeId == nodeId1 ? host2 : host1); conf.remoteHostName = (nodeId == nodeId1 ? host2 : host1);
conf.byteOrder = 0;
conf.compression = 0;
conf.checksum = checksum; conf.checksum = checksum;
conf.signalId = sendSignalId; conf.signalId = sendSignalId;
...@@ -468,6 +470,9 @@ IPCConfig::configureTransporters(Uint32 nodeId, ...@@ -468,6 +470,9 @@ IPCConfig::configureTransporters(Uint32 nodeId,
} else { } else {
noOfTransportersCreated++; noOfTransportersCreated++;
} }
DBUG_PRINT("info", ("Created TCP Transporter: sendBufferSize = %d, maxReceiveSize = %d",
conf.sendBufferSize, conf.maxReceiveSize));
break;
case CONNECTION_TYPE_OSE:{ case CONNECTION_TYPE_OSE:{
OSE_TransporterConfiguration conf; OSE_TransporterConfiguration conf;
...@@ -483,8 +488,6 @@ IPCConfig::configureTransporters(Uint32 nodeId, ...@@ -483,8 +488,6 @@ IPCConfig::configureTransporters(Uint32 nodeId,
conf.remoteNodeId = remoteNodeId; conf.remoteNodeId = remoteNodeId;
conf.localHostName = (nodeId == nodeId1 ? host1 : host2); conf.localHostName = (nodeId == nodeId1 ? host1 : host2);
conf.remoteHostName = (nodeId == nodeId1 ? host2 : host1); conf.remoteHostName = (nodeId == nodeId1 ? host2 : host1);
conf.byteOrder = 0;
conf.compression = 0;
conf.checksum = checksum; conf.checksum = checksum;
conf.signalId = sendSignalId; conf.signalId = sendSignalId;
...@@ -505,6 +508,6 @@ IPCConfig::configureTransporters(Uint32 nodeId, ...@@ -505,6 +508,6 @@ IPCConfig::configureTransporters(Uint32 nodeId,
tr.m_service_port= server_port; tr.m_service_port= server_port;
return noOfTransportersCreated; DBUG_RETURN(noOfTransportersCreated);
} }
...@@ -13,7 +13,7 @@ EXTRA_libtransporter_la_SOURCES = SHM_Transporter.cpp SHM_Transporter.unix.cpp S ...@@ -13,7 +13,7 @@ EXTRA_libtransporter_la_SOURCES = SHM_Transporter.cpp SHM_Transporter.unix.cpp S
libtransporter_la_LIBADD = @ndb_transporter_opt_objs@ libtransporter_la_LIBADD = @ndb_transporter_opt_objs@
libtransporter_la_DEPENDENCIES = @ndb_transporter_opt_objs@ libtransporter_la_DEPENDENCIES = @ndb_transporter_opt_objs@
INCLUDES_LOC = -I$(top_srcdir)/ndb/include/kernel -I$(top_srcdir)/ndb/include/transporter INCLUDES_LOC = -I$(top_srcdir)/ndb/include/kernel -I$(top_srcdir)/ndb/include/transporter @NDB_SCI_INCLUDES@
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am include $(top_srcdir)/ndb/config/type_util.mk.am
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <ndb_types.h> #include <ndb_types.h>
/** /**
* The SCI Transporter * The SCI Transporter
* *
* The design goal of the SCI transporter is to deliver high performance * The design goal of the SCI transporter is to deliver high performance
...@@ -135,15 +135,17 @@ public: ...@@ -135,15 +135,17 @@ public:
bool getConnectionStatus(); bool getConnectionStatus();
private: private:
SCI_Transporter(Uint32 packetSize, SCI_Transporter(TransporterRegistry &t_reg,
const char *local_host,
const char *remote_host,
int port,
Uint32 packetSize,
Uint32 bufferSize, Uint32 bufferSize,
Uint32 nAdapters, Uint32 nAdapters,
Uint16 remoteSciNodeId0, Uint16 remoteSciNodeId0,
Uint16 remoteSciNodeId1, Uint16 remoteSciNodeId1,
NodeId localNodeID, NodeId localNodeID,
NodeId remoteNodeID, NodeId remoteNodeID,
int byteorder,
bool compression,
bool checksum, bool checksum,
bool signalId, bool signalId,
Uint32 reportFreq = 4096); Uint32 reportFreq = 4096);
...@@ -160,7 +162,8 @@ private: ...@@ -160,7 +162,8 @@ private:
/** /**
* For statistics on transfered packets * For statistics on transfered packets
*/ */
#ifdef DEBUG_TRANSPORTER //#ifdef DEBUG_TRANSPORTER
#if 1
Uint32 i1024; Uint32 i1024;
Uint32 i2048; Uint32 i2048;
Uint32 i2049; Uint32 i2049;
...@@ -177,10 +180,8 @@ private: ...@@ -177,10 +180,8 @@ private:
struct { struct {
Uint32 * m_buffer; // The buffer Uint32 * m_buffer; // The buffer
Uint32 m_dataSize; // No of words in buffer Uint32 m_dataSize; // No of words in buffer
Uint32 m_bufferSize; // Buffer size Uint32 m_sendBufferSize; // Buffer size
Uint32 m_forceSendLimit; // Send when buffer is this full Uint32 m_forceSendLimit; // Send when buffer is this full
bool full() const { return (m_dataSize * 4) > m_forceSendLimit ;}
} m_sendBuffer; } m_sendBuffer;
SHM_Reader * reader; SHM_Reader * reader;
...@@ -196,7 +197,7 @@ private: ...@@ -196,7 +197,7 @@ private:
Uint32 m_adapters; Uint32 m_adapters;
Uint32 m_numberOfRemoteNodes; Uint32 m_numberOfRemoteNodes;
Uint16* m_remoteNodes; Uint16 m_remoteNodes[2];
typedef struct SciAdapter { typedef struct SciAdapter {
sci_desc_t scidesc; sci_desc_t scidesc;
...@@ -297,12 +298,12 @@ private: ...@@ -297,12 +298,12 @@ private:
bool sendIsPossible(struct timeval * timeout); bool sendIsPossible(struct timeval * timeout);
void getReceivePtr(Uint32 ** ptr, Uint32 ** eod){ void getReceivePtr(Uint32 ** ptr, Uint32 &size){
reader->getReadPtr(* ptr, * eod); size = reader->getReadPtr(* ptr);
} }
void updateReceivePtr(Uint32 * ptr){ void updateReceivePtr(Uint32 size){
reader->updateReadPtr(ptr); reader->updateReadPtr(size);
} }
/** /**
...@@ -341,7 +342,9 @@ private: ...@@ -341,7 +342,9 @@ private:
*/ */
void failoverShmWriter(); void failoverShmWriter();
bool init_local();
bool init_remote();
protected: protected:
/** Perform a connection between segment /** Perform a connection between segment
...@@ -350,7 +353,8 @@ protected: ...@@ -350,7 +353,8 @@ protected:
* retrying. * retrying.
* @return Returns true on success, otherwize falser * @return Returns true on success, otherwize falser
*/ */
bool connectImpl(Uint32 timeOutMillis); bool connect_server_impl(NDB_SOCKET_TYPE sockfd);
bool connect_client_impl(NDB_SOCKET_TYPE sockfd);
/** /**
* We will disconnect if: * We will disconnect if:
......
...@@ -42,17 +42,19 @@ public: ...@@ -42,17 +42,19 @@ public:
Uint32 _sizeOfBuffer, Uint32 _sizeOfBuffer,
Uint32 _slack, Uint32 _slack,
Uint32 * _readIndex, Uint32 * _readIndex,
Uint32 * _endWriteIndex,
Uint32 * _writeIndex) : Uint32 * _writeIndex) :
m_startOfBuffer(_startOfBuffer), m_startOfBuffer(_startOfBuffer),
m_totalBufferSize(_sizeOfBuffer), m_totalBufferSize(_sizeOfBuffer),
m_bufferSize(_sizeOfBuffer - _slack), m_bufferSize(_sizeOfBuffer - _slack),
m_sharedReadIndex(_readIndex), m_sharedReadIndex(_readIndex),
m_sharedEndWriteIndex(_endWriteIndex),
m_sharedWriteIndex(_writeIndex) m_sharedWriteIndex(_writeIndex)
{ {
} }
void clear() { void clear() {
m_readIndex = * m_sharedReadIndex; m_readIndex = 0;
} }
/** /**
...@@ -66,12 +68,12 @@ public: ...@@ -66,12 +68,12 @@ public:
* returns ptr - where to start reading * returns ptr - where to start reading
* sz - how much can I read * sz - how much can I read
*/ */
inline void getReadPtr(Uint32 * & ptr, Uint32 * & eod); inline Uint32 getReadPtr(Uint32 * & ptr);
/** /**
* Update read ptr * Update read ptr
*/ */
inline void updateReadPtr(Uint32 * readPtr); inline void updateReadPtr(Uint32 size);
private: private:
char * const m_startOfBuffer; char * const m_startOfBuffer;
...@@ -80,6 +82,7 @@ private: ...@@ -80,6 +82,7 @@ private:
Uint32 m_readIndex; Uint32 m_readIndex;
Uint32 * m_sharedReadIndex; Uint32 * m_sharedReadIndex;
Uint32 * m_sharedEndWriteIndex;
Uint32 * m_sharedWriteIndex; Uint32 * m_sharedWriteIndex;
}; };
...@@ -97,19 +100,22 @@ SHM_Reader::empty() const{ ...@@ -97,19 +100,22 @@ SHM_Reader::empty() const{
* sz - how much can I read * sz - how much can I read
*/ */
inline inline
void Uint32
SHM_Reader::getReadPtr(Uint32 * & ptr, Uint32 * & eod){ SHM_Reader::getReadPtr(Uint32 * & ptr)
{
Uint32 *eod;
Uint32 tReadIndex = m_readIndex; Uint32 tReadIndex = m_readIndex;
Uint32 tWriteIndex = * m_sharedWriteIndex; Uint32 tWriteIndex = * m_sharedWriteIndex;
Uint32 tEndWriteIndex = * m_sharedEndWriteIndex;
ptr = (Uint32*)&m_startOfBuffer[tReadIndex]; ptr = (Uint32*)&m_startOfBuffer[tReadIndex];
if(tReadIndex <= tWriteIndex){ if(tReadIndex <= tWriteIndex){
eod = (Uint32*)&m_startOfBuffer[tWriteIndex]; eod = (Uint32*)&m_startOfBuffer[tWriteIndex];
} else { } else {
eod = (Uint32*)&m_startOfBuffer[m_bufferSize]; eod = (Uint32*)&m_startOfBuffer[tEndWriteIndex];
} }
return (Uint32)((char*)eod - (char*)ptr);
} }
/** /**
...@@ -117,14 +123,14 @@ SHM_Reader::getReadPtr(Uint32 * & ptr, Uint32 * & eod){ ...@@ -117,14 +123,14 @@ SHM_Reader::getReadPtr(Uint32 * & ptr, Uint32 * & eod){
*/ */
inline inline
void void
SHM_Reader::updateReadPtr(Uint32 * ptr){ SHM_Reader::updateReadPtr(Uint32 size)
{
Uint32 tReadIndex = ((char *)ptr) - m_startOfBuffer; Uint32 tReadIndex = m_readIndex;
tReadIndex += size;
assert(tReadIndex < m_totalBufferSize); assert(tReadIndex < m_totalBufferSize);
if(tReadIndex >= m_bufferSize){ if(tReadIndex >= m_bufferSize){
tReadIndex = 0; //-= m_bufferSize; tReadIndex = 0;
} }
m_readIndex = tReadIndex; m_readIndex = tReadIndex;
...@@ -139,17 +145,19 @@ public: ...@@ -139,17 +145,19 @@ public:
Uint32 _sizeOfBuffer, Uint32 _sizeOfBuffer,
Uint32 _slack, Uint32 _slack,
Uint32 * _readIndex, Uint32 * _readIndex,
Uint32 * _endWriteIndex,
Uint32 * _writeIndex) : Uint32 * _writeIndex) :
m_startOfBuffer(_startOfBuffer), m_startOfBuffer(_startOfBuffer),
m_totalBufferSize(_sizeOfBuffer), m_totalBufferSize(_sizeOfBuffer),
m_bufferSize(_sizeOfBuffer - _slack), m_bufferSize(_sizeOfBuffer - _slack),
m_sharedReadIndex(_readIndex), m_sharedReadIndex(_readIndex),
m_sharedEndWriteIndex(_endWriteIndex),
m_sharedWriteIndex(_writeIndex) m_sharedWriteIndex(_writeIndex)
{ {
} }
void clear() { void clear() {
m_writeIndex = * m_sharedWriteIndex; m_writeIndex = 0;
} }
inline char * getWritePtr(Uint32 sz); inline char * getWritePtr(Uint32 sz);
...@@ -168,6 +176,7 @@ private: ...@@ -168,6 +176,7 @@ private:
Uint32 m_writeIndex; Uint32 m_writeIndex;
Uint32 * m_sharedReadIndex; Uint32 * m_sharedReadIndex;
Uint32 * m_sharedEndWriteIndex;
Uint32 * m_sharedWriteIndex; Uint32 * m_sharedWriteIndex;
}; };
...@@ -206,7 +215,8 @@ SHM_Writer::updateWritePtr(Uint32 sz){ ...@@ -206,7 +215,8 @@ SHM_Writer::updateWritePtr(Uint32 sz){
assert(tWriteIndex < m_totalBufferSize); assert(tWriteIndex < m_totalBufferSize);
if(tWriteIndex >= m_bufferSize){ if(tWriteIndex >= m_bufferSize){
tWriteIndex = 0; //-= m_bufferSize; * m_sharedEndWriteIndex = tWriteIndex;
tWriteIndex = 0;
} }
m_writeIndex = tWriteIndex; m_writeIndex = tWriteIndex;
......
...@@ -32,13 +32,12 @@ SHM_Transporter::SHM_Transporter(TransporterRegistry &t_reg, ...@@ -32,13 +32,12 @@ SHM_Transporter::SHM_Transporter(TransporterRegistry &t_reg,
int r_port, int r_port,
NodeId lNodeId, NodeId lNodeId,
NodeId rNodeId, NodeId rNodeId,
bool compression,
bool checksum, bool checksum,
bool signalId, bool signalId,
key_t _shmKey, key_t _shmKey,
Uint32 _shmSize) : Uint32 _shmSize) :
Transporter(t_reg, lHostName, rHostName, r_port, lNodeId, rNodeId, Transporter(t_reg, lHostName, rHostName, r_port, lNodeId, rNodeId,
0, compression, checksum, signalId), 0, false, checksum, signalId),
shmKey(_shmKey), shmKey(_shmKey),
shmSize(_shmSize) shmSize(_shmSize)
{ {
...@@ -48,7 +47,7 @@ SHM_Transporter::SHM_Transporter(TransporterRegistry &t_reg, ...@@ -48,7 +47,7 @@ SHM_Transporter::SHM_Transporter(TransporterRegistry &t_reg,
shmBuf = 0; shmBuf = 0;
reader = 0; reader = 0;
writer = 0; writer = 0;
setupBuffersDone=false; setupBuffersDone=false;
#ifdef DEBUG_TRANSPORTER #ifdef DEBUG_TRANSPORTER
printf("shm key (%d - %d) = %d\n", lNodeId, rNodeId, shmKey); printf("shm key (%d - %d) = %d\n", lNodeId, rNodeId, shmKey);
...@@ -83,36 +82,40 @@ SHM_Transporter::setupBuffers(){ ...@@ -83,36 +82,40 @@ SHM_Transporter::setupBuffers(){
Uint32 * sharedReadIndex1 = base1; Uint32 * sharedReadIndex1 = base1;
Uint32 * sharedWriteIndex1 = base1 + 1; Uint32 * sharedWriteIndex1 = base1 + 1;
Uint32 * sharedEndWriteIndex1 = base1 + 2;
serverStatusFlag = base1 + 4; serverStatusFlag = base1 + 4;
char * startOfBuf1 = shmBuf+sharedSize; char * startOfBuf1 = shmBuf+sharedSize;
Uint32 * base2 = (Uint32*)(shmBuf + sizeOfBuffer + sharedSize); Uint32 * base2 = (Uint32*)(shmBuf + sizeOfBuffer + sharedSize);
Uint32 * sharedReadIndex2 = base2; Uint32 * sharedReadIndex2 = base2;
Uint32 * sharedWriteIndex2 = base2 + 1; Uint32 * sharedWriteIndex2 = base2 + 1;
Uint32 * sharedEndWriteIndex2 = base2 + 2;
clientStatusFlag = base2 + 4; clientStatusFlag = base2 + 4;
char * startOfBuf2 = ((char *)base2)+sharedSize; char * startOfBuf2 = ((char *)base2)+sharedSize;
* sharedReadIndex2 = * sharedWriteIndex2 = 0;
if(isServer){ if(isServer){
* serverStatusFlag = 0; * serverStatusFlag = 0;
reader = new SHM_Reader(startOfBuf1, reader = new SHM_Reader(startOfBuf1,
sizeOfBuffer, sizeOfBuffer,
slack, slack,
sharedReadIndex1, sharedReadIndex1,
sharedEndWriteIndex1,
sharedWriteIndex1); sharedWriteIndex1);
writer = new SHM_Writer(startOfBuf2, writer = new SHM_Writer(startOfBuf2,
sizeOfBuffer, sizeOfBuffer,
slack, slack,
sharedReadIndex2, sharedReadIndex2,
sharedEndWriteIndex2,
sharedWriteIndex2); sharedWriteIndex2);
* sharedReadIndex1 = 0; * sharedReadIndex1 = 0;
* sharedWriteIndex2 = 0; * sharedWriteIndex1 = 0;
* sharedEndWriteIndex1 = 0;
* sharedReadIndex2 = 0; * sharedReadIndex2 = 0;
* sharedWriteIndex1 = 0; * sharedWriteIndex2 = 0;
* sharedEndWriteIndex2 = 0;
reader->clear(); reader->clear();
writer->clear(); writer->clear();
...@@ -145,16 +148,19 @@ SHM_Transporter::setupBuffers(){ ...@@ -145,16 +148,19 @@ SHM_Transporter::setupBuffers(){
sizeOfBuffer, sizeOfBuffer,
slack, slack,
sharedReadIndex2, sharedReadIndex2,
sharedEndWriteIndex2,
sharedWriteIndex2); sharedWriteIndex2);
writer = new SHM_Writer(startOfBuf1, writer = new SHM_Writer(startOfBuf1,
sizeOfBuffer, sizeOfBuffer,
slack, slack,
sharedReadIndex1, sharedReadIndex1,
sharedEndWriteIndex1,
sharedWriteIndex1); sharedWriteIndex1);
* sharedReadIndex2 = 0; * sharedReadIndex2 = 0;
* sharedWriteIndex1 = 0; * sharedWriteIndex1 = 0;
* sharedEndWriteIndex1 = 0;
reader->clear(); reader->clear();
writer->clear(); writer->clear();
...@@ -224,6 +230,7 @@ SHM_Transporter::prepareSend(const SignalHeader * const signalHeader, ...@@ -224,6 +230,7 @@ SHM_Transporter::prepareSend(const SignalHeader * const signalHeader,
bool bool
SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd) SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd)
{ {
DBUG_ENTER("SHM_Transporter::connect_server_impl");
SocketOutputStream s_output(sockfd); SocketOutputStream s_output(sockfd);
SocketInputStream s_input(sockfd); SocketInputStream s_input(sockfd);
char buf[256]; char buf[256];
...@@ -233,7 +240,7 @@ SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd) ...@@ -233,7 +240,7 @@ SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd)
if (!ndb_shm_create()) { if (!ndb_shm_create()) {
report_error(TE_SHM_UNABLE_TO_CREATE_SEGMENT); report_error(TE_SHM_UNABLE_TO_CREATE_SEGMENT);
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return false; DBUG_RETURN(false);
} }
_shmSegCreated = true; _shmSegCreated = true;
} }
...@@ -243,7 +250,7 @@ SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd) ...@@ -243,7 +250,7 @@ SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd)
if (!ndb_shm_attach()) { if (!ndb_shm_attach()) {
report_error(TE_SHM_UNABLE_TO_ATTACH_SEGMENT); report_error(TE_SHM_UNABLE_TO_ATTACH_SEGMENT);
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return false; DBUG_RETURN(false);
} }
_attached = true; _attached = true;
} }
...@@ -254,7 +261,7 @@ SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd) ...@@ -254,7 +261,7 @@ SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd)
// Wait for ok from client // Wait for ok from client
if (s_input.gets(buf, 256) == 0) { if (s_input.gets(buf, 256) == 0) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return false; DBUG_RETURN(false);
} }
int r= connect_common(sockfd); int r= connect_common(sockfd);
...@@ -265,17 +272,20 @@ SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd) ...@@ -265,17 +272,20 @@ SHM_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd)
// Wait for ok from client // Wait for ok from client
if (s_input.gets(buf, 256) == 0) { if (s_input.gets(buf, 256) == 0) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return false; DBUG_RETURN(false);
} }
DBUG_PRINT("info", ("Successfully connected server to node %d",
remoteNodeId));
} }
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return r; DBUG_RETURN(r);
} }
bool bool
SHM_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd) SHM_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd)
{ {
DBUG_ENTER("SHM_Transporter::connect_client_impl");
SocketInputStream s_input(sockfd); SocketInputStream s_input(sockfd);
SocketOutputStream s_output(sockfd); SocketOutputStream s_output(sockfd);
char buf[256]; char buf[256];
...@@ -283,14 +293,18 @@ SHM_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd) ...@@ -283,14 +293,18 @@ SHM_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd)
// Wait for server to create and attach // Wait for server to create and attach
if (s_input.gets(buf, 256) == 0) { if (s_input.gets(buf, 256) == 0) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return false; DBUG_PRINT("error", ("Server id %d did not attach",
remoteNodeId));
DBUG_RETURN(false);
} }
// Create // Create
if(!_shmSegCreated){ if(!_shmSegCreated){
if (!ndb_shm_get()) { if (!ndb_shm_get()) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return false; DBUG_PRINT("error", ("Failed create of shm seg to node %d",
remoteNodeId));
DBUG_RETURN(false);
} }
_shmSegCreated = true; _shmSegCreated = true;
} }
...@@ -300,7 +314,9 @@ SHM_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd) ...@@ -300,7 +314,9 @@ SHM_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd)
if (!ndb_shm_attach()) { if (!ndb_shm_attach()) {
report_error(TE_SHM_UNABLE_TO_ATTACH_SEGMENT); report_error(TE_SHM_UNABLE_TO_ATTACH_SEGMENT);
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return false; DBUG_PRINT("error", ("Failed attach of shm seg to node %d",
remoteNodeId));
DBUG_RETURN(false);
} }
_attached = true; _attached = true;
} }
...@@ -314,21 +330,28 @@ SHM_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd) ...@@ -314,21 +330,28 @@ SHM_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd)
// Wait for ok from server // Wait for ok from server
if (s_input.gets(buf, 256) == 0) { if (s_input.gets(buf, 256) == 0) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return false; DBUG_PRINT("error", ("No ok from server node %d",
remoteNodeId));
DBUG_RETURN(false);
} }
// Send ok to server // Send ok to server
s_output.println("shm client 2 ok"); s_output.println("shm client 2 ok");
DBUG_PRINT("info", ("Successfully connected client to node %d",
remoteNodeId));
} }
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return r; DBUG_RETURN(r);
} }
bool bool
SHM_Transporter::connect_common(NDB_SOCKET_TYPE sockfd) SHM_Transporter::connect_common(NDB_SOCKET_TYPE sockfd)
{ {
if (!checkConnected()) if (!checkConnected()) {
DBUG_PRINT("error", ("Already connected to node %d",
remoteNodeId));
return false; return false;
}
if(!setupBuffersDone) { if(!setupBuffersDone) {
setupBuffers(); setupBuffers();
...@@ -341,5 +364,7 @@ SHM_Transporter::connect_common(NDB_SOCKET_TYPE sockfd) ...@@ -341,5 +364,7 @@ SHM_Transporter::connect_common(NDB_SOCKET_TYPE sockfd)
return true; return true;
} }
DBUG_PRINT("error", ("Failed to set up buffers to node %d",
remoteNodeId));
return false; return false;
} }
...@@ -38,7 +38,6 @@ public: ...@@ -38,7 +38,6 @@ public:
int r_port, int r_port,
NodeId lNodeId, NodeId lNodeId,
NodeId rNodeId, NodeId rNodeId,
bool compression,
bool checksum, bool checksum,
bool signalId, bool signalId,
key_t shmKey, key_t shmKey,
...@@ -62,12 +61,12 @@ public: ...@@ -62,12 +61,12 @@ public:
writer->updateWritePtr(lenBytes); writer->updateWritePtr(lenBytes);
} }
void getReceivePtr(Uint32 ** ptr, Uint32 ** eod){ void getReceivePtr(Uint32 ** ptr, Uint32 sz){
reader->getReadPtr(* ptr, * eod); sz = reader->getReadPtr(* ptr);
} }
void updateReceivePtr(Uint32 * ptr){ void updateReceivePtr(Uint32 sz){
reader->updateReadPtr(ptr); reader->updateReadPtr(sz);
} }
protected: protected:
...@@ -127,6 +126,7 @@ protected: ...@@ -127,6 +126,7 @@ protected:
private: private:
bool _shmSegCreated; bool _shmSegCreated;
bool _attached; bool _attached;
bool m_connected;
key_t shmKey; key_t shmKey;
volatile Uint32 * serverStatusFlag; volatile Uint32 * serverStatusFlag;
......
...@@ -70,11 +70,10 @@ TCP_Transporter::TCP_Transporter(TransporterRegistry &t_reg, ...@@ -70,11 +70,10 @@ TCP_Transporter::TCP_Transporter(TransporterRegistry &t_reg,
int r_port, int r_port,
NodeId lNodeId, NodeId lNodeId,
NodeId rNodeId, NodeId rNodeId,
int byte_order, bool chksm, bool signalId,
bool compr, bool chksm, bool signalId,
Uint32 _reportFreq) : Uint32 _reportFreq) :
Transporter(t_reg, lHostName, rHostName, r_port, lNodeId, rNodeId, Transporter(t_reg, lHostName, rHostName, r_port, lNodeId, rNodeId,
byte_order, compr, chksm, signalId), 0, false, chksm, signalId),
m_sendBuffer(sendBufSize) m_sendBuffer(sendBufSize)
{ {
maxReceiveSize = maxRecvSize; maxReceiveSize = maxRecvSize;
...@@ -106,12 +105,14 @@ TCP_Transporter::~TCP_Transporter() { ...@@ -106,12 +105,14 @@ TCP_Transporter::~TCP_Transporter() {
bool TCP_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd) bool TCP_Transporter::connect_server_impl(NDB_SOCKET_TYPE sockfd)
{ {
return connect_common(sockfd); DBUG_ENTER("TCP_Transpporter::connect_server_impl");
DBUG_RETURN(connect_common(sockfd));
} }
bool TCP_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd) bool TCP_Transporter::connect_client_impl(NDB_SOCKET_TYPE sockfd)
{ {
return connect_common(sockfd); DBUG_ENTER("TCP_Transpporter::connect_client_impl");
DBUG_RETURN(connect_common(sockfd));
} }
bool TCP_Transporter::connect_common(NDB_SOCKET_TYPE sockfd) bool TCP_Transporter::connect_common(NDB_SOCKET_TYPE sockfd)
...@@ -119,6 +120,8 @@ bool TCP_Transporter::connect_common(NDB_SOCKET_TYPE sockfd) ...@@ -119,6 +120,8 @@ bool TCP_Transporter::connect_common(NDB_SOCKET_TYPE sockfd)
theSocket = sockfd; theSocket = sockfd;
setSocketOptions(); setSocketOptions();
setSocketNonBlocking(theSocket); setSocketNonBlocking(theSocket);
DBUG_PRINT("info", ("Successfully set-up TCP transporter to node %d",
remoteNodeId));
return true; return true;
} }
......
...@@ -52,8 +52,7 @@ private: ...@@ -52,8 +52,7 @@ private:
int r_port, int r_port,
NodeId lHostId, NodeId lHostId,
NodeId rHostId, NodeId rHostId,
int byteorder, bool checksum, bool signalId,
bool compression, bool checksum, bool signalId,
Uint32 reportFreq = 4096); Uint32 reportFreq = 4096);
// Disconnect, delete send buffers and receive buffer // Disconnect, delete send buffers and receive buffer
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h> #include <ndb_global.h>
#include <my_pthread.h>
#include <TransporterRegistry.hpp> #include <TransporterRegistry.hpp>
#include "TransporterInternalDefinitions.hpp" #include "TransporterInternalDefinitions.hpp"
...@@ -48,9 +49,10 @@ ...@@ -48,9 +49,10 @@
SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd) SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd)
{ {
DBUG_ENTER("SocketServer::Session * TransporterService::newSession");
if (m_auth && !m_auth->server_authenticate(sockfd)){ if (m_auth && !m_auth->server_authenticate(sockfd)){
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return 0; DBUG_RETURN(0);
} }
{ {
...@@ -60,27 +62,32 @@ SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd) ...@@ -60,27 +62,32 @@ SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd)
char buf[256]; char buf[256];
if (s_input.gets(buf, 256) == 0) { if (s_input.gets(buf, 256) == 0) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return 0; DBUG_PRINT("error", ("Could not get node id from client"));
DBUG_RETURN(0);
} }
if (sscanf(buf, "%d", &nodeId) != 1) { if (sscanf(buf, "%d", &nodeId) != 1) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return 0; DBUG_PRINT("error", ("Error in node id from client"));
DBUG_RETURN(0);
} }
//check that nodeid is valid and that there is an allocated transporter //check that nodeid is valid and that there is an allocated transporter
if ( nodeId < 0 || nodeId >= m_transporter_registry->maxTransporters) { if ( nodeId < 0 || nodeId >= (int)m_transporter_registry->maxTransporters) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return 0; DBUG_PRINT("error", ("Node id out of range from client"));
DBUG_RETURN(0);
} }
if (m_transporter_registry->theTransporters[nodeId] == 0) { if (m_transporter_registry->theTransporters[nodeId] == 0) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return 0; DBUG_PRINT("error", ("No transporter for this node id from client"));
DBUG_RETURN(0);
} }
//check that the transporter should be connected //check that the transporter should be connected
if (m_transporter_registry->performStates[nodeId] != TransporterRegistry::CONNECTING) { if (m_transporter_registry->performStates[nodeId] != TransporterRegistry::CONNECTING) {
NDB_CLOSE_SOCKET(sockfd); NDB_CLOSE_SOCKET(sockfd);
return 0; DBUG_PRINT("error", ("Transporter in wrong state for this node id from client"));
DBUG_RETURN(0);
} }
Transporter *t= m_transporter_registry->theTransporters[nodeId]; Transporter *t= m_transporter_registry->theTransporters[nodeId];
...@@ -93,7 +100,7 @@ SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd) ...@@ -93,7 +100,7 @@ SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd)
t->connect_server(sockfd); t->connect_server(sockfd);
} }
return 0; DBUG_RETURN(0);
} }
TransporterRegistry::TransporterRegistry(void * callback, TransporterRegistry::TransporterRegistry(void * callback,
...@@ -209,8 +216,6 @@ TransporterRegistry::createTransporter(TCP_TransporterConfiguration *config) { ...@@ -209,8 +216,6 @@ TransporterRegistry::createTransporter(TCP_TransporterConfiguration *config) {
config->port, config->port,
localNodeId, localNodeId,
config->remoteNodeId, config->remoteNodeId,
config->byteOrder,
config->compression,
config->checksum, config->checksum,
config->signalId); config->signalId);
if (t == NULL) if (t == NULL)
...@@ -264,8 +269,6 @@ TransporterRegistry::createTransporter(OSE_TransporterConfiguration *conf) { ...@@ -264,8 +269,6 @@ TransporterRegistry::createTransporter(OSE_TransporterConfiguration *conf) {
conf->localHostName, conf->localHostName,
conf->remoteNodeId, conf->remoteNodeId,
conf->remoteHostName, conf->remoteHostName,
conf->byteOrder,
conf->compression,
conf->checksum, conf->checksum,
conf->signalId); conf->signalId);
if (t == NULL) if (t == NULL)
...@@ -306,15 +309,17 @@ TransporterRegistry::createTransporter(SCI_TransporterConfiguration *config) { ...@@ -306,15 +309,17 @@ TransporterRegistry::createTransporter(SCI_TransporterConfiguration *config) {
if(theTransporters[config->remoteNodeId] != NULL) if(theTransporters[config->remoteNodeId] != NULL)
return false; return false;
SCI_Transporter * t = new SCI_Transporter(config->sendLimit, SCI_Transporter * t = new SCI_Transporter(*this,
config->localHostName,
config->remoteHostName,
config->port,
config->sendLimit,
config->bufferSize, config->bufferSize,
config->nLocalAdapters, config->nLocalAdapters,
config->remoteSciNodeId0, config->remoteSciNodeId0,
config->remoteSciNodeId1, config->remoteSciNodeId1,
localNodeId, localNodeId,
config->remoteNodeId, config->remoteNodeId,
config->byteOrder,
config->compression,
config->checksum, config->checksum,
config->signalId); config->signalId);
...@@ -357,7 +362,6 @@ TransporterRegistry::createTransporter(SHM_TransporterConfiguration *config) { ...@@ -357,7 +362,6 @@ TransporterRegistry::createTransporter(SHM_TransporterConfiguration *config) {
config->port, config->port,
localNodeId, localNodeId,
config->remoteNodeId, config->remoteNodeId,
config->compression,
config->checksum, config->checksum,
config->signalId, config->signalId,
config->shmKey, config->shmKey,
...@@ -853,10 +857,11 @@ TransporterRegistry::performReceive(){ ...@@ -853,10 +857,11 @@ TransporterRegistry::performReceive(){
const NodeId nodeId = t->getRemoteNodeId(); const NodeId nodeId = t->getRemoteNodeId();
if(is_connected(nodeId)){ if(is_connected(nodeId)){
if(t->isConnected() && t->checkConnected()){ if(t->isConnected() && t->checkConnected()){
Uint32 * readPtr, * eodPtr; Uint32 * readPtr;
t->getReceivePtr(&readPtr, &eodPtr); Uint32 sz = 0;
readPtr = unpack(readPtr, eodPtr, nodeId, ioStates[nodeId]); t->getReceivePtr(&readPtr, sz);
t->updateReceivePtr(readPtr); Uint32 szUsed = unpack(readPtr, sz, nodeId, ioStates[nodeId]);
t->updateReceivePtr(szUsed);
} }
} }
} }
...@@ -868,10 +873,11 @@ TransporterRegistry::performReceive(){ ...@@ -868,10 +873,11 @@ TransporterRegistry::performReceive(){
const NodeId nodeId = t->getRemoteNodeId(); const NodeId nodeId = t->getRemoteNodeId();
if(is_connected(nodeId)){ if(is_connected(nodeId)){
if(t->isConnected() && t->checkConnected()){ if(t->isConnected() && t->checkConnected()){
Uint32 * readPtr, * eodPtr; Uint32 * readPtr;
t->getReceivePtr(&readPtr, &eodPtr); Uint32 sz = 0;
readPtr = unpack(readPtr, eodPtr, nodeId, ioStates[nodeId]); t->getReceivePtr(&readPtr, sz);
t->updateReceivePtr(readPtr); Uint32 szUsed = unpack(readPtr, sz, nodeId, ioStates[nodeId]);
t->updateReceivePtr(szUsed);
} }
} }
} }
...@@ -1023,7 +1029,9 @@ TransporterRegistry::setIOState(NodeId nodeId, IOState state) { ...@@ -1023,7 +1029,9 @@ TransporterRegistry::setIOState(NodeId nodeId, IOState state) {
static void * static void *
run_start_clients_C(void * me) run_start_clients_C(void * me)
{ {
my_thread_init();
((TransporterRegistry*) me)->start_clients_thread(); ((TransporterRegistry*) me)->start_clients_thread();
my_thread_end();
NdbThread_Exit(0); NdbThread_Exit(0);
return me; return me;
} }
...@@ -1106,6 +1114,7 @@ TransporterRegistry::update_connections() ...@@ -1106,6 +1114,7 @@ TransporterRegistry::update_connections()
void void
TransporterRegistry::start_clients_thread() TransporterRegistry::start_clients_thread()
{ {
DBUG_ENTER("TransporterRegistry::start_clients_thread");
while (m_run_start_clients_thread) { while (m_run_start_clients_thread) {
NdbSleep_MilliSleep(100); NdbSleep_MilliSleep(100);
for (int i= 0, n= 0; n < nTransporters && m_run_start_clients_thread; i++){ for (int i= 0, n= 0; n < nTransporters && m_run_start_clients_thread; i++){
...@@ -1129,6 +1138,7 @@ TransporterRegistry::start_clients_thread() ...@@ -1129,6 +1138,7 @@ TransporterRegistry::start_clients_thread()
} }
} }
} }
DBUG_VOID_RETURN;
} }
bool bool
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <my_pthread.h>
#include <SocketServer.hpp> #include <SocketServer.hpp>
...@@ -176,9 +177,9 @@ extern "C" ...@@ -176,9 +177,9 @@ extern "C"
void* void*
socketServerThread_C(void* _ss){ socketServerThread_C(void* _ss){
SocketServer * ss = (SocketServer *)_ss; SocketServer * ss = (SocketServer *)_ss;
my_thread_init();
ss->doRun(); ss->doRun();
my_thread_end();
NdbThread_Exit(0); NdbThread_Exit(0);
return 0; return 0;
} }
...@@ -287,8 +288,10 @@ void* ...@@ -287,8 +288,10 @@ void*
sessionThread_C(void* _sc){ sessionThread_C(void* _sc){
SocketServer::Session * si = (SocketServer::Session *)_sc; SocketServer::Session * si = (SocketServer::Session *)_sc;
my_thread_init();
if(!transfer(si->m_socket)){ if(!transfer(si->m_socket)){
si->m_stopped = true; si->m_stopped = true;
my_thread_end();
NdbThread_Exit(0); NdbThread_Exit(0);
return 0; return 0;
} }
...@@ -301,6 +304,7 @@ sessionThread_C(void* _sc){ ...@@ -301,6 +304,7 @@ sessionThread_C(void* _sc){
} }
si->m_stopped = true; si->m_stopped = true;
my_thread_end();
NdbThread_Exit(0); NdbThread_Exit(0);
return 0; return 0;
} }
......
...@@ -7,7 +7,7 @@ LDADD_LOC = \ ...@@ -7,7 +7,7 @@ LDADD_LOC = \
$(top_builddir)/ndb/src/libndbclient.la \ $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \ $(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \ $(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a $(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am include $(top_srcdir)/ndb/config/type_util.mk.am
......
...@@ -55,7 +55,7 @@ LDADD += \ ...@@ -55,7 +55,7 @@ LDADD += \
$(top_builddir)/ndb/src/common/util/libgeneral.la \ $(top_builddir)/ndb/src/common/util/libgeneral.la \
$(top_builddir)/dbug/libdbug.a \ $(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \ $(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a $(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
...@@ -7,7 +7,7 @@ LDADD_LOC = \ ...@@ -7,7 +7,7 @@ LDADD_LOC = \
$(top_builddir)/ndb/src/libndbclient.la \ $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/dbug/libdbug.a \ $(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \ $(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a $(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
......
...@@ -129,11 +129,14 @@ ConfigInfo::m_SectionRules[] = { ...@@ -129,11 +129,14 @@ ConfigInfo::m_SectionRules[] = {
{ "TCP", fixHostname, "HostName1" }, { "TCP", fixHostname, "HostName1" },
{ "TCP", fixHostname, "HostName2" }, { "TCP", fixHostname, "HostName2" },
{ "SCI", fixHostname, "HostName1" },
{ "SCI", fixHostname, "HostName2" },
{ "OSE", fixHostname, "HostName1" }, { "OSE", fixHostname, "HostName1" },
{ "OSE", fixHostname, "HostName2" }, { "OSE", fixHostname, "HostName2" },
{ "TCP", fixPortNumber, 0 }, // has to come after fixHostName { "TCP", fixPortNumber, 0 }, // has to come after fixHostName
{ "SHM", fixPortNumber, 0 }, // has to come after fixHostName { "SHM", fixPortNumber, 0 }, // has to come after fixHostName
{ "SCI", fixPortNumber, 0 }, // has to come after fixHostName
//{ "SHM", fixShmKey, 0 }, //{ "SHM", fixShmKey, 0 },
/** /**
...@@ -163,6 +166,8 @@ ConfigInfo::m_SectionRules[] = { ...@@ -163,6 +166,8 @@ ConfigInfo::m_SectionRules[] = {
{ "TCP", checkTCPConstraints, "HostName1" }, { "TCP", checkTCPConstraints, "HostName1" },
{ "TCP", checkTCPConstraints, "HostName2" }, { "TCP", checkTCPConstraints, "HostName2" },
{ "SCI", checkTCPConstraints, "HostName1" },
{ "SCI", checkTCPConstraints, "HostName2" },
{ "*", checkMandatory, 0 }, { "*", checkMandatory, 0 },
...@@ -1808,7 +1813,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1808,7 +1813,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection", "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::STRING,
MANDATORY, MANDATORY,
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
...@@ -1820,28 +1825,74 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1820,28 +1825,74 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection", "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::STRING,
MANDATORY, MANDATORY,
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
{ {
CFG_SCI_ID_0, CFG_SCI_HOSTNAME_1,
"SciId0", "HostName1",
"SCI",
"Name/IP of computer on one side of the connection",
ConfigInfo::INTERNAL,
false,
ConfigInfo::STRING,
UNDEFINED,
0, 0 },
{
CFG_SCI_HOSTNAME_2,
"HostName2",
"SCI",
"Name/IP of computer on one side of the connection",
ConfigInfo::INTERNAL,
false,
ConfigInfo::STRING,
UNDEFINED,
0, 0 },
{
CFG_CONNECTION_SERVER_PORT,
"PortNumber",
"SCI", "SCI",
"Local SCI-node id for adapter 0 (a computer can have two adapters)", "Port used for this transporter",
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
MANDATORY, MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_SCI_HOST1_ID_0,
"Host1SciId0",
"SCI",
"SCI-node id for adapter 0 on Host1 (a computer can have two adapters)",
ConfigInfo::USED,
false,
ConfigInfo::INT,
MANDATORY,
"0",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_SCI_HOST1_ID_1,
"Host1SciId1",
"SCI",
"SCI-node id for adapter 1 on Host1 (a computer can have two adapters)",
ConfigInfo::USED,
false,
ConfigInfo::INT,
"0",
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
{ {
CFG_SCI_ID_1, CFG_SCI_HOST2_ID_0,
"SciId1", "Host2SciId0",
"SCI", "SCI",
"Local SCI-node id for adapter 1 (a computer can have two adapters)", "SCI-node id for adapter 0 on Host2 (a computer can have two adapters)",
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
...@@ -1849,6 +1900,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1849,6 +1900,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
{
CFG_SCI_HOST2_ID_1,
"Host2SciId1",
"SCI",
"SCI-node id for adapter 1 on Host2 (a computer can have two adapters)",
ConfigInfo::USED,
false,
ConfigInfo::INT,
"0",
"0",
STR_VALUE(MAX_INT_RNIL) },
{ {
CFG_CONNECTION_SEND_SIGNAL_ID, CFG_CONNECTION_SEND_SIGNAL_ID,
"SendSignalId", "SendSignalId",
...@@ -1882,8 +1945,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1882,8 +1945,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
"2K", "2K",
"512", "128",
STR_VALUE(MAX_INT_RNIL) }, "32K" },
{ {
CFG_SCI_BUFFER_MEM, CFG_SCI_BUFFER_MEM,
...@@ -1893,8 +1956,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1893,8 +1956,8 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED, ConfigInfo::USED,
false, false,
ConfigInfo::INT, ConfigInfo::INT,
"1M", "192K",
"256K", "64K",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_INT_RNIL) },
{ {
......
...@@ -29,7 +29,7 @@ LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la \ ...@@ -29,7 +29,7 @@ LDADD_LOC = $(top_builddir)/ndb/src/libndbclient.la \
$(top_builddir)/ndb/src/common/editline/libeditline.a \ $(top_builddir)/ndb/src/common/editline/libeditline.a \
$(top_builddir)/dbug/libdbug.a \ $(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \ $(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a $(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
@TERMCAP_LIB@ @TERMCAP_LIB@
DEFS_LOC = -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ DEFS_LOC = -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
......
...@@ -37,7 +37,7 @@ LDADD = @isam_libs@ \ ...@@ -37,7 +37,7 @@ LDADD = @isam_libs@ \
$(top_builddir)/mysys/libmysys.a \ $(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \ $(top_builddir)/dbug/libdbug.a \
$(top_builddir)/regex/libregex.a \ $(top_builddir)/regex/libregex.a \
$(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ @NDB_SCI_LIBS@
mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
@bdb_libs@ @innodb_libs@ @pstack_libs@ \ @bdb_libs@ @innodb_libs@ @pstack_libs@ \
......
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