show processlist 输出ID 和 information_schema.PROCESSLIST 的id,information_schema.innodb_trx的TRX_MYSQL_T
Session 1: mysql> start transaction;
Query OK, 0 rows affected (0.00 sec) mysql> update ClientActionTrack20151125 set ip='2.2.2.2'; Warning: Using a password on the command line interface can be insecure.
+-----+------+-----------+------+---------+------+----------+---------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+------+---------+------+----------+---------------------------------------------------+
| 447 | root | localhost | zjzc | Query | 5 | updating | update ClientActionTrack20151125 set ip='2.2.2.2' | 2016-11-25 17:40:26,39,447,root,localhost,zjzc
mysql[192.168.11.187] processid[447] root@localhost in db[zjzc] hold transaction time 39 mysql> select * from information_schema.innodb_trx\G;
*************************** 1. row ***************************
trx_id: 112075119
trx_state: RUNNING
trx_started: 2016-11-25 17:39:47
trx_requested_lock_id: NULL
trx_wait_started: NULL
trx_weight: 6115055
trx_mysql_thread_id: 447 my $hostSql = qq{SELECT
NOW(), (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(a.trx_started)) diff_sec,
b.id,
b.user,
b.host,
b.db
FROM
information_schema.innodb_trx a
INNER JOIN
information_schema.PROCESSLIST b ON a.TRX_MYSQL_THREAD_ID = b.id}; show processlist 看到的ID 447 就是 a.TRX_MYSQL_THREAD_ID = b.id 开启session 2: Database changed
mysql> update ClientActionTrack20151125 set ip='9.9.9.9'; Vsftp:/root# mysql -uroot -p1234567 -e"show processlist"
Warning: Using a password on the command line interface can be insecure.
+-----+------+----------------------+--------------------+---------+------+----------+---------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+----------------------+--------------------+---------+------+----------+---------------------------------------------------+
| 447 | root | localhost | zjzc | Query | 197 | updating | update ClientActionTrack20151125 set ip='2.2.2.2' |
| 454 | root | localhost | zjzc | Query | 3 | updating | update ClientActionTrack20151125 set ip='9.9.9.9' |
| 457 | root | 192.168.11.186:47208 | information_schema | Sleep | 1 | | NULL |
| 458 | root | localhost | NULL | Query | 0 | init | show processlist |
+-----+------+----------------------+--------------------+---------+------+----------+---------------------------------------------------+ 2016-11-25 17:43:39,232,447,root,localhost,zjzc
mysql[192.168.11.187] processid[447] root@localhost in db[zjzc] hold transaction time 232
2016-11-25 17:43:39,38,454,root,localhost,zjzc
mysql[192.168.11.187] processid[454] root@localhost in db[zjzc] hold transaction time 38
112075120,454,update ClientActionTrack20151125 set ip='9.9.9.9',112075119,447,update ClientActionTrack20151125 set ip='2.2.2.2'
mysql[192.168.11.187] blocking_thread[447] blocking_query[update ClientActionTrack20151125 set ip='2.2.2.2'] blocking waiting_thread[454]'s update ClientActionTrack20151125 set ip='9.9.9.9' 取的是 information_schema.innodb_trx:
r.trx_mysql_thread_id waiting_thread, b.trx_mysql_thread_id blocking_thread, mysql> select * from information_schema.innodb_trx\G;
*************************** 1. row ***************************
trx_id: 112075121
trx_state: LOCK WAIT
trx_started: 2016-11-25 17:45:27
trx_requested_lock_id: 112075121:442:4:149
trx_wait_started: 2016-11-25 17:45:27
trx_weight: 2
trx_mysql_thread_id: 454
trx_query: update ClientActionTrack20151125 set ip='9.9.9.9'
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: 112075119
trx_state: RUNNING
trx_started: 2016-11-25 17:39:47
trx_requested_lock_id: NULL
trx_wait_started: NULL
trx_weight: 19816885
trx_mysql_thread_id: 447
trx_query: update ClientActionTrack20151125 set ip='2.2.2.2'
trx_operation_state: updating or deleting
trx_tables_in_use: 1
trx_tables_locked: 1
trx_lock_structs: 638128
trx_lock_memory_bytes: 56555048
trx_rows_locked: 19816884
trx_rows_modified: 19178758
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 rows in set (0.13 sec) ERROR:
No query specified
show processlist 输出ID 和 information_schema.PROCESSLIST 的id,information_schema.innodb_trx的TRX_MYSQL_T的更多相关文章
- Andriod学习笔记2:“Your content must have a ListView whose id attribute is 'android.R.id.list'”问题的解决办法
问题描述 activity_main.xml代码如下: <?xml version="1.0" encoding="utf-8"?> <Lin ...
- [BUG集] android 安卓项目中ORMLITE框架 Must specify one of id, generatedId, and generatedIdSequence with Id
使用ORM框架ORMLITE有一段时间,今天在操作一个对象的时候,重新运行报错如下: Must specify one of id, generatedId, and generatedIdSeque ...
- 免费开发者证书真机调试App ID失效问题:"Unable to add App ID because the '10' App ID limit in '7' days has been exceeded."解决方案(5月5号)
免费开发者证书真机调试App ID失效问题:"Unable to add App ID because the '10' App ID limit in '7' days has been ...
- Android Your content must have a ListView whose id attribute is 'android.R.id.list'错误的解决办法
在Android开发中,ListView有着很重要的地位,使用的场合也非常的多 错误提示:Your content must have a ListView whose id attribute is ...
- Unable to add App ID because the '10' App ID limit in '7' days has been exceeded.
Unable to add App ID because the '10' App ID limit in '7' days has been exceeded. 官方的原因是对bundle iden ...
- 获取json对象的id或者根据name获取id
--用json的时候,知道id获取对应的name或者相反根据name获取id --内核代码 <script> var products=[{ID:1,Name:"a", ...
- linux系统学习笔记:无死角理解保存的设置用户ID,设置用户ID位,有效用户ID,实际用户ID
一.基本概念 实际用户ID(RUID):用于标识一个系统中用户是谁,一般是在登录之后,就被唯一的确定,就是登录的用户的uid. 有效用户ID(EUID):用于系统决定用户对系统资源的权限,也就是说当用 ...
- hibernate利用mysql的自增张id属性实现自增长id和手动赋值id并存
我们知道在mysql中如果设置了表id为自增长属性的话,insert语句中如果对id赋值(值没有被用到过)了,则插入的数据的id会为用户设置的值,并且该表的id的最大值会重新计算,以插入后表的id最大 ...
- 初学时遇到的小问题Your content must have a ListView whose id attribute is 'android.R.id.list'
问题提出 错误提示:Your content must have a ListView whose id attribute is 'android.R.id.list' 关于解决Your conte ...
随机推荐
- swift入门-day01-基本语法
主要内容: 1.常量和变量 2.Optional 3.控制流 4.循环 5.字符串 6.集合 变量和常量 定义 let 定义常量,一经赋值不允许再修改 var 定义变量,赋值之后仍然可以修改 自动推导 ...
- javascript面向对象程序设计系列(一)---创建对象
javascript是一种基于对象的语言,但它没有类的概念,所以又和实际面向对象的语言有区别,面向对象是javascript中的难点之一.现在就我所理解的总结一下,便于以后复习: 一.创建对象 1.创 ...
- Java中ArrayList类详解
1.什么是ArrayList ArrayList就是传说中的动态数组,用MSDN中的说法,就是Array的复杂版本,它提供了如下一些好处: 动态的增加和减少元素 实现了ICollection和ILis ...
- javee学习-通过ServletContext对象实现数据共享
1,设置值. ServletContext context = this.getServletConfig().getServletContext();//获得ServletContext对象 // ...
- 2、Charm Bracelet( poj 3624)简单0-1背包
题意:有n件手镯,总重量不能超过M,每个手镯有一个体重W[i]和魅力V[i],问在不超过M的情况下能获得的魅力总和 思路:把M当背包总容量,用0-1背包写 代码: #include <iostr ...
- yii学习随感
最近我们公司信易网络在用yii开发一个项目自己临时学习了一下yii 把学习感悟和大家一起分享一下 Yii Framework是一个基于组件.用于开发大型 Web 应用的高性能 PHP 框架.Yii提供 ...
- css(html)背景图优化合并
图片本身的优化: 图像质量要求和图像文件大小决定你用什么格式的图片,用较小的图片文件呈现较好的图像质量. 当图片色彩过于丰富且无透明要求时,建议采用jpg格式并保存为较高质量. 当图片色彩过于丰富又有 ...
- whoosh使用笔记
1. whoosh安装 pip install Whoosh 2. 添加索引 第一步:生成schema 第二步:根据schema生成index.index就是一个目录中的一堆文件 (针对某个目录,调 ...
- Ubuntu启动项设置——之update-rc.d 命令使用
http://blog.csdn.net/typ2004/article/details/38712887 apache2.nginx.redis这些服务安装之后,会随开机启动,当这些服务并不需要时, ...
- 2016030208 - sql50题练习题
数据库建表脚本和使用的数据请参考:http://www.cnblogs.com/zhtzyh2012/p/5235826.html sql50题练习参看:http://blog.sina.com.cn ...