如何获取我的 `MySQL` 查询获得的锁数?
How to get number of locks acquired by my `MySQL` Query?
如何获取我的 MySQL
更新查询获取的锁数?
示例查询:update employees set store_id = 0 where store_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;
如何获取我的 MySQL
更新查询获取的锁数?
示例查询:update employees set store_id = 0 where store_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;