MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Martin Skold Date:August 7 2006 12:43pm
Subject:bk commit into 5.0 tree (mskold:1.2199)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of marty. When marty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-07 14:43:29+02:00, mskold@stripped +3 -0
  Merge mysql.com:/home/marty/MySQL/mysql-4.1
  into  mysql.com:/home/marty/MySQL/mysql-5.0
  MERGE: 1.1616.2632.1

  ndb/include/ndbapi/NdbTransaction.hpp@stripped, 2006-08-07 14:42:01+02:00, mskold@stripped +0 -2
    Merge (using local)
    MERGE: 1.19.8.2

  ndb/include/ndbapi/NdbTransaction.hpp@stripped, 2006-08-07 14:41:27+02:00, mskold@stripped +0 -0
    Merge rename: ndb/include/ndbapi/NdbConnection.hpp -> ndb/include/ndbapi/NdbTransaction.hpp

  sql/ha_ndbcluster.cc@stripped, 2006-08-07 14:42:51+02:00, mskold@stripped +0 -8
    Merge (using local)
    MERGE: 1.114.20.1

  sql/ha_ndbcluster.h@stripped, 2006-08-07 14:43:18+02:00, mskold@stripped +0 -2
    Merge (using local)
    MERGE: 1.40.6.16

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	mskold
# Host:	linux.site
# Root:	/home/marty/MySQL/mysql-5.0/RESYNC

--- 1.19.8.1/ndb/include/ndbapi/NdbConnection.hpp	2006-08-07 14:43:38 +02:00
+++ 1.44/ndb/include/ndbapi/NdbTransaction.hpp	2006-08-07 14:43:38 +02:00
@@ -14,15 +14,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-#ifndef NdbConnection_H
-#define NdbConnection_H
+#ifndef NdbTransaction_H
+#define NdbTransaction_H
 
 #include <ndb_types.h>
 #include "NdbError.hpp"
 #include "NdbDictionary.hpp"
 #include "Ndb.hpp"
 
-class NdbConnection;
+class NdbTransaction;
 class NdbOperation;
 class NdbScanOperation;
 class NdbIndexScanOperation;
@@ -31,106 +31,81 @@ class NdbApiSignal;
 class Ndb;
 class NdbBlob;
 
-
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+// to be documented later
 /**
  * NdbAsynchCallback functions are used when executing asynchronous 
- * transactions (using NdbConnection::executeAsynchPrepare, or 
- * NdbConnection::executeAsynch).  
+ * transactions (using NdbTransaction::executeAsynchPrepare, or 
+ * NdbTransaction::executeAsynch).
  * The functions are called when the execute has finished.
  * See @ref secAsync for more information.
  */
-typedef void (* NdbAsynchCallback)(int, NdbConnection*, void*);
+typedef void (* NdbAsynchCallback)(int, NdbTransaction*, void*);
+#endif
 
-/**
- * Commit type of transaction
- */
-enum AbortOption {      
 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
-  CommitIfFailFree = 0,         
-  CommitAsMuchAsPossible = 2,   ///< Commit transaction with as many 
-  TryCommit = 0,                ///< <i>Missing explanation</i>
-#endif
-  AbortOnError = 0,             ///< Abort transaction on failed operation
-  AO_IgnoreError = 2               ///< Transaction continues on failed operation
+enum AbortOption {
+  CommitIfFailFree= 0,         
+  TryCommit= 0,
+  AbortOnError= 0,
+  CommitAsMuchAsPossible= 2,
+  AO_IgnoreError= 2
 };
-  
-typedef AbortOption CommitType;
-
-
-/**
- * Execution type of transaction
- */
 enum ExecType { 
-  NoExecTypeDef = -1,           ///< Erroneous type (Used for debugging only)
-  Prepare,                      ///< <i>Missing explanation</i>
-  NoCommit,                     ///< Execute the transaction as far as it has
-                                ///< been defined, but do not yet commit it
-  Commit,                       ///< Execute and try to commit the transaction
-  Rollback                      ///< Rollback transaction
+  NoExecTypeDef = -1,
+  Prepare,
+  NoCommit,
+  Commit,
+  Rollback
 };
-
+#endif
 
 /**
- * @class NdbConnection
+ * @class NdbTransaction
  * @brief Represents a transaction.
  *
- * A transaction (represented by an NdbConnection object) 
- * belongs to an Ndb object and is typically created using 
- * Ndb::startTransaction.
+ * A transaction (represented by an NdbTransaction object) 
+ * belongs to an Ndb object and is created using 
+ * Ndb::startTransaction().
  * A transaction consists of a list of operations 
- * (represented by NdbOperation objects). 
+ * (represented by NdbOperation, NdbScanOperation, NdbIndexOperation,
+ *  and NdbIndexScanOperation objects). 
  * Each operation access exactly one table.
  *
- * After getting the NdbConnection object, 
- * the first step is to get (allocate) an operation given the table name. 
+ * After getting the NdbTransaction object, 
+ * the first step is to get (allocate) an operation given the table name using
+ * one of the methods getNdbOperation(), getNdbScanOperation(),
+ * getNdbIndexOperation(), or getNdbIndexScanOperation().
  * Then the operation is defined. 
- * Several operations can be defined in parallel on the same 
- * NdbConnection object. 
- * When all operations are defined, the NdbConnection::execute
- * method sends them to the NDB kernel for execution. 
+ * Several operations can be defined on the same 
+ * NdbTransaction object, they will in that case be executed in parallell.
+ * When all operations are defined, the execute()
+ * method sends them to the NDB kernel for execution.
  *
- * The NdbConnection::execute method returns when the NDB kernel has 
+ * The execute() method returns when the NDB kernel has 
  * completed execution of all operations defined before the call to 
- * NdbConnection::execute. 
- * All allocated operations should be properly defined 
- * before calling NdbConnection::execute.
+ * execute(). All allocated operations should be properly defined 
+ * before calling execute().
  *
- * A call to NdbConnection::execute uses one out of three types of execution:
- *  -# ExecType::NoCommit  Executes operations without committing them.
- *  -# ExecType::Commit	   Executes remaining operation and commits the 
+ * A call to execute() uses one out of three types of execution:
+ *  -# NdbTransaction::NoCommit  Executes operations without committing them.
+ *  -# NdbTransaction::Commit    Executes remaining operation and commits the 
  *        	           complete transaction
- *  -# ExecType::Rollback  Rollbacks the entire transaction.
+ *  -# NdbTransaction::Rollback  Rollbacks the entire transaction.
  *
- * NdbConnection::execute is equipped with an extra error handling parameter 
+ * execute() is equipped with an extra error handling parameter. 
  * There are two alternatives:
- * -# AbortOption::AbortOnError (default).
+ * -# NdbTransaction::AbortOnError (default).
  *    The transaction is aborted if there are any error during the
  *    execution
- * -# AbortOption::IgnoreError
+ * -# NdbTransaction::AO_IgnoreError
  *    Continue execution of transaction even if operation fails
  *
- * NdbConnection::execute can sometimes indicate an error 
- * (return with -1) while the error code on the NdbConnection is 0. 
- * This is an indication that one of the operations found a record 
- * problem. The transaction is still ok and can continue as usual.
- * The NdbConnection::execute returns -1 together with error code 
- * on NdbConnection object equal to 0 always means that an 
- * operation was not successful but that the total transaction was OK. 
- * By checking error codes on the individual operations it is possible 
- * to find out which operation was not successful. 
- *
- * NdbConnection::executeScan is used to setup a scan in the NDB kernel
- * after it has been defined.
- * NdbConnection::nextScanResult is used to iterate through the 
- * scanned tuples. 
- * After each call to NdbConnection::nextScanResult, the pointers
- * of NdbRecAttr objects defined in the NdbOperation::getValue 
- * operations are updated with the values of the new the scanned tuple. 
  */
 
 /* FUTURE IMPLEMENTATION:
  * Later a prepare mode will be added when Ndb supports Prepare-To-Commit
- * The NdbConnection can deliver the Transaction Id of the transaction.
+ * The NdbTransaction can deliver the Transaction Id of the transaction.
  * After committing a transaction it is also possible to retrieve the 
  * global transaction checkpoint which the transaction was put in.
  *
@@ -149,25 +124,66 @@ enum ExecType { 
  *    not known the table of the tuple.  As long as the table is
  *    derived from the known base class everything is ok.
  *    It is not possible to provide any primary key since it is 
- *    already supplied with the call to NdbConnection::getNdbOperation. 
+ *    already supplied with the call to NdbTransaction::getNdbOperation. 
  * -# The third method is used when a scanned tuple is to be transferred to 
  *    another transaction. In this case it is not possible to define the 
  *    primary key since it came along from the scanned tuple.
  *
  */
-class NdbConnection
+
+class NdbTransaction
 {
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
   friend class Ndb;
   friend class NdbOperation;
   friend class NdbScanOperation;
   friend class NdbIndexOperation;
   friend class NdbIndexScanOperation;
   friend class NdbBlob;
-  friend class ha_ndbcluster;
+#endif
 
 public:
 
   /**
+   * Commit type of transaction
+   */
+  enum AbortOption {
+    AbortOnError=               ///< Abort transaction on failed operation
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+    ::AbortOnError
+#endif
+    ,AO_IgnoreError=            ///< Transaction continues on failed operation
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+    ::AO_IgnoreError
+#endif
+  };
+
+  /**
+   * Execution type of transaction
+   */
+  enum ExecType {
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+    NoExecTypeDef=
+    ::NoExecTypeDef,            ///< Erroneous type (Used for debugging only)
+    Prepare= ::Prepare,         ///< <i>Missing explanation</i>
+#endif
+    NoCommit=                   ///< Execute the transaction as far as it has
+                                ///< been defined, but do not yet commit it
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+    ::NoCommit
+#endif
+    ,Commit=                    ///< Execute and try to commit the transaction
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+    ::Commit
+#endif
+    ,Rollback                   ///< Rollback transaction
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+    = ::Rollback
+#endif
+  };
+
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
+  /**
    * Get an NdbOperation for a table.
    * Note that the operation has to be defined before it is executed.
    *
@@ -178,41 +194,100 @@ public:
    * @return  Pointer to an NdbOperation object if successful, otherwise NULL.
    */
   NdbOperation* getNdbOperation(const char* aTableName);
+#endif
 
   /**
+   * Get an NdbOperation for a table.
+   * Note that the operation has to be defined before it is executed.
+   *
+   * @note All operations within the same transaction need to 
+   *       be initialized with this method.
+   * 
+   * @param  aTable  
+   *         A table object (fetched by NdbDictionary::Dictionary::getTable)
+   * @return  Pointer to an NdbOperation object if successful, otherwise NULL.
+   */
+  NdbOperation* getNdbOperation(const NdbDictionary::Table * aTable);
+
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
+  /**
    * Get an operation from NdbScanOperation idlelist and 
-   * get the NdbConnection object which
+   * get the NdbTransaction object which
    * was fetched by startTransaction pointing to this operation.
    *
-   * @param  aTableName a table name.
+   * @param  aTableName  The table name.
    * @return pointer to an NdbOperation object if successful, otherwise NULL
    */
   NdbScanOperation* getNdbScanOperation(const char* aTableName);
+#endif
 
   /**
    * Get an operation from NdbScanOperation idlelist and 
-   * get the NdbConnection object which
+   * get the NdbTransaction object which
+   * was fetched by startTransaction pointing to this operation.
+   *
+   * @param  aTable  
+   *         A table object (fetched by NdbDictionary::Dictionary::getTable)
+   * @return pointer to an NdbOperation object if successful, otherwise NULL
+   */
+  NdbScanOperation* getNdbScanOperation(const NdbDictionary::Table * aTable);
+
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
+  /**
+   * Get an operation from NdbIndexScanOperation idlelist and 
+   * get the NdbTransaction object which
    * was fetched by startTransaction pointing to this operation.
    *
    * @param  anIndexName  The index name.
-   * @param  aTableName a table name.
+   * @param  aTableName  The table name.
    * @return pointer to an NdbOperation object if successful, otherwise NULL
    */
   NdbIndexScanOperation* getNdbIndexScanOperation(const char* anIndexName,
 						  const char* aTableName);
+  NdbIndexScanOperation* getNdbIndexScanOperation
+  (const NdbDictionary::Index *anIndex, const NdbDictionary::Table *aTable);
+#endif
   
   /**
+   * Get an operation from NdbIndexScanOperation idlelist and 
+   * get the NdbTransaction object which
+   * was fetched by startTransaction pointing to this operation.
+   *
+   * @param  anIndex  
+             An index object (fetched by NdbDictionary::Dictionary::getIndex).
+   * @return pointer to an NdbOperation object if successful, otherwise NULL
+   */
+  NdbIndexScanOperation* getNdbIndexScanOperation
+  (const NdbDictionary::Index *anIndex);
+  
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
+  /**
    * Get an operation from NdbIndexOperation idlelist and 
-   * get the NdbConnection object that
+   * get the NdbTransaction object that
    * was fetched by startTransaction pointing to this operation.
    *
-   * @param   indexName   An index name (as created by createIndex).
-   * @param   tableName    A table name.
+   * @param   anIndexName   The index name (as created by createIndex).
+   * @param   aTableName    The table name.
    * @return                Pointer to an NdbIndexOperation object if 
    *                        successful, otherwise NULL
    */
-  NdbIndexOperation* getNdbIndexOperation(const char*  indexName,
-                                          const char*  tableName);
+  NdbIndexOperation* getNdbIndexOperation(const char*  anIndexName,
+                                          const char*  aTableName);
+  NdbIndexOperation* getNdbIndexOperation(const NdbDictionary::Index *anIndex,
+					  const NdbDictionary::Table *aTable);
+#endif
+
+  /**
+   * Get an operation from NdbIndexOperation idlelist and 
+   * get the NdbTransaction object that
+   * was fetched by startTransaction pointing to this operation.
+   *
+   * @param   anIndex
+   *          An index object (fetched by NdbDictionary::Dictionary::getIndex).
+   * @return              Pointer to an NdbIndexOperation object if 
+   *                      successful, otherwise NULL
+   */
+  NdbIndexOperation* getNdbIndexOperation(const NdbDictionary::Index *anIndex);
 
   /** 
    * @name Execute Transaction
@@ -240,10 +315,18 @@ public:
    *                          the send.
    * @return 0 if successful otherwise -1.
    */
-  int execute(ExecType execType, 
+  int execute(ExecType execType,
 	      AbortOption abortOption = AbortOnError,
 	      int force = 0 );
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
+  int execute(::ExecType execType,
+	      ::AbortOption abortOption = ::AbortOnError,
+	      int force = 0 )
+  { return execute ((ExecType)execType,(AbortOption)abortOption,force); }
+#endif
 
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+  // to be documented later
   /**
    * Prepare an asynchronous transaction.
    *
@@ -257,7 +340,7 @@ public:
    *        ExecType::Rollback rollbacks the entire transaction.
    * @param callback       A callback method.  This method gets 
    *                        called when the transaction has been 
-   *                        executed.  See @ref ndbapi_example2.cpp 
+   *                        executed.  See @ref ndbapi_async1.cpp 
    *                        for an example on how to specify and use 
    *                        a callback method.
    * @param anyObject       A void pointer.  This pointer is forwarded to the 
@@ -271,15 +354,23 @@ public:
 			    NdbAsynchCallback callback,
 			    void*             anyObject,
 			    AbortOption abortOption = AbortOnError);
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
+  void executeAsynchPrepare(::ExecType       execType,
+			    NdbAsynchCallback callback,
+			    void*             anyObject,
+			    ::AbortOption abortOption = ::AbortOnError)
+  { executeAsynchPrepare((ExecType)execType, callback, anyObject,
+			 (AbortOption)abortOption); }
+#endif
 
   /**
    * Prepare and send an asynchronous transaction.
    *
    * This method perform the same action as 
-   * NdbConnection::executeAsynchPrepare
+   * NdbTransaction::executeAsynchPrepare
    * but also sends the operations to the NDB kernel.
    *
-   * See NdbConnection::executeAsynchPrepare for information
+   * See NdbTransaction::executeAsynchPrepare for information
    * about the parameters of this method.
    *
    * See @ref secAsync for more information on
@@ -289,7 +380,15 @@ public:
 		     NdbAsynchCallback   aCallback,
 		     void*               anyObject,
 		     AbortOption abortOption = AbortOnError);
-
+#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
+  void executeAsynch(::ExecType         aTypeOfExec,
+		     NdbAsynchCallback   aCallback,
+		     void*               anyObject,
+		     ::AbortOption abortOption= ::AbortOnError)
+  { executeAsynch((ExecType)aTypeOfExec, aCallback, anyObject,
+		  (AbortOption)abortOption); }
+#endif
+#endif
   /**
    * Refresh
    * Update timeout counter of this transaction 
@@ -304,25 +403,39 @@ public:
 
   /**
    * Close transaction
-   * @note It is not allowed to call NdbConnection::close after sending the
+   *
+   * @note Equivalent to to calling Ndb::closeTransaction()
+   */
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+  /**
+   * @note It is not allowed to call NdbTransaction::close after sending the
    *       transaction asynchronously before the callback method has 
    * 	   been called.
    *       (The application should keep track of the number of 
    *       outstanding transactions and wait until all of them 
-   *       has completed before calling NdbConnection::close).
+   *       has completed before calling NdbTransaction::close).
    *       If the transaction is not committed it will be aborted.
    */
+#endif
   void close();
 
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
   /**
    * Restart transaction
    *
    *   Once a transaction has been completed successfully
    *     it can be started again wo/ calling closeTransaction/startTransaction
    *
-   *   Note this method also releases completed operations
+   *  @note This method also releases completed operations
+   *
+   *  @note This method does not close open scans, 
+   *        c.f. NdbScanOperation::close()
+   *
+   *  @note This method can only be called _directly_ after commit
+   *        and only if commit is successful
    */
   int restart();
+#endif
 
   /** @} *********************************************************************/
 
@@ -349,23 +462,20 @@ public:
    *       (This is because no updates are performed in scan transactions.)
    *
    * @return GCI of transaction or -1 if GCI is not available.
-   *         (Note that there has to be an NdbConnection::execute call 
+   *         (Note that there has to be an NdbTransaction::execute call 
    *         with Ndb::Commit for the GCI to be available.)
    */
-  int		getGCI();	
+  int		getGCI();
 			
   /**
    * Get transaction identity.
    *
    * @return  Transaction id.
    */
-  Uint64	getTransactionId();			
+  Uint64	getTransactionId();
 
   /**
-   * Returns the commit status of the transaction.
-   *
-   * @return  The commit status of the transaction, i.e. one of
-   *          { NotStarted, Started, TimeOut, Committed, Aborted, NeedAbort } 
+   * The commit status of the transaction.
    */
   enum CommitStatusType { 
     NotStarted,                   ///< Transaction not yet started
@@ -375,6 +485,11 @@ public:
     NeedAbort                     ///< <i>Missing explanation</i>
   };
 
+  /**
+   * Get the commit status of the transaction.
+   *
+   * @return  The commit status of the transaction
+   */
   CommitStatusType commitStatus();
 
   /** @} *********************************************************************/
@@ -393,10 +508,10 @@ public:
 
   /**
    * Get the latest NdbOperation which had an error. 
-   * This method is used on the NdbConnection object to find the
+   * This method is used on the NdbTransaction object to find the
    * NdbOperation causing an error.  
    * To find more information about the
-   * actual error, use method NdbOperation::getNdbError 
+   * actual error, use method NdbOperation::getNdbError()
    * on the returned NdbOperation object.
    *
    * @return The NdbOperation causing the latest error.
@@ -415,9 +530,9 @@ public:
    *
    * This method should only be used <em>after</em> a transaction 
    * has been executed.  
-   * - NdbConnection::getNextCompletedOperation(NULL) returns the
+   * - NdbTransaction::getNextCompletedOperation(NULL) returns the
    *   first NdbOperation object.
-   * - NdbConnection::getNextCompletedOperation(op) returns the
+   * - NdbTransaction::getNextCompletedOperation(op) returns the
    *   NdbOperation object defined after the NdbOperation "op".
    * 
    * This method is typically used to fetch all NdbOperation:s of 
@@ -432,6 +547,10 @@ public:
    */
   const NdbOperation * getNextCompletedOperation(const NdbOperation * op)const;
 
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+  const NdbOperation* getFirstDefinedOperation()const{return theFirstOpInList;}
+  const NdbOperation* getLastDefinedOperation()const{return theLastOpInList;}
+
   /** @} *********************************************************************/
 
   /**
@@ -443,16 +562,12 @@ public:
    */
   int executePendingBlobOps(Uint8 flags = 0xFF);
 
-  // Fast path calls for MySQL ha_ndbcluster
-  NdbOperation* getNdbOperation(const NdbDictionary::Table * table);
-  NdbIndexOperation* getNdbIndexOperation(const NdbDictionary::Index *,
-					  const NdbDictionary::Table * table);
-  NdbScanOperation* getNdbScanOperation(const NdbDictionary::Table * table);
-  NdbIndexScanOperation* getNdbIndexScanOperation(const NdbDictionary::Index * index,
-						  const NdbDictionary::Table * table);
+  /**
+   * Get nodeId of TC for this transaction
+   */
+  Uint32 getConnectedNodeId(); // Get Connected node id
+#endif
 
-  Uint32	getConnectedNodeId();	          // Get Connected node id
-  
 private:						
   /**
    * Release completed operations
@@ -467,10 +582,8 @@ private:						
   /**************************************************************************
    *	These are the create and delete methods of this class.              *
    **************************************************************************/
-  NdbConnection(Ndb* aNdb); 
-  ~NdbConnection();
-  NdbConnection* next();			  // Returns the next pointer
-  void next(NdbConnection*);		  // Sets the next pointer
+  NdbTransaction(Ndb* aNdb); 
+  ~NdbTransaction();
 
   void init();           // Initialize connection object for new transaction
 
@@ -489,6 +602,8 @@ private:						
   int		getTC_ConnectPtr();		  // Gets TC Connect pointer
   void          setBuddyConPtr(Uint32);           // Sets Buddy Con Ptr
   Uint32        getBuddyConPtr();                 // Gets Buddy Con Ptr
+  NdbTransaction* next();			  // Returns the next pointer
+  void		next(NdbTransaction*);		  // Sets the next pointer
 
   enum ConStatusType { 
     NotConnected,
@@ -600,7 +715,7 @@ private:						
   NdbOperation*	theErrorOperation; // The NdbOperation where the error occurred
 
   Ndb* 		theNdb;			     // Pointer to Ndb object	   
-  NdbConnection* theNext;	      	     // Next pointer. Used in idle list.
+  NdbTransaction* theNext;	      	     // Next pointer. Used in idle list.
 
   NdbOperation*	theFirstOpInList;	    // First operation in defining list.
   NdbOperation*	theLastOpInList;	    // Last operation in defining list.
@@ -691,19 +806,21 @@ private:						
   void define_scan_op(NdbIndexScanOperation*);
 
   friend class HugoOperations;
-  friend struct Ndb_free_list_t<NdbConnection>;
+  friend struct Ndb_free_list_t<NdbTransaction>;
 };
 
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+
 inline
 Uint32
-NdbConnection::get_send_size()
+NdbTransaction::get_send_size()
 {
   return 0;
 }
 
 inline
 void
-NdbConnection::set_send_size(Uint32 send_size)
+NdbTransaction::set_send_size(Uint32 send_size)
 {
   return;
 }
@@ -714,7 +831,7 @@ NdbConnection::set_send_size(Uint32 send
 
 inline
 int
-NdbConnection::checkMagicNumber()
+NdbTransaction::checkMagicNumber()
 {
   if (theMagicNumber == 0x37412619)
     return 0;
@@ -728,7 +845,7 @@ NdbConnection::checkMagicNumber()
 
 inline
 bool
-NdbConnection::checkState_TransId(const Uint32 * transId) const {
+NdbTransaction::checkState_TransId(const Uint32 * transId) const {
   const Uint32 tTmp1 = transId[0];
   const Uint32 tTmp2 = transId[1];
   Uint64 tRecTransId = (Uint64)tTmp1 + ((Uint64)tTmp2 << 32);
@@ -743,14 +860,14 @@ Remark:        Set the transaction ident
 ************************************************************************************************/
 inline
 void
-NdbConnection::setTransactionId(Uint64 aTransactionId)
+NdbTransaction::setTransactionId(Uint64 aTransactionId)
 {
   theTransactionId = aTransactionId;
 }
 
 inline
 void			
-NdbConnection::setConnectedNodeId(Uint32 aNode, Uint32 aSequenceNo)
+NdbTransaction::setConnectedNodeId(Uint32 aNode, Uint32 aSequenceNo)
 {
   theDBnode = aNode;
   theNodeSequence = aSequenceNo;
@@ -763,7 +880,7 @@ Remark:         Get Connected node id. 
 ******************************************************************************/
 inline
 Uint32			
-NdbConnection::getConnectedNodeId()
+NdbTransaction::getConnectedNodeId()
 {
   return theDBnode;
 }	
@@ -775,7 +892,7 @@ Remark:         Set my block refrerence.
 ******************************************************************************/
 inline
 void			
-NdbConnection::setMyBlockReference(int aBlockRef)	
+NdbTransaction::setMyBlockReference(int aBlockRef)	
 {
   theMyRef = aBlockRef;
 }
@@ -787,7 +904,7 @@ Remark:         Sets TC Connect pointer.
 ******************************************************************************/
 inline
 void			
-NdbConnection::setTC_ConnectPtr(Uint32 aTCConPtr)
+NdbTransaction::setTC_ConnectPtr(Uint32 aTCConPtr)
 {
   theTCConPtr = aTCConPtr;
 }
@@ -800,61 +917,61 @@ Remark:         Gets TC Connect pointer.
 ******************************************************************************/
 inline
 int			
-NdbConnection::getTC_ConnectPtr()
+NdbTransaction::getTC_ConnectPtr()
 {
   return theTCConPtr;
 }
 
 inline
 void
-NdbConnection::setBuddyConPtr(Uint32 aBuddyConPtr)
+NdbTransaction::setBuddyConPtr(Uint32 aBuddyConPtr)
 {
   theBuddyConPtr = aBuddyConPtr;
 }
 
 inline
-Uint32 NdbConnection::getBuddyConPtr()
+Uint32 NdbTransaction::getBuddyConPtr()
 {
   return theBuddyConPtr;
 }
 
 /******************************************************************************
-NdbConnection* next();
+NdbTransaction* next();
 
 inline
 void
-NdbConnection::setBuddyConPtr(Uint32 aBuddyConPtr)
+NdbTransaction::setBuddyConPtr(Uint32 aBuddyConPtr)
 {
   theBuddyConPtr = aBuddyConPtr;
 }
 
 inline
-Uint32 NdbConnection::getBuddyConPtr()
+Uint32 NdbTransaction::getBuddyConPtr()
 {
   return theBuddyConPtr;
 }
 
-Return Value:	Return  next pointer to NdbConnection object.
+Return Value:	Return  next pointer to NdbTransaction object.
 Remark:         Get the next pointer. 
 ******************************************************************************/
 inline
-NdbConnection*
-NdbConnection::next()
+NdbTransaction*
+NdbTransaction::next()
 {
   return theNext;
 }
 
 /******************************************************************************
-void next(NdbConnection aConnection);
+void next(NdbTransaction aTransaction);
 
-Parameters:     aConnection: The connection object. 
+Parameters:     aTransaction: The connection object. 
 Remark:         Sets the next pointer. 
 ******************************************************************************/
 inline
 void
-NdbConnection::next(NdbConnection* aConnection)
+NdbTransaction::next(NdbTransaction* aTransaction)
 {
-  theNext = aConnection;
+  theNext = aTransaction;
 }
 
 /******************************************************************************
@@ -865,8 +982,8 @@ Parameters:     aStatus:  The status.
 Remark:         Sets Connect status. 
 ******************************************************************************/
 inline
-NdbConnection::ConStatusType			
-NdbConnection::Status()
+NdbTransaction::ConStatusType			
+NdbTransaction::Status()
 {
   return theStatus;
 }
@@ -879,7 +996,7 @@ Remark:         Sets Connect status. 
 ******************************************************************************/
 inline
 void			
-NdbConnection::Status( ConStatusType aStatus )
+NdbTransaction::Status( ConStatusType aStatus )
 {
   theStatus = aStatus;
 }
@@ -892,7 +1009,7 @@ Remark:		Set global checkpoint identity 
 ******************************************************************************/
 inline
 void
-NdbConnection::setGCI(int aGlobalCheckpointId)
+NdbTransaction::setGCI(int aGlobalCheckpointId)
 {
   theGlobalCheckpointId = aGlobalCheckpointId;
 }
@@ -904,7 +1021,7 @@ Remark:       An operation was sent with
 ******************************************************************************/
 inline
 void 
-NdbConnection::OpSent()
+NdbTransaction::OpSent()
 {
   theNoOfOpSent++;
 }
@@ -915,7 +1032,7 @@ void executePendingBlobOps();
 #include <stdlib.h>
 inline
 int
-NdbConnection::executePendingBlobOps(Uint8 flags)
+NdbTransaction::executePendingBlobOps(Uint8 flags)
 {
   if (thePendingBlobOps & flags) {
     // not executeNoBlobs because there can be new ops with blobs
@@ -926,8 +1043,12 @@ NdbConnection::executePendingBlobOps(Uin
 
 inline
 Uint32
-NdbConnection::ptr2int(){
+NdbTransaction::ptr2int(){
   return theId;
 }
+
+typedef NdbTransaction NdbConnection;
+
+#endif // ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
 
 #endif
Thread
bk commit into 5.0 tree (mskold:1.2199)Martin Skold7 Aug