detecting locked tables mysql (locked by LOCK TABLE)
up vote15down votefavorite 7 |
I would like to know whether there is an option to detect locked tables in mysql or not. I mean locked by
|
||||||||||||
|
5 Answers
up vote1down voteaccepted |
You can‘t for non-named locks! More info: http://forums.mysql.com/read.php?21,222363,223774#msg-223774
|
|||
add a comment |
Did you find this question interesting? Try our newsletter
Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).
up vote29down vote |
You can use
|
||
add a comment |
up vote14down vote |
Use You can do something like this
to check any locked tables in a database.
|
||||
|
up vote3down vote |
You can create your own lock with GET_LOCK(lockName,timeOut) If you do a However this won‘t work if you don‘t have all threads calling Hope that helps!
|
||||||||
|
up vote0down vote |
This article describes how to get information about locked MySQL resources.
|
||||||||
|
http://stackoverflow.com/questions/2499976/detecting-locked-tables-mysql-locked-by-lock-table