如何获取我的`MySQL`查询获取的锁数?
如何获取my如何获取我的`MySQL`查询获取的锁数?,mysql,sql-update,locking,Mysql,Sql Update,Locking,如何获取myMySQLupdate查询获取的锁数? 示例查询:更新员工设置的store\u id=0,其中store\u id=1最后,我能够获得以下一组MySQL语句获得的锁的数量 begin; update employees set store_id = 0 where store_id = 1; show engine innodb status\G commit; 编辑: 我们还可以使用以下查询获取当前事务的锁详细信息 select * from information_schema
MySQL
update查询获取的锁数?示例查询:
更新员工设置的store\u id=0,其中store\u id=1代码>最后,我能够获得以下一组MySQL语句获得的锁的数量
begin;
update employees set store_id = 0 where store_id = 1;
show engine innodb status\G
commit;
编辑:
我们还可以使用以下查询获取当前事务的锁详细信息
select * from information_schema.innodb_locks;
你说的“锁”是什么意思?我认为showprocesslist代码>将非常有用,因为您将看到锁定的内容。这通常是调试“锁的数量超过锁表大小”的非常有用的方法。错误