This week one of MariaDB Support customers asked how to find what
thread had executed FLUSH TABLES WITH READ LOCK
(FTWRL) and thus blocked all changes to data. I decided to
list several ways to find this out (as eventually customer wanted
to know how to find this out not only in MariaDB 10.1, but also
in MySQL 5.6 etc).
Let me start with a quick summary. I know the following ways (other that having all queries logged in general query log, slow log, by some audit plugin or at client side, and checking the log) to find the thread that executed FLUSH TABLES WITH READ LOCK successfully:
- In MariaDB starting from 10.0.7 you can use METADATA_LOCK_INFO plugin.
- In MySQL starting from 5.7 you can use …