TransWikia.com

Check for global read lock on MySQL

Database Administrators Asked by JellicleCat on December 15, 2021

Can I check whether a global read lock is in place?

My application uses MySQL (actually MariaDB) on InnoDB. I’m going to run mysqldump --all-databases, which will impose a global read lock for an hour. I’d like my application to check for the existence of this lock, but it doesn’t appear to show up in anything I’ve tried (unless a request which is waiting on the lock already exists):

  • SHOW ENGINE INNODB STATUS
  • SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS
  • SHOW FULL PROCESSLIST

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP