Re: mysql_query blocking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/27/09 7:09 PM, "Daniel Kolbo" <kolb0057@xxxxxxx> wrote:

> Tom Worster wrote:
>> On 6/27/09 3:15 PM, "Daniel Kolbo" <kolb0057@xxxxxxx> wrote:
>> 
>>> When a MySQL table is locked a php call of mysql_query() that requires
>>> that table will hang as the request blocks at the MySQL server until the
>>> table is unlocked.  Is there a way to stop a mysql_query from hanging
>>> (by setting a time limit)?
>> 
>> would it be possible to test for presence of the lock before issuing the
>> query that would block? if so, you could check the lock periodically until
>> your time limit is up. would achieve you you're looking for?
>> 
>> 
>> 
> it would still be possible that after checking but before issuing the
> query the table's could be locked - albeit a much smaller chance.

that's true.

what would be nice for this kind of problem would be a kind of async api,
perhaps a bit like curl_multi but with a way to check the state of an
outstanding query (queued, processing, etc). much like a js script uses
ajax.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux