Bug #2142 Lock that worked using Mysql 3.23 stopped on 4.0.17
Submitted: 17 Dec 2003 7:18 Modified: 17 Dec 2003 11:36
Reporter: Mac Harris Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.17 OS:Windows (Window XP)
Assigned to: Dean Ellis CPU Architecture:Any

[17 Dec 2003 7:18] Mac Harris
Description:
Production Mysql returns FALSE from PHP's mysql_query for a LOCK query.

How to repeat:
Running console versions of Apache 1.3.27 and Mysql 3.23 with PHP 4.3.2.

A simple lock on a table thru mysql_query (query "LOCK TABLES tablename WRITE") returns a PHP non-FALSE value (my check is "if(!$return)"). Correct.

When I switch to the production version Mysql 4.0.17, the same scenario returns a FALSE value. Not correct. (And I have tried changing the check to "if($return == FALSE)" with the same result).

Suggested fix:
?
[17 Dec 2003 7:37] Dean Ellis
I am unable to repeat this; mysql_query() returns true unless the user does not have access to lock the table.  Can you verify the privileges for the user that PHP is using for this?
[17 Dec 2003 11:36] Dean Ellis
Not a bug per email correspondence (ie: LOCK privilege being new; return is correct).