Lock Tables Timeout value?
Hi, I have searched the docs but can't seem to find information on the time out value for Lock Tables (probably just me) When using Lock Tables how long does MySql wait before giving up if it can't get a lock? Is there any way of changing this time out value? 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
Re: Lock Tables Timeout value?
Gee, I hope there is no such thing as a timeout value for Lock Tables. :) If two of my programs decide that one of them needs to wait for the other, however long that may take, then I hope MySQL honors that chosen symbiosis. I hope it behaves like a Perl flock(): it just waits, and waits, and waits -- and that is how I want it. :) - Mark System Administrator Asarian-host.org --- If you were supposed to understand it, we wouldn't call it code. - FedEx - Original Message - From: Clyde [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 11, 2003 10:12 AM Subject: Lock Tables Timeout value? Hi, I have searched the docs but can't seem to find information on the time out value for Lock Tables (probably just me) When using Lock Tables how long does MySql wait before giving up if it can't get a lock? Is there any way of changing this time out value? 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
Re: Lock Tables Timeout value?
*** REPLY SEPARATOR *** On 11/01/2003 at 1:29 PM Mark wrote: Gee, I hope there is no such thing as a timeout value for Lock Tables. :) If two of my programs decide that one of them needs to wait for the other, however long that may take, then I hope MySQL honors that chosen symbiosis. I hope it behaves like a Perl flock(): it just waits, and waits, and waits -- and that is how I want it. :) H'mm. If this is so then how do you give feed back to a user when files are locked. Scenario: User 1 locks files for a long running job. User 2 logs on, then try's to lock files but can't because user 1 already has the lock. If there is no timeout value then 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 files after waiting 60 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 (I would think MySql would give an error message) in order to give feedback to the user, rather than the the program just wait and appearing to hang. This behavior occurs with record locks using InnoDB files. I would have thought a similar approach would have applied to File locks? 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
Re: Lock Tables Timeout value?
At 17:12 +0800 1/11/03, Clyde wrote: Hi, I have searched the docs but can't seem to find information on the time out value for Lock Tables (probably just me) When using Lock Tables how long does MySql wait before giving up if it can't get a lock? Forever. For table-level locks such as you acquire with LOCK TABLES, there is no timeout. This differs from (implicit) page- or row-level locking such as is performed by the BDB and InnoDB handlers. For such locking levels, it's possible to get deadlock. When the handler detects a deadlock, it aborts one of the deadlocking requests. Is there any way of changing this time out value? 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