Commit 22aa44a6 authored by unknown's avatar unknown

changed Ndb::startTransaction() interface or partition key/hint

parent 99f07f83
...@@ -1236,15 +1236,16 @@ public: ...@@ -1236,15 +1236,16 @@ public:
* The transaction must be closed independent of its outcome, i.e. * The transaction must be closed independent of its outcome, i.e.
* even if there is an error. * even if there is an error.
* *
* @param prio Not implemented * @param table Pointer to table object used for deciding
* @param keyData Pointer to partition key to be used for deciding
* which node to run the Transaction Coordinator on * which node to run the Transaction Coordinator on
* @param keyData Pointer to partition key corresponding to
* <var>table</var>
* @param keyLen Length of partition key expressed in bytes * @param keyLen Length of partition key expressed in bytes
* *
* @return NdbTransaction object, or NULL on failure. * @return NdbTransaction object, or NULL on failure.
*/ */
NdbTransaction* startTransaction(Uint32 prio = 0, NdbTransaction* startTransaction(const NdbDictionary::Table *table= 0,
const char * keyData = 0, const char *keyData = 0,
Uint32 keyLen = 0); Uint32 keyLen = 0);
/** /**
......
...@@ -299,7 +299,8 @@ Return Value: Returns a pointer to a connection object. ...@@ -299,7 +299,8 @@ Return Value: Returns a pointer to a connection object.
Remark: Start transaction. Synchronous. Remark: Start transaction. Synchronous.
*****************************************************************************/ *****************************************************************************/
NdbTransaction* 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"); DBUG_ENTER("Ndb::startTransaction");
...@@ -319,7 +320,7 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen) ...@@ -319,7 +320,7 @@ Ndb::startTransaction(Uint32 aPriority, const char * keyData, Uint32 keyLen)
nodeId = 0; nodeId = 0;
}//if }//if
{ {
NdbTransaction *trans= startTransactionLocal(aPriority, nodeId); NdbTransaction *trans= startTransactionLocal(0, nodeId);
DBUG_PRINT("exit",("start trans: 0x%x transid: 0x%llx", DBUG_PRINT("exit",("start trans: 0x%x transid: 0x%llx",
trans, trans ? trans->getTransactionId() : 0)); trans, trans ? trans->getTransactionId() : 0));
DBUG_RETURN(trans); DBUG_RETURN(trans);
......
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