diff options
author | Georgi Kodinov <kgeorge@mysql.com> | 2009-02-25 12:19:29 +0200 |
---|---|---|
committer | Georgi Kodinov <kgeorge@mysql.com> | 2009-02-25 12:19:29 +0200 |
commit | 620438fdaef079216609bfcb0a8cb7b58c950e1e (patch) | |
tree | b87b94d4e99c05d39b544d049937c8e376a8e9dc /mysql-test/r/view_grant.result | |
parent | e60b9650c0ec3e956141710bd141d001abb831fb (diff) | |
download | mariadb-git-620438fdaef079216609bfcb0a8cb7b58c950e1e.tar.gz |
backport the fix for bug #37191 to 5.1-bugteam
Diffstat (limited to 'mysql-test/r/view_grant.result')
-rw-r--r-- | mysql-test/r/view_grant.result | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 1821e50e294..3e280e47bee 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -956,6 +956,27 @@ Warnings: Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them DROP VIEW v1; DROP TABLE t1; +CREATE USER mysqluser1@localhost; +CREATE DATABASE mysqltest1; +USE mysqltest1; +CREATE TABLE t1 ( a INT ); +CREATE TABLE t2 ( b INT ); +INSERT INTO t1 VALUES (1), (2); +INSERT INTO t2 VALUES (1), (2); +GRANT CREATE VIEW ON mysqltest1.* TO mysqluser1@localhost; +GRANT SELECT ON t1 TO mysqluser1@localhost; +GRANT INSERT ON t2 TO mysqluser1@localhost; +This would lead to failed assertion. +CREATE VIEW v1 AS SELECT a, b FROM t1, t2; +SELECT * FROM v1; +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1' +SELECT b FROM v1; +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1' +DROP TABLE t1, t2; +DROP VIEW v1; +DROP DATABASE mysqltest1; +DROP USER mysqluser1@localhost; +USE test; End of 5.1 tests. CREATE USER mysqluser1@localhost; CREATE DATABASE mysqltest1; |