Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Return details of what Userspace locks (via GET_LOCK()) are being waited for
- -- and what the owning thread is doing, if anything
- SELECT
- p1.time as waitingfor,
- SUBSTRING_INDEX(SUBSTRING(p1.info, 18), "'", 1) as lock_key,
- IS_USED_LOCK(SUBSTRING_INDEX(SUBSTRING(p1.info, 18), "'", 1)) as pid,
- p2.*
- FROM information_schema.processlist p1, information_schema.processlist p2
- WHERE
- p1.info like "SELECT GET_LOCK('%"
- HAVING pid = p2.id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement