diff options
author | unknown <stewart@mysql.com> | 2006-06-16 18:54:20 +1000 |
---|---|---|
committer | unknown <stewart@mysql.com> | 2006-06-16 18:54:20 +1000 |
commit | 61f4440c294a371a4b86ab0cf047708421445898 (patch) | |
tree | 3fa3173b664e6183d16f050c2da2d0838a1a2c2b /mysql-test/t/view_grant.test | |
parent | 8128470913e76a508d028fc2f2a2feb0163934a6 (diff) | |
parent | 9668198e14d575a12dd889a601233924b1f13479 (diff) | |
download | mariadb-git-61f4440c294a371a4b86ab0cf047708421445898.tar.gz |
Merge mysql.com:/home/stewart/Documents/MySQL/5.0/main
into mysql.com:/home/stewart/Documents/MySQL/5.1/main
mysql-test/r/ndb_condition_pushdown.result:
Auto merged
mysql-test/r/type_newdecimal.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/ndb_condition_pushdown.test:
Auto merged
mysql-test/t/type_newdecimal.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/valgrind.supp:
Manual merge
Diffstat (limited to 'mysql-test/t/view_grant.test')
-rw-r--r-- | mysql-test/t/view_grant.test | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test index aa420689149..2a1977702c2 100644 --- a/mysql-test/t/view_grant.test +++ b/mysql-test/t/view_grant.test @@ -813,3 +813,42 @@ SELECT * FROM v; DROP VIEW v; DROP TABLE t1; USE test; + +# +# Bug#20363: Create view on just created view is now denied +# +eval CREATE USER mysqltest_db1@localhost identified by 'PWD'; +eval GRANT ALL ON mysqltest_db1.* TO mysqltest_db1@localhost WITH GRANT OPTION; + +# The session with the non root user is needed. +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (session1,localhost,mysqltest_db1,PWD,test); + +CREATE SCHEMA mysqltest_db1 ; +USE mysqltest_db1 ; + +CREATE TABLE t1 (f1 INTEGER); + +CREATE VIEW view1 AS +SELECT * FROM t1; +SHOW CREATE VIEW view1; + +CREATE VIEW view2 AS +SELECT * FROM view1; +--echo # Here comes a suspicious warning +SHOW CREATE VIEW view2; +--echo # But the view view2 is usable +SELECT * FROM view2; + +CREATE VIEW view3 AS +SELECT * FROM view2; + +SELECT * from view3; + +connection default; +DROP VIEW mysqltest_db1.view3; +DROP VIEW mysqltest_db1.view2; +DROP VIEW mysqltest_db1.view1; +DROP TABLE mysqltest_db1.t1; +DROP SCHEMA mysqltest_db1; +DROP USER mysqltest_db1@localhost; |