summaryrefslogtreecommitdiff
path: root/ndb/src/ndbapi/Ndbif.cpp
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.(none)>2004-09-06 18:30:57 +0000
committerunknown <tomas@poseidon.(none)>2004-09-06 18:30:57 +0000
commitd90b95ed31f029bb5c34ed2e1e701119919af1aa (patch)
treecd29d623bdf3acd31da3d6659f9f3ec2f5ca3d43 /ndb/src/ndbapi/Ndbif.cpp
parent5cccb45385438462bb1212eec90b43cf37537306 (diff)
downloadmariadb-git-d90b95ed31f029bb5c34ed2e1e701119919af1aa.tar.gz
fixed so that ndbcluster and mysqld can be started independently
fixed some error codes in Ndb so that 4009-cluster failure is returned when cluster is not up
Diffstat (limited to 'ndb/src/ndbapi/Ndbif.cpp')
-rw-r--r--ndb/src/ndbapi/Ndbif.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/ndb/src/ndbapi/Ndbif.cpp b/ndb/src/ndbapi/Ndbif.cpp
index 4560ed09b6a..f2245e11ef1 100644
--- a/ndb/src/ndbapi/Ndbif.cpp
+++ b/ndb/src/ndbapi/Ndbif.cpp
@@ -185,10 +185,10 @@ Ndb::executeMessage(void* NdbObject,
void Ndb::connected(Uint32 ref)
{
theMyRef= ref;
- theNode= refToNode(ref);
+ Uint32 tmpTheNode= refToNode(ref);
Uint64 tBlockNo= refToBlock(ref);
if (theNdbBlockNumber >= 0){
- assert(theMyRef == numberToRef(theNdbBlockNumber, theNode));
+ assert(theMyRef == numberToRef(theNdbBlockNumber, tmpTheNode));
}
TransporterFacade * theFacade = TransporterFacade::instance();
@@ -201,18 +201,19 @@ void Ndb::connected(Uint32 ref)
}
}
theFirstTransId = ((Uint64)tBlockNo << 52)+
- ((Uint64)theNode << 40);
+ ((Uint64)tmpTheNode << 40);
theFirstTransId += theFacade->m_max_trans_id;
// assert(0);
DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id=%lx",
theMyRef,
- theNode,
+ tmpTheNode,
theNoOfDBnodes,
theFirstTransId));
startTransactionNodeSelectionData.init(theNoOfDBnodes, theDBnodes);
theCommitAckSignal = new NdbApiSignal(theMyRef);
theDictionary->m_receiver.m_reference= theMyRef;
+ theNode= tmpTheNode; // flag that Ndb object is initialized
}
void