Hi,

As per a previous thread I have found that when you use  "lock Tables" MySql will wait 
indefinitely for the lock - No timeout or error message.

Therefore let me explain my question.

Scenario:

User 1 locks files for a long running job. (write lock that prevents any access to the 
files)
User 2 logs on, then try's to lock or use these  files but can't because user 1 
already has the lock. (even a simple "select * from xxx" will wait forever)

The program for user 2 will just appear to hang. How do I give feed back to user 2 to 
say something like: "Unable to lock/use files after waiting 30 seconds, try again 
later" or whatever. IE I would like the program to be able to return control after a 
specific amount of time if the lock is not satisfied   in order to give feedback to 
the user, rather than the the program just wait and appearing to hang.

Better still if there is a system variable or something I can check first to see if 
the file is locked - but I can't seem to find this in the docs.

Most other databases I have used have a timeout value (like the record lock for 
innodb) so I am having trouble dealing with this scenario.

Any Ideas.

Thanks
Clyde England


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to