diff options
author | unknown <jani@a193-229-222-105.elisa-laajakaista.fi> | 2005-03-17 08:16:56 +0200 |
---|---|---|
committer | unknown <jani@a193-229-222-105.elisa-laajakaista.fi> | 2005-03-17 08:16:56 +0200 |
commit | 2bbde22d8485463704a4be3494094a03c1888e21 (patch) | |
tree | df04acf3caef7557f23fbe0d023035e2b5fa2393 /tests | |
parent | b766082bfb598a5f9c4c295b4f8e04d5886b12bd (diff) | |
download | mariadb-git-2bbde22d8485463704a4be3494094a03c1888e21.tar.gz |
Fixed two bugs in MySQL ACL.
First one is related to Bug#7905. One should not be allowed to
create new user with password without UPDATE privilege to
MySQL database. Furthermore, executing the same GRANT statement
twice would actually crash the server and corrupt privilege database.
Other bug was that one could update a column, using the existing
value as basis to calculate the new value (e.g. UPDATE t1 SET a=a+1)
without SELECT privilege to the field (a in the above example)
Fixed tests grant.pl and grant2, which were wrong.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/grant.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/grant.pl b/tests/grant.pl index cd6a2eb80de..4f2bd1a61cb 100644 --- a/tests/grant.pl +++ b/tests/grant.pl @@ -201,7 +201,7 @@ safe_query("select * from mysql.db where user = '$opt_user'"); safe_query("grant CREATE,UPDATE,DROP on $opt_database.* to $user"); user_connect(0); user_query("create table $opt_database.test2 (a int not null)"); -user_query("update test,test2 SET test.a=1 where 1"); +user_query("update test,test2 SET test.a=1 where 1",1); user_query("update test,test2 SET test.a=test2.a where 1",1); safe_query("grant SELECT on $opt_database.* to $user"); user_connect(0); @@ -375,7 +375,7 @@ user_query("delete from $opt_database.test where a=2"); user_query("delete from $opt_database.test where A=2"); user_query("update test set b=5 where b>0"); user_query("update test set a=11 where b>5",1); -user_query("update test,test2 SET test.b=5 where b>0"); +user_query("update test,test2 SET test.b=5 where b>0",1); user_query("update test,test2 SET test.a=11 where b>0",1); user_query("update test,test2 SET test.b=test2.a where b>0",1); user_query("update test,test2 SET test.b=11 where test2.a>0",1); |