When testing my application code I note that mysql_query() does not return a non-zero result when a lock timeout occurs -- the error is detected when I try to retrieve the result set and get a NULL value.
However, this finding is not consistent; for example
in one block of code a mysql_query() (using SELECT COUNT(*) WHERE login_name='joe' LOCK IN SHARE MODE ) will correctly return
a non-zero value if I have deliberately locked (FOR UPDATE) the target row previously from another terminal window.
However, in the next block of code with a similiar query eg. SELECT COUNT(*) ...LOCK IN SHARE MODE (applied to a different table with
the target row deliberately locked with a FOR UPDATE), mysql_query() returns 0 and only when mysql_store_result() returns NULL can I retrieve the lock timeout error code.
Why does mysql_query() not consistently return the lock timeout error code?
Ken
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]