diff options
author | Georgi Kodinov <kgeorge@mysql.com> | 2009-02-26 19:20:50 +0200 |
---|---|---|
committer | Georgi Kodinov <kgeorge@mysql.com> | 2009-02-26 19:20:50 +0200 |
commit | f3c6ff1f7a7068d1440337bad8e233684d484cf4 (patch) | |
tree | 13f1b5f9cb07440f2fba55b876807467637ea8ba /mysql-test/r/view_grant.result | |
parent | cd5744db13a186add2814da0aed0719817ac075b (diff) | |
parent | a9d707037ab527564bb84885e0af69a2bb793219 (diff) | |
download | mariadb-git-f3c6ff1f7a7068d1440337bad8e233684d484cf4.tar.gz |
null-merged the fix and kept the test for bug #41354 from 5.0-bugteam
Diffstat (limited to 'mysql-test/r/view_grant.result')
-rw-r--r-- | mysql-test/r/view_grant.result | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 1d5f12320dd..1ae94926928 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -921,6 +921,32 @@ c4 DROP DATABASE mysqltest1; DROP DATABASE mysqltest2; DROP USER mysqltest_u1@localhost; +CREATE DATABASE db1; +USE db1; +CREATE TABLE t1(f1 INT, f2 INT); +CREATE VIEW v1 AS SELECT f1, f2 FROM t1; +GRANT SELECT (f1) ON t1 TO foo; +GRANT SELECT (f1) ON v1 TO foo; +USE db1; +SELECT f1 FROM t1; +f1 +SELECT f2 FROM t1; +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 't1' +SELECT * FROM t1; +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1' +SELECT f1 FROM v1; +f1 +SELECT f2 FROM v1; +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 'v1' +SELECT * FROM v1; +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'v1' +USE test; +REVOKE SELECT (f1) ON db1.t1 FROM foo; +REVOKE SELECT (f1) ON db1.v1 FROM foo; +DROP USER foo; +DROP VIEW db1.v1; +DROP TABLE db1.t1; +DROP DATABASE db1; End of 5.0 tests. DROP VIEW IF EXISTS v1; DROP TABLE IF EXISTS t1; |