summaryrefslogtreecommitdiff
path: root/mysql-test/r/grant2.result
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-09-27 12:32:59 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-09-27 12:32:59 +0300
commit2e57478d9278b7b84b6bbbe6368a4fd8f68039c4 (patch)
tree72a3e5f03123ab2e82f6a6914420c1fd8ba57fe2 /mysql-test/r/grant2.result
parent4f6658967b40f88cbf0742066888d626812fec56 (diff)
parent500d856faf5dca0eb2731617fb11c09b83e3ef0d (diff)
downloadmariadb-git-2e57478d9278b7b84b6bbbe6368a4fd8f68039c4.tar.gz
merged the fix for bug 30468 to 5.1-opt
mysql-test/t/grant2.test: Auto merged sql/sql_acl.h: Auto merged sql/sql_base.cc: Auto merged
Diffstat (limited to 'mysql-test/r/grant2.result')
-rw-r--r--mysql-test/r/grant2.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result
index 21bad4fddcb..b94de265d0c 100644
--- a/mysql-test/r/grant2.result
+++ b/mysql-test/r/grant2.result
@@ -422,4 +422,22 @@ revoke all privileges, grant option from mysqltest_1@localhost;
revoke all privileges, grant option from mysqltest_2@localhost;
drop user mysqltest_1@localhost;
drop user mysqltest_2@localhost;
+CREATE DATABASE db1;
+USE db1;
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2);
+CREATE TABLE t2 (b INT, c INT);
+INSERT INTO t2 VALUES (1,100),(2,200);
+GRANT SELECT ON t1 TO mysqltest1@localhost;
+GRANT SELECT (b) ON t2 TO mysqltest1@localhost;
+USE db1;
+SELECT c FROM t2;
+ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2'
+SELECT * FROM t2;
+ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2'
+SELECT * FROM t1 JOIN t2 USING (b);
+ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2'
+DROP TABLE db1.t1, db1.t2;
+DROP USER mysqltest1@localhost;
+DROP DATABASE db1;
End of 5.0 tests