Today I was doing some tests with XA transactions in MySQL 5.6.The output of the XA RECOVER command to list transactions was hard to read because of the representation of the data column:The good news is that 5.7 has transaction information in performance_schema:mysql> select trx_id, isolation_level, state, xid, xa_state, access_mode -> from performance_schema.events_transactions_current;+-----------------+-----------------+--------+--------+----------+-------------+| trx_id | isolation_level | state | xid | xa_state | access_mode |+-----------------+-----------------+--------+--------+----------+-------------+| NULL | REPEATABLE READ | ACTIVE | x-1 | PREPARED | READ WRITE || 421476507015704 | REPEATABLE READ | ACTIVE | NULL | NULL | READ WRITE || NULL | REPEATABLE READ | ACTIVE | foo-1 | ACTIVE | READ WRITE || NULL | REPEATABLE READ | ACTIVE | NULL | NULL | READ ONLY || NULL | REPEATABLE READ | ACTIVE | 0x0101 | PREPARED | READ WRITE |+-----------------+-----------------+--------+--------+----------+-------------+5 rows in set (0.00 sec)This is not only more readable but allows you to use functions on the output. It is also much more complete as all transactions are listed here, not only XA transactions.
from Planet MySQL http://www.planetmysql.org/
Nenhum comentário:
Postar um comentário
Leave your comment here!