summaryrefslogtreecommitdiff
path: root/tests/grant.pl
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-04-28 10:32:56 +0300
committerunknown <monty@mashka.mysql.fi>2003-04-28 10:32:56 +0300
commita34fc634658ce1b2ba63a45ee6bad4355a390439 (patch)
tree2420ece2919824dc5183a5aa772da0153ad2a123 /tests/grant.pl
parent31dc4b3c83917c48ee4882add75143a273a0c98b (diff)
downloadmariadb-git-a34fc634658ce1b2ba63a45ee6bad4355a390439.tar.gz
Fix for openssl on Solaris
Fix for grant bug with SELECT * include/my_global.h: Fix for openssl on Solaris sql/item_strfunc.cc: Fix for openssl on Solaris sql/sql_acl.cc: Indentation cleanup sql/sql_base.cc: Fix for grant bug with SELECT * sql/sql_parse.cc: Added comment tests/grant.pl: New grant test for SELECT * tests/grant.res: new grant results
Diffstat (limited to 'tests/grant.pl')
-rw-r--r--tests/grant.pl20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/grant.pl b/tests/grant.pl
index 5a24127d79d..e32431ad63a 100644
--- a/tests/grant.pl
+++ b/tests/grant.pl
@@ -63,6 +63,12 @@ user_connect(1);
#goto test;
#
+# Enable column grant code
+#
+safe_query("grant select(user) on mysql.user to $user");
+safe_query("revoke select(user) on mysql.user from $user");
+
+#
# Test grants on user level
#
@@ -408,21 +414,29 @@ safe_query("grant ALL PRIVILEGES on $opt_database.test to $user identified by 'd
user_connect(0,"dummy");
safe_query("grant SELECT on $opt_database.* to $user identified by ''");
user_connect(0);
-safe_query("revoke ALL PRIVILEGES on $opt_database.test from $user identified by ''");
+safe_query("revoke ALL PRIVILEGES on $opt_database.test from $user identified by '', ${opt_user}\@127.0.0.1 identified by 'dummy2'");
safe_query("revoke ALL PRIVILEGES on $opt_database.* from $user identified by ''");
+
safe_query("show grants for $user");
#
# Test bug reported in SELECT INTO OUTFILE
#
-safe_query("create table $opt_database.test3 (a int)");
+safe_query("create table $opt_database.test3 (a int, b int)");
safe_query("grant SELECT on $opt_database.test3 to $user");
safe_query("grant FILE on *.* to $user");
-safe_query("insert into $opt_database.test3 values (1)");
+safe_query("insert into $opt_database.test3 values (1,1)");
user_connect(0);
user_query("select * into outfile '$tmp_table' from $opt_database.test3");
safe_query("revoke SELECT on $opt_database.test3 from $user");
+safe_query("grant SELECT(a) on $opt_database.test3 to $user");
+user_query("select a from $opt_database.test3");
+user_query("select * from $opt_database.test3",1);
+user_query("select a,b from $opt_database.test3",1);
+user_query("select b from $opt_database.test3",1);
+
+safe_query("revoke SELECT(a) on $opt_database.test3 from $user");
safe_query("revoke FILE on *.* from $user");
safe_query("drop table $opt_database.test3");