Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see global locks in mysql (innodb)?

If in understand correctly, running FLUSH TABLES WITH READ LOCK acquires a global read lock.

Is there any command I can run in the mysql client which shows me that lock is currently acquired?

like image 931
davidbrai Avatar asked Mar 19 '12 11:03

davidbrai


2 Answers

Try this :

SHOW ENGINE INNODB STATUS;

It will show owner of locks and waiters (and lot of other stuff related to innodb)

http://dev.mysql.com/doc/refman/5.0/en/innodb-monitors.html

http://www.xaprb.com/blog/2006/07/31/how-to-analyze-innodb-mysql-locks/

like image 76
rkosegi Avatar answered Nov 08 '22 00:11

rkosegi


This is not a global lock.once you come out of session ,it releases it

like image 1
Shahid Hussain Avatar answered Nov 08 '22 00:11

Shahid Hussain