Gunakan:
SHOW OPEN TABLES
Periksa apakah kolom In_use lebih besar dari 0. Dalam hal ini, tabel dikunci.
Contoh
-
Daftar tabel terkunci:
show open tables WHERE In_use > 0 -
Periksa apakah tabel
tb_employeesterkunci atau tidak:show open tables WHERE Table LIKE 'tb_employees' AND In_use > 0
Dari dokumentasi resmi :