Added DBUG_PRINT's

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