-- -- -- SESSION A -- -- --
-- Let's see what's happening
SHOW PROCESSLIST;
-- and we see the other session is waiting
-- Now count the orders and then release the lock
SELECT COUNT(*) FROM orders;
UNLOCK TABLES;
-- Let's see what's happening NOW
SHOW PROCESSLIST;
-- all's quiet, the other session should proceed
SELECT COUNT(*) FROM orders;