INNODB_LOCKS Table: INNODB_LOCKS 表 包含信息关于每个锁 一个InnoDB 事务已经请求 但是没有获得锁, 每个lock 一个事务持有是堵塞另外一个事务 centos6.5:/root/mysql-5.6.22#mysql -uroot -p'kjk123123' -h192.168.11.185 -e"select * from INFORMATION_SCHEMA.INNODB_TRX\G " Warning: Using a password on the command line interface can be insecure. *************************** 1. row *************************** trx_id: 5460 trx_state: LOCK WAIT trx_started: 2016-11-22 15:02:18 trx_requested_lock_id: 5460:14:3:2 trx_wait_started: 2016-11-22 15:02:18 trx_weight: 2 trx_mysql_thread_id: 1404 trx_query: delete from test where username='admin' trx_operation_state: starting index read trx_tables_in_use: 1 trx_tables_locked: 1 trx_lock_structs: 2 trx_lock_memory_bytes: 360 trx_rows_locked: 1 trx_rows_modified: 0 trx_concurrency_tickets: 0 trx_isolation_level: REPEATABLE READ trx_unique_checks: 1 trx_foreign_key_checks: 1 trx_last_foreign_key_error: NULL trx_adaptive_hash_latched: 0 trx_adaptive_hash_timeout: 10000 trx_is_read_only: 0 trx_autocommit_non_locking: 0 *************************** 2. row *************************** trx_id: 5453 trx_state: RUNNING trx_started: 2016-11-22 14:01:14 trx_requested_lock_id: NULL trx_wait_started: NULL trx_weight: 3 trx_mysql_thread_id: 1367 trx_query: NULL trx_operation_state: NULL trx_tables_in_use: 0 trx_tables_locked: 0 trx_lock_structs: 2 trx_lock_memory_bytes: 360 trx_rows_locked: 4 trx_rows_modified: 1 trx_concurrency_tickets: 0 trx_isolation_level: REPEATABLE READ trx_unique_checks: 1 trx_foreign_key_checks: 1 trx_last_foreign_key_error: NULL trx_adaptive_hash_latched: 0 trx_adaptive_hash_timeout: 10000 trx_is_read_only: 0 trx_autocommit_non_locking: 0 centos6.5:/root/mysql-5.6.22#mysql -uroot -p'kjk123123' -h192.168.11.185 -e"select * from INFORMATION_SCHEMA.INNODB_LOCKS\G " Warning: Using a password on the command line interface can be insecure. *************************** 1. row *************************** lock_id: 5460:14:3:2 lock_trx_id: 5460 lock_mode: X lock_type: RECORD lock_table: `DEVOPS`.`test` lock_index: GEN_CLUST_INDEX lock_space: 14 lock_page: 3 lock_rec: 2 lock_data: 0x000000000218 *************************** 2. row *************************** lock_id: 5453:14:3:2 lock_trx_id: 5453 lock_mode: X lock_type: RECORD lock_table: `DEVOPS`.`test` lock_index: GEN_CLUST_INDEX lock_space: 14 lock_page: 3 lock_rec: 2 lock_data: 0x000000000218 centos6.5:/root/mysql-5.6.22#mysql -uroot -p'kjk123123' -h192.168.11.185 -e"show processlist" Warning: Using a password on the command line interface can be insecure. +------+------+----------------------+--------+---------+------+----------+------------------------------------------+ | Id | User | Host | db | Command | Time | State | Info | +------+------+----------------------+--------+---------+------+----------+------------------------------------------+ | 1367 | root | 192.168.11.186:40366 | DEVOPS | Sleep | 3905 | | NULL | | 1404 | root | 192.168.11.186:46149 | DEVOPS | Query | 4 | updating | delete from test where username='admin' | | 1413 | root | 10.10.11.191:54394 | NULL | Sleep | 519 | | NULL | | 1414 | root | 10.10.11.191:54395 | NULL | Sleep | 519 | | NULL | | 1461 | root | 192.168.11.185:49157 | NULL | Query | 0 | init | show processlist | +------+------+----------------------+--------+---------+------+----------+------------------------------------------+ INNODB_LOCKS Columns: LOCK_ID 唯一的lock ID 号,内部与InnoDB. 对待它作为一个不透明的字符串。 虽然 LOCK_ID 当前包含TRX_ID LOCK_TRX_ID 事务持有锁的的ID 得到关于事务的详细信息,关联这个列和INNODB_TRX 表的TRX_ID
INFORMATION_SCHEMA.INNODB_LOCKS
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:403 Forbidden
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
MySQL information_schema.innodb_cmp表的作用
例如,如果发现压缩操作耗时较长,但节省的空间不多,可能需要重新考虑是否继续使用压缩或者调整
mysql 数据库 重置 解压缩 MySQL -
INFORMATION_SCHEMA架构 information schema库
使用说明 在Mysql中的INFORMATION_SCHEMA提供对数据库元数据的访问,关于MySQL服务器的信息,例如数据库或表的名称,列的数据类型或访问权限。在其他系统中,有时用于说明此信息的术语是数据字典和系统目录。 INFORMATION_SCHEMA是每个MySQL实例中的一个数据库,
Mysql Schema INFORMATION_SCHEMA Mysql 数据库 MySQL