MySQL Forums
Forum List  »  InnoDB

how to find out which table is being in transaction
Posted by: elison chen
Date: December 16, 2015 02:12AM

hi all,i find some uncommit transactions on table innodb_trx,how to find out the table which is locking?

root@localhost)[(none)]>select 'innodb_trx',
-> trx_id,
-> trx_mysql_thread_id thread_id,
-> trx_state,
-> timestampdiff(second, trx_started, now()) trx_elap_sec,
-> timestampdiff(second, trx_wait_started, now()) wait_sec,
-> trx_rows_locked rows_locked,
-> trx_rows_modified rows_modified,
-> substring(trx_query, 1, 60)
-> from information_schema.innodb_trx
-> order by trx_elap_sec desc, wait_sec desc;
+------------+----------+-----------+-----------+--------------+----------+-------------+---------------+-----------------------------+
| innodb_trx | trx_id | thread_id | trx_state | trx_elap_sec | wait_sec | rows_locked | rows_modified | substring(trx_query, 1, 60) |
+------------+----------+-----------+-----------+--------------+----------+-------------+---------------+-----------------------------+
| innodb_trx | 8A006C5D | 10088406 | RUNNING | 100949 | NULL | 2 | 7 | NULL |
+------------+----------+-----------+-----------+--------------+----------+-------------+---------------+-----------------------------+
1 row in set (0.00 sec)

Options: ReplyQuote


Subject
Views
Written By
Posted
how to find out which table is being in transaction
1319
December 16, 2015 02:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.