SELECT command denied to user "user"@"localhost" for table "table"

SELECT command denied to user "user"@"localhost" for table "table"

am 17.06.2009 06:45:17 von Ruben Rubio

--000e0cd33278354e1e046c83f5a6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello,

We are experience an estrange problem with mysql and we need help to debug
this properly.

We have a mysql server 5.0.67 on a ubuntu intrepid.

Sometimes we have one unique query that cannot be executed and we get this
error:

SELECT command denied to user 'user'@'localhost' for table 'table'

When we test that query with that user everything works fine, and that query
does not fail always.

The query that we are executing is quite simple, something like:

SELECT column FROM table WHERE column1=1 OR (column2=1 AND column3=312) OR
(column4=1 AND (column5=0 OR column5=6 OR column5=12 OR column5=13 OR
column5=14))

The user has SELECT privileges:

GRANT USAGE ON *.* TO 'user'@'localhost' IDENTIFIED BY PASSWORD '*xxx'
GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE ON `database`.* TO
'user'@'localhost'


Any help to resolve this problem will be appreciated.

Thanks in advance,
Ruben Rubio Rey

--000e0cd33278354e1e046c83f5a6--