hi,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)