diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-10-04 13:26:33 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-10-04 13:26:33 +0000 |
commit | 1c0213eb3ef0ef143d3af500fc04a84de910078e (patch) | |
tree | 6857f24306bea15e5fe5b1b4436abafc0dc34a1b /ndb/src/ndbapi/Ndb.cpp | |
parent | 8f9e1eb5048a0f426b2aa90e0ca596a1fe0c805b (diff) | |
download | mariadb-git-1c0213eb3ef0ef143d3af500fc04a84de910078e.tar.gz |
added debug printouts in ndbapi
Diffstat (limited to 'ndb/src/ndbapi/Ndb.cpp')
-rw-r--r-- | ndb/src/ndbapi/Ndb.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index cb126a221a8..dab57948822 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -329,7 +329,8 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) }//if { NdbConnection *trans= startTransactionLocal(aPriority, nodeId); - DBUG_PRINT("exit",("start trans= 0x%x", trans)); + DBUG_PRINT("exit",("start trans: 0x%x transid: 0x%llx", + trans, trans->getTransactionId())); DBUG_RETURN(trans); } } else { @@ -350,6 +351,8 @@ Ndb::hupp(NdbConnection* pBuddyTrans) { DBUG_ENTER("Ndb::hupp"); + DBUG_PRINT("enter", ("trans: 0x%x",pBuddyTrans)); + Uint32 aPriority = 0; if (pBuddyTrans == NULL){ DBUG_RETURN(startTransaction()); @@ -372,6 +375,8 @@ Ndb::hupp(NdbConnection* pBuddyTrans) } pCon->setTransactionId(pBuddyTrans->getTransactionId()); pCon->setBuddyConPtr((Uint32)pBuddyTrans->getTC_ConnectPtr()); + DBUG_PRINT("exit", ("hupp trans: 0x%x transid: 0x%llx", + pCon, pCon ? pCon->getTransactionId() : 0)); DBUG_RETURN(pCon); } else { DBUG_RETURN(NULL); @@ -408,7 +413,10 @@ Ndb::startTransactionDGroup(Uint32 aPriority, const char * keyData, int type) fragmentId = getFragmentId(hashValue); }//if Uint32 nodeId = guessPrimaryNode(fragmentId); - return startTransactionLocal(aPriority, nodeId); + NdbConnection* trans= startTransactionLocal(aPriority, nodeId); + DBUG_PRINT("exit", ("start DGroup trans: 0x%x transid: 0x%llx", + trans, trans ? trans->getTransactionId() : 0)); + return trans; } else { return NULL; }//if @@ -455,7 +463,6 @@ Ndb::startTransactionLocal(Uint32 aPriority, Uint32 nodeId) abort(); } #endif - DBUG_PRINT("exit", ("transid= %lld", tConnection->getTransactionId())); DBUG_RETURN(tConnection); }//Ndb::startTransactionLocal() @@ -469,9 +476,6 @@ void Ndb::closeTransaction(NdbConnection* aConnection) { DBUG_ENTER("Ndb::closeTransaction"); - DBUG_PRINT("enter",("close trans= 0x%x, transid= %lld", - aConnection, aConnection->getTransactionId())); - NdbConnection* tCon; NdbConnection* tPreviousCon; @@ -489,6 +493,12 @@ Ndb::closeTransaction(NdbConnection* aConnection) tCon = theTransactionList; + DBUG_PRINT("info",("close trans: 0x%x transid: 0x%llx", + aConnection, aConnection->getTransactionId())); + DBUG_PRINT("info",("magic number: 0x%x TCConPtr: 0x%x theMyRef: 0x%x 0x%x", + aConnection->theMagicNumber, aConnection->theTCConPtr, + aConnection->theMyRef, getReference())); + if (aConnection == tCon) { // Remove the active connection object theTransactionList = tCon->next(); // from the transaction list. } else { |