Commit 9a103039 authored by unknown's avatar unknown

Added DBUG_PRINT's

Made Ndb::connected private 


ndb/include/ndbapi/Ndb.hpp:
  Made connected() private.
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Added DBUG_PRINT
ndb/src/ndbapi/TransporterFacade.cpp:
  Added DBUG_PRINT
parent a2d5fb21
...@@ -1087,8 +1087,6 @@ public: ...@@ -1087,8 +1087,6 @@ public:
int waitUntilReady(int timeout = 60); int waitUntilReady(int timeout = 60);
void connected(Uint32 block_reference);
/** @} *********************************************************************/ /** @} *********************************************************************/
/** /**
...@@ -1447,6 +1445,9 @@ private: ...@@ -1447,6 +1445,9 @@ private:
void setup(Ndb_cluster_connection *ndb_cluster_connection, void setup(Ndb_cluster_connection *ndb_cluster_connection,
const char* aCatalogName, const char* aSchemaName); const char* aCatalogName, const char* aSchemaName);
void connected(Uint32 block_reference);
NdbConnection* startTransactionLocal(Uint32 aPrio, Uint32 aFragmentId); NdbConnection* startTransactionLocal(Uint32 aPrio, Uint32 aFragmentId);
// Connect the connection object to the Database. // Connect the connection object to the Database.
......
...@@ -815,6 +815,8 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal, ...@@ -815,6 +815,8 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal,
const int noerrcodes, const int noerrcodes,
const int temporaryMask) const int temporaryMask)
{ {
DBUG_ENTER("NdbDictInterface::dictSignal");
DBUG_PRINT("enter", ("useMasterNodeId: %d", useMasterNodeId));
for(Uint32 i = 0; i<RETRIES; i++){ for(Uint32 i = 0; i<RETRIES; i++){
//if (useMasterNodeId == 0) //if (useMasterNodeId == 0)
m_buffer.clear(); m_buffer.clear();
...@@ -834,7 +836,7 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal, ...@@ -834,7 +836,7 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal,
if(aNodeId == 0){ if(aNodeId == 0){
m_error.code = 4009; m_error.code = 4009;
m_transporter->unlock_mutex(); m_transporter->unlock_mutex();
return -1; DBUG_RETURN(-1);
} }
{ {
int r; int r;
...@@ -870,7 +872,7 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal, ...@@ -870,7 +872,7 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal,
if(m_waiter.m_state == NO_WAIT && m_error.code == 0){ if(m_waiter.m_state == NO_WAIT && m_error.code == 0){
// Normal return // Normal return
return 0; DBUG_RETURN(0);
} }
/** /**
...@@ -893,9 +895,9 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal, ...@@ -893,9 +895,9 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal,
continue; continue;
} }
return -1; DBUG_RETURN(-1);
} }
return -1; DBUG_RETURN(-1);
} }
/***************************************************************** /*****************************************************************
......
...@@ -944,6 +944,8 @@ TransporterFacade::isConnected(NodeId aNodeId){ ...@@ -944,6 +944,8 @@ TransporterFacade::isConnected(NodeId aNodeId){
NodeId NodeId
TransporterFacade::get_an_alive_node() TransporterFacade::get_an_alive_node()
{ {
DBUG_ENTER("TransporterFacade::get_an_alive_node");
DBUG_PRINT("enter", ("theStartNodeId: %d", theStartNodeId));
#ifdef VM_TRACE #ifdef VM_TRACE
const char* p = NdbEnv_GetEnv("NDB_ALIVE_NODE_ID", (char*)0, 0); const char* p = NdbEnv_GetEnv("NDB_ALIVE_NODE_ID", (char*)0, 0);
if (p != 0 && *p != 0) if (p != 0 && *p != 0)
...@@ -952,17 +954,19 @@ TransporterFacade::get_an_alive_node() ...@@ -952,17 +954,19 @@ TransporterFacade::get_an_alive_node()
NodeId i; NodeId i;
for (i = theStartNodeId; i < MAX_NDB_NODES; i++) { for (i = theStartNodeId; i < MAX_NDB_NODES; i++) {
if (get_node_alive(i)){ if (get_node_alive(i)){
DBUG_PRINT("info", ("Node %d is alive", i));
theStartNodeId = ((i + 1) % MAX_NDB_NODES); theStartNodeId = ((i + 1) % MAX_NDB_NODES);
return i; DBUG_RETURN(i);
} }
} }
for (i = 1; i < theStartNodeId; i++) { for (i = 1; i < theStartNodeId; i++) {
if (get_node_alive(i)){ if (get_node_alive(i)){
DBUG_PRINT("info", ("Node %d is alive", i));
theStartNodeId = ((i + 1) % MAX_NDB_NODES); theStartNodeId = ((i + 1) % MAX_NDB_NODES);
return i; DBUG_RETURN(i);
} }
} }
return (NodeId)0; DBUG_RETURN((NodeId)0);
} }
TransporterFacade::ThreadData::ThreadData(Uint32 size){ TransporterFacade::ThreadData::ThreadData(Uint32 size){
......
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