diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-02-16 20:37:14 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-02-16 20:37:14 +0100 |
commit | 4d9e12438250c1a9d9b624746dca468d69b4a2b7 (patch) | |
tree | 291ceb6cc5278770ce7f6cdba00d8785a99ed7c0 /ndb/src/ndbapi | |
parent | 7663198d08a67fec733475b22f7e77d08806fb07 (diff) | |
download | mariadb-git-4d9e12438250c1a9d9b624746dca468d69b4a2b7.tar.gz |
removed NdbMgmHandle from TransporterRegistry constructor
changed to set NdbMgmHandle from IPPConfig, and use info from configuration, instead of mgm handle from config retrieval
ndb/src/ndbapi/Ndb.cpp:
added som debug printout
ndb/src/ndbapi/NdbTransaction.cpp:
added some debug printout
Diffstat (limited to 'ndb/src/ndbapi')
-rw-r--r-- | ndb/src/ndbapi/Ndb.cpp | 4 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbTransaction.cpp | 8 | ||||
-rw-r--r-- | ndb/src/ndbapi/TransporterFacade.cpp | 5 | ||||
-rw-r--r-- | ndb/src/ndbapi/TransporterFacade.hpp | 3 | ||||
-rw-r--r-- | ndb/src/ndbapi/ndb_cluster_connection.cpp | 2 |
5 files changed, 13 insertions, 9 deletions
diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index 59d1e45ca46..b047ae1bd1a 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -84,7 +84,9 @@ NdbTransaction* Ndb::doConnect(Uint32 tConNode) } else if (TretCode != 0) { tAnyAlive= 1; }//if - DBUG_PRINT("info",("tried node %d TretCode %d", tNode, TretCode)); + DBUG_PRINT("info",("tried node %d, TretCode %d, error code %d, %s", + tNode, TretCode, getNdbError().code, + getNdbError().message)); } } else // just do a regular round robin diff --git a/ndb/src/ndbapi/NdbTransaction.cpp b/ndb/src/ndbapi/NdbTransaction.cpp index ab6c0ca3e38..67581e4a0f8 100644 --- a/ndb/src/ndbapi/NdbTransaction.cpp +++ b/ndb/src/ndbapi/NdbTransaction.cpp @@ -1420,14 +1420,18 @@ Remark: Sets TC Connect pointer. int NdbTransaction::receiveTCSEIZEREF(NdbApiSignal* aSignal) { + DBUG_ENTER("NdbTransaction::receiveTCSEIZEREF"); if (theStatus != Connecting) { - return -1; + DBUG_RETURN(-1); } else { theStatus = ConnectFailure; theNdb->theError.code = aSignal->readData(2); - return 0; + DBUG_PRINT("info",("error code %d, %s", + theNdb->getNdbError().code, + theNdb->getNdbError().message)); + DBUG_RETURN(0); } }//NdbTransaction::receiveTCSEIZEREF() diff --git a/ndb/src/ndbapi/TransporterFacade.cpp b/ndb/src/ndbapi/TransporterFacade.cpp index 5b5394f0965..7f1e68a42d3 100644 --- a/ndb/src/ndbapi/TransporterFacade.cpp +++ b/ndb/src/ndbapi/TransporterFacade.cpp @@ -466,8 +466,7 @@ void TransporterFacade::threadMainReceive(void) theTransporterRegistry->stopReceiving(); } -TransporterFacade::TransporterFacade(NdbMgmHandle mgm_handle) : - m_mgm_handle(mgm_handle), +TransporterFacade::TransporterFacade() : theTransporterRegistry(0), theStopReceive(0), theSendThread(NULL), @@ -496,7 +495,7 @@ bool TransporterFacade::init(Uint32 nodeId, const ndb_mgm_configuration* props) { theOwnId = nodeId; - theTransporterRegistry = new TransporterRegistry(m_mgm_handle,this); + theTransporterRegistry = new TransporterRegistry(this); const int res = IPCConfig::configureTransporters(nodeId, * props, diff --git a/ndb/src/ndbapi/TransporterFacade.hpp b/ndb/src/ndbapi/TransporterFacade.hpp index bd3fc67a8d6..e74f4b51e00 100644 --- a/ndb/src/ndbapi/TransporterFacade.hpp +++ b/ndb/src/ndbapi/TransporterFacade.hpp @@ -47,7 +47,7 @@ extern "C" { class TransporterFacade { public: - TransporterFacade(NdbMgmHandle mgm_handle); + TransporterFacade(); virtual ~TransporterFacade(); bool init(Uint32, const ndb_mgm_configuration *); @@ -133,7 +133,6 @@ private: bool isConnected(NodeId aNodeId); void doStop(); - NdbMgmHandle m_mgm_handle; TransporterRegistry* theTransporterRegistry; SocketServer m_socket_server; int sendPerformedLastInterval; diff --git a/ndb/src/ndbapi/ndb_cluster_connection.cpp b/ndb/src/ndbapi/ndb_cluster_connection.cpp index 4a33be7c597..e6f5d464d80 100644 --- a/ndb/src/ndbapi/ndb_cluster_connection.cpp +++ b/ndb/src/ndbapi/ndb_cluster_connection.cpp @@ -284,7 +284,7 @@ Ndb_cluster_connection_impl::Ndb_cluster_connection_impl(const char * m_transporter_facade= TransporterFacade::theFacadeInstance= - new TransporterFacade(m_config_retriever->get_mgmHandle()); + new TransporterFacade(); DBUG_VOID_RETURN; } |