2.3.29.1 NdbTransaction Types

2.3.29.1.1 The NdbTransaction::AbortOption Type (OBSOLETE)
2.3.29.1.2 The NdbTransaction::CommitStatusType Type
2.3.29.1.3 The NdbTransaction::ExecType Type

Abstract

This section details the public types belonging to the NdbTransaction class.

2.3.29.1.1 The NdbTransaction::AbortOption Type (OBSOLETE)

Description.  This type is used to determine whether failed operations should force a transaction to be aborted. It is used as an argument to the execute() method—see Section 2.3.29.2.4, “NdbTransaction::execute(), for more information.

Enumeration values.  Possible values are shown, along with descriptions, in the following table:

ValueDescription
AbortOnErrorA failed operation causes the transaction to abort.
AO_IgnoreOnErrorFailed operations are ignored; the transaction continues to execute.
Important

Beginning with MySQL Cluster NDB 6.2.0, this type belongs to the NdbOperation class and its possible values and default behavior have changed. NDB API application code written against previous versions of MySQL Cluster that refers explicitly to NdbTransaction::AbortOption values must be modified to work with MySQL Cluster NDB 6.2.0 or later.

In particular, this affects the use of NdbTransaction::execute() in MySQL Cluster NDB 6.2.0 and later. See Section 2.3.24.1.1, “The NdbOperation::AbortOption Type”, and Section 2.3.29.2.4, “NdbTransaction::execute(), for more information.

2.3.29.1.2 The NdbTransaction::CommitStatusType Type

Description.  This type is used to describe a transaction's commit status.

Enumeration values.  Possible values are shown, along with descriptions, in the following table:

ValueDescription
NotStartedThe transaction has not yet been started.
StartedThe transaction has started, but is not yet committed.
CommittedThe transaction has completed, and has been committed.
AbortedThe transaction was aborted.
NeedAbortThe transaction has encountered an error, but has not yet been aborted.

A transaction's commit status ca be read using the commitStatus() method. See Section 2.3.29.2.2, “NdbTransaction::commitStatus().

2.3.29.1.3 The NdbTransaction::ExecType Type

Description.  This type sets the transaction's execution type; that is, whether it should execute, execute and commit, or abort. It is used as a parameter to the execute() method. (See Section 2.3.29.2.4, “NdbTransaction::execute().)

Enumeration values.  Possible values are shown, along with descriptions, in the following table:

ValueDescription
NoCommitThe transaction should execute, but not commit.
CommitThe transaction should execute and be committed.
RollbackThe transaction should be rolled back.