Oracle 5.0 Reference Manual page 1144

Table of Contents

Advertisement

+----------+--------------+--------------+--------+
| formatID | gtrid_length | bqual_length | data
+----------+--------------+--------------+--------+
|
7 |
+----------+--------------+--------------+--------+
The output columns have the following meanings:
formatID
gtrid_length
bqual_length
is the concatenation of the
data
13.3.7.2. XA Transaction States
An XA transaction progresses through the following states:
1. Use
XA START
2. For an
ACTIVE
issue an
3. For an
IDLE
COMMIT ... ONE PHASE
XA PREPARE
point will include the transaction's
transactions that are in the
XA COMMIT ... ONE PHASE
listed by
4. For a
PREPARED
the transaction, or
Here is a simple XA transaction that inserts a row into a table as part of a global transaction:
mysql>
XA START 'xatest';
Query OK, 0 rows affected (0.00 sec)
mysql>
INSERT INTO mytable (i) VALUES(10);
Query OK, 1 row affected (0.04 sec)
mysql>
XA END 'xatest';
Query OK, 0 rows affected (0.00 sec)
mysql>
XA PREPARE 'xatest';
Query OK, 0 rows affected (0.00 sec)
mysql>
XA COMMIT 'xatest';
Query OK, 0 rows affected (0.00 sec)
Within the context of a given client connection, XA transactions and local (non-XA) transactions are
mutually exclusive. For example, if
transaction cannot be started until the XA transaction has been committed or rolled back. Conversely,
if a local transaction has been started with
the transaction has been committed or rolled back.
Note that if an XA transaction is in the
implicit commit. That would violate the XA contract because you could not roll back the XA transaction.
You will receive the following error if you try to execute such a statement:
3 |
is the
part of the transaction
formatID
is the length in bytes of the
is the length in bytes of the
to start an XA transaction and put it in the
XA transaction, issue the SQL statements that make up the transaction, and then
statement.
XA END
XA END
XA transaction, you can issue either an
statement:
puts the transaction in the
PREPARED
because the transaction terminates.
XA RECOVER
XA transaction, you can issue an
XA ROLLBACK
XA Transactions
|
3 | abcdef |
xid
part of the
gtrid
part of the
bqual
and
parts of the
gtrid
bqual
puts the transaction in the
XA PREPARE
PREPARED
value in its output, because
xid
state.
prepares and commits the transaction. The
XA COMMIT
to roll back and terminate the transaction.
has been issued to begin an XA transaction, a local
XA START
TRANSACTION, no XA statements can be used until
START
state, you cannot issue any statements that cause an
ACTIVE
1124
xid
xid
xid
state.
ACTIVE
state.
IDLE
statement or an
state. An
XA RECOVER
XA RECOVER
statement to commit and terminate
XA
statement at this
lists all XA
value will not be
xid

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents