summaryrefslogtreecommitdiff
path: root/tests/grant.pl
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-05-08 01:47:20 +0300
committerunknown <monty@mashka.mysql.fi>2003-05-08 01:47:20 +0300
commit504fd4d43990e507b685eb336ee672c637ecf4cb (patch)
tree1d5bc0b38c6b18e4805db58d9f68b42088c5dcf3 /tests/grant.pl
parent548e26cbf3f9666c8f96893b30b97a44712ab152 (diff)
downloadmariadb-git-504fd4d43990e507b685eb336ee672c637ecf4cb.tar.gz
More tests
Diffstat (limited to 'tests/grant.pl')
-rw-r--r--tests/grant.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/grant.pl b/tests/grant.pl
index fb73be786b6..3146b7b6c25 100644
--- a/tests/grant.pl
+++ b/tests/grant.pl
@@ -82,6 +82,7 @@ user_query("select * from mysql.user where user = '$opt_user'");
user_query("select * from mysql.db where user = '$opt_user'");
safe_query("grant select on *.* to $user,$user");
safe_query("show grants for $user");
+user_connect(0);
# The following should fail
user_query("insert into mysql.user (host,user) values ('error','$opt_user')",1);
@@ -95,16 +96,21 @@ safe_query("grant select on $opt_database.not_exists to $opt_user",1);
safe_query("grant FILE on $opt_database.test to $opt_user",1);
safe_query("grant select on *.* to wrong___________user_name",1);
safe_query("grant select on $opt_database.* to wrong___________user_name",1);
+user_connect(0);
user_query("grant select on $opt_database.test to $opt_user with grant option",1);
safe_query("set password FOR ''\@''=''",1);
user_query("set password FOR root\@$opt_host = password('test')",1);
# Change privileges for user
safe_query("revoke select on *.* from $user");
-safe_query("grant create on *.* to $user");
+safe_query("grant create,update on *.* to $user");
user_connect(0);
+safe_query("flush privileges");
user_query("create table $opt_database.test (a int,b int)");
-
+user_query("update $opt_database.test set b=b+1 where a > 0",1);
+safe_query("show grants for $user");
+safe_query("revoke update on *.* from $user");
+user_connect(0);
safe_query("grant select(c) on $opt_database.test to $user",1);
safe_query("revoke select(c) on $opt_database.test from $user",1);
safe_query("grant select on $opt_database.test to wrong___________user_name",1);