From 22aa44a6511f0d2dca1137b042adcb8040c46ba7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 10 Jan 2005 11:33:26 +0100 Subject: changed Ndb::startTransaction() interface or partition key/hint --- ndb/include/ndbapi/Ndb.hpp | 11 ++++++----- ndb/src/ndbapi/Ndb.cpp | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp index a86c34c06f2..f70ad4d6544 100644 --- a/ndb/include/ndbapi/Ndb.hpp +++ b/ndb/include/ndbapi/Ndb.hpp @@ -1236,16 +1236,17 @@ public: * The transaction must be closed independent of its outcome, i.e. * even if there is an error. * - * @param prio Not implemented - * @param keyData Pointer to partition key to be used for deciding + * @param table Pointer to table object used for deciding * which node to run the Transaction Coordinator on + * @param keyData Pointer to partition key corresponding to + * table * @param keyLen Length of partition key expressed in bytes * * @return NdbTransaction object, or NULL on failure. */ - NdbTransaction* startTransaction(Uint32 prio = 0, - const char * keyData = 0, - Uint32 keyLen = 0); + NdbTransaction* startTransaction(const NdbDictionary::Table *table= 0, + const char *keyData = 0, + Uint32 keyLen = 0); /** * Close a transaction. diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index 5ffb087cde7..aa3f188e885 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -299,7 +299,8 @@ Return Value: Returns a pointer to a connection object. Remark: Start transaction. Synchronous. *****************************************************************************/ NdbTransaction* -Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) +Ndb::startTransaction(const NdbDictionary::Table *table, + const char * keyData, Uint32 keyLen) { DBUG_ENTER("Ndb::startTransaction"); @@ -319,7 +320,7 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) nodeId = 0; }//if { - NdbTransaction *trans= startTransactionLocal(aPriority, nodeId); + NdbTransaction *trans= startTransactionLocal(0, nodeId); DBUG_PRINT("exit",("start trans: 0x%x transid: 0x%llx", trans, trans ? trans->getTransactionId() : 0)); DBUG_RETURN(trans); -- cgit v1.2.1