Bug #36811 | JOIN USING(col) gives SELECT command denied error when using --skip-grant-tables | ||
---|---|---|---|
Submitted: | 20 May 2008 0:20 | Modified: | 4 Feb 2011 16:08 |
Reporter: | Sergey Petrunya | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: Security: Privileges | Severity: | S3 (Non-critical) |
Version: | 5.0.64,5.0.67, 5.0.85 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | 5.0-bk |
[20 May 2008 0:20]
Sergey Petrunya
[20 May 2008 5:01]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described with recent 5.0-bk (5.0.64).
[13 Aug 2008 21:15]
Matt Parlane
I may have some more information on this - it seems to depend on which fields are selected. I am running the currently released 5.0.67. My server has been started with skip-grant-tables, and I get this output: WG-Web02:/etc/mysql# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6401 Server version: 5.0.67-0.dotdeb.1-log (Dotdeb) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> USE webgenius; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> SELECT CitizenID FROM EmailLog INNER JOIN Memberships USING(CitizenID) WHERE EmailLog.CustomerID = 94184284 AND Type = 'standard' AND ContactMember = 0 AND TimeSent > '2008-08-01'; +------------+ | CitizenID | +------------+ | 2017939412 | | 2017939312 | | 2018491563 | | 2018764307 | +------------+ 4 rows in set (1 min 20.70 sec) mysql> SELECT * FROM EmailLog INNER JOIN Memberships USING(CitizenID) WHERE EmailLog.CustomerID = 94184284 AND Type = 'standard' AND ContactMember = 0 AND TimeSent > '2008-08-01'; ERROR 1143 (42000): SELECT command denied to user ''@'' for column 'CitizenID' in table 'EmailLog' mysql> SELECT CitizenID FROM EmailLog LIMIT 1; +-----------+ | CitizenID | +-----------+ | 0 | +-----------+ 1 row in set (0.01 sec) As you can see, if I "SELECT *", it fails, but if I just "SELECT CitizenID", it succeeds.
[31 Oct 2009 21:46]
MySQL Verification Team
testcase, still repeatable on 5.0.85: mysql> drop table if exists t1; Query OK, 0 rows affected (0.00 sec) mysql> create table t1(col1 int); Query OK, 0 rows affected (0.02 sec) mysql> select * from t1 as a join t1 as t1 using(col1); ERROR 1143 (42000): SELECT command denied to user ''@'' for column 'col1' in table 'a' mysql> 5.1.40 works as expected.
[26 Jan 2011 15:17]
Davi Arnaut
Not repeated in 5.1, please close as Won't fix.
[4 Feb 2011 16:08]
Omer Barnir
Issue does not exist in 5.1+