diff options
author | unknown <tomas@poseidon.(none)> | 2004-09-01 14:56:53 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.(none)> | 2004-09-01 14:56:53 +0000 |
commit | 5c8e36fa5291805c349d99b50baa3d12c67bf816 (patch) | |
tree | a898799030e3f3a5580dbc4561c3771f53d258ae /ndb/src/ndbapi/Ndb.cpp | |
parent | 94178b008347d5e60bc8d76f2ef9eaebbf0b9775 (diff) | |
download | mariadb-git-5c8e36fa5291805c349d99b50baa3d12c67bf816.tar.gz |
added class Ndb_cluster_connection to prepare for making order of starting mysqld and ndbd irrelevant
ndb/src/mgmsrv/Makefile.am:
changed so that datadir is "." by default so that behaviour is the same as before
Diffstat (limited to 'ndb/src/ndbapi/Ndb.cpp')
-rw-r--r-- | ndb/src/ndbapi/Ndb.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index 0c91fcb178b..2c952425b1e 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -207,9 +207,11 @@ Remark: Disconnect all connections to the database. void Ndb::doDisconnect() { + DBUG_ENTER("Ndb::doDisconnect"); NdbConnection* tNdbCon; CHECK_STATUS_MACRO_VOID; + DBUG_PRINT("info", ("theNoOfDBnodes=%d", theNoOfDBnodes)); Uint32 tNoOfDbNodes = theNoOfDBnodes; UintR i; for (i = 0; i < tNoOfDbNodes; i++) { @@ -227,6 +229,7 @@ Ndb::doDisconnect() tNdbCon = tNdbCon->theNext; releaseConnectToNdb(tmpNdbCon); }//while + DBUG_VOID_RETURN; }//Ndb::disconnect() /***************************************************************************** @@ -239,6 +242,7 @@ Remark: Waits until a node has status != 0 int Ndb::waitUntilReady(int timeout) { + DBUG_ENTER("Ndb::waitUntilReady"); int secondsCounter = 0; int milliCounter = 0; int noChecksSinceFirstAliveFound = 0; @@ -246,7 +250,7 @@ Ndb::waitUntilReady(int timeout) if (theInitState != Initialised) { // Ndb::init is not called theError.code = 4256; - return -1; + DBUG_RETURN(-1); } do { @@ -265,13 +269,13 @@ Ndb::waitUntilReady(int timeout) tp->unlock_mutex(); if (foundAliveNode == theNoOfDBnodes) { - return 0; + DBUG_RETURN(0); }//if if (foundAliveNode > 0) { noChecksSinceFirstAliveFound++; }//if if (noChecksSinceFirstAliveFound > 30) { - return 0; + DBUG_RETURN(0); }//if NdbSleep_MilliSleep(100); milliCounter += 100; @@ -281,9 +285,9 @@ Ndb::waitUntilReady(int timeout) }//if } while ( secondsCounter < timeout ); if (noChecksSinceFirstAliveFound > 0) { - return 0; + DBUG_RETURN(0); }//if - return -1; + DBUG_RETURN(-1); } /***************************************************************************** @@ -1060,6 +1064,9 @@ Ndb::StartTransactionNodeSelectionData::init(Uint32 noOfNodes, * This algorithm should be implemented in Dbdih */ { + if (fragment2PrimaryNodeMap != 0) + abort(); + fragment2PrimaryNodeMap = new Uint32[noOfFragments]; Uint32 i; for(i = 0; i<noOfNodes; i++){ |