We help IT Professionals succeed at work.

Locking & Unlocking Tables in MySql

3,354 Views
Last Modified: 2008-01-09
I am using the following code:

 LOCK TABLES matrix WRITE;
 UPDATE matrix SET dollarsGained = dollarsGained - 10;
 UNLOCK TABLES;

1) How doI check that the table is actually locked?
2) How do I just unlock the table 'matix' without unlocking all of them?
3) How do I check that the table is actually unlocked?

Server info:
MySQL 5.0.45-community-nt via TCP/IP
MySQL Client Version 5.1.11
MYISAM tables
Comment
Watch Question

Top Expert 2007

Commented:
See http://dev.mysql.com/doc/refman/5.0/en/internal-locking.html there all your questions are answerd

Author

Commented:
I cannot seem to find the answers you refer to in that link.  Would you cut and paste the actual text you are referring to that answer each of the three questions?
Top Expert 2007
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.