如何获取MySQL
更新查询获取的锁定数量?
示例查询:update employees set store_id = 0 where store_id = 1;
答案 0 :(得分:0)
最后,我能够通过以下一组MySQL语句获得获取的锁数。
begin;
update employees set store_id = 0 where store_id = 1;
show engine innodb status\G
commit;
编辑:
我们还可以使用以下查询获取当前事务的锁定详细信息。
select * from information_schema.innodb_locks;