Breaking News
Loading...
23/12/2013

MySQL: List locked transactions using common_schema framework

Show info on locked transactions:
mysql> SELECT * FROM common_schema.innodb_locked_transactions;
+---------------+---------------------+-------------------------+----------------------------+--------------------------------------------------+-------------------------+-------------------------+----------------+---------------------+--------------------------+-----------------------------+-------------------+------------------+-------------------------+------------------------------+
| locked_trx_id | locked_trx_started  | locked_trx_wait_started | locked_trx_mysql_thread_id | locked_trx_query                                 | requested_lock_id       | blocking_lock_id        | locking_trx_id | locking_trx_started | locking_trx_wait_started | locking_trx_mysql_thread_id | locking_trx_query | trx_wait_seconds | sql_kill_blocking_query | sql_kill_blocking_connection |
+---------------+---------------------+-------------------------+----------------------------+--------------------------------------------------+-------------------------+-------------------------+----------------+---------------------+--------------------------+-----------------------------+-------------------+------------------+-------------------------+------------------------------+
| 9AD2D1811     | 2012-09-28 10:40:25 | 2012-09-28 10:40:25     |                     609205 | NULL                                             | 9AD2D1811:499850:82:113 | 9AD2D0E1A:499850:82:113 | 9AD2D0E1A      | 2012-09-28 10:40:01 | NULL                     |                      609159 | NULL              |                1 | KILL QUERY 609159       | KILL 609159                  |
| 9AD2D0FBA     | 2012-09-28 10:40:03 | 2012-09-28 10:40:03     |                     609196 | UPDATE events SET ts = NOW() WHERE alias = 'all' | 9AD2D0FBA:499850:88:108 | 9AD2D0E1A:499850:88:108 | 9AD2D0E1A      | 2012-09-28 10:40:01 | NULL                     |                      609159 | NULL              |               23 | KILL QUERY 609159       | KILL 609159                  |
+---------------+---------------------+-------------------------+----------------------------+--------------------------------------------------+-------------------------+-------------------------+----------------+---------------------+--------------------------+-----------------------------+-------------------+------------------+-------------------------+------------------------------+
http://common-schema.googlecode.com/svn/trunk/common_schema/doc/html/innodb_locked_transactions.html

0 comments:

Post a Comment

 
Toggle Footer