Bug #359 delete command denied to normal users
Submitted: 2 May 2003 7:01 Modified: 28 May 2003 8:33
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:4.1.0 alpha OS:Linux (linux)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[2 May 2003 7:01] [ name withheld ]
Description:
theres a probleme regarding the delete statement on mysql 4.1.0alpha.
A delete statement including a subselect causes a permission denied for a normal user (not root).

for example:
mysql -uuser 
>delete * from table1 where id=1 
Works!
>delete * from table01 where id in(select id from table1 where id=1)
permission denied to user "user"

Same procedure for user root works fine.

How to repeat:
[3 May 2003 2:42] Oleksandr Byelkin
1. there are syntax error in provided test suite 
2. test suite is incomplete 
3. I can't repeat it with following test suite: 
drop table if exists t1,t2; 
create table t1 (id int not null); 
create table t2 (id int not null); 
insert into t1 values (1),(2),(3); 
insert into t2 values (1),(2),(3); 
grant SELECT,DELETE on test.* to test@localhost; 
connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock); 
connect (user1,localhost,test,,test,$MASTER_MYPORT,master.sock); 
connection user1; 
#delete from t1 where id=2; 
delete from t1 where id in (select id from t2 where id=1); 
select * from t1; 
connection root; 
drop table t1, t2;
[28 May 2003 8:33] Michael Widenius
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at 
    http://www.mysql.com/doc/en/Installing_source_tree.html

We just fixed something that could have caused this problem.
Please try again with 4.1.1