summaryrefslogtreecommitdiff
path: root/mysql-test/t/view_grant.test
diff options
context:
space:
mode:
authorunknown <gkodinov@mysql.com>2006-06-21 13:01:00 +0300
committerunknown <gkodinov@mysql.com>2006-06-21 13:01:00 +0300
commitea3392fb976298d4e4451daaeab6d064c77df741 (patch)
tree04301c0d79e47f38108c99ac604793d0f5422f8b /mysql-test/t/view_grant.test
parent5a3d028776d2a629728412cb201266878ed85db6 (diff)
downloadmariadb-git-ea3392fb976298d4e4451daaeab6d064c77df741.tar.gz
manual merge
mysql-test/r/view_grant.result: merged mysql-test/t/view_grant.test: merged
Diffstat (limited to 'mysql-test/t/view_grant.test')
-rw-r--r--mysql-test/t/view_grant.test38
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test
index 9d23bfa6197..429a2af6bac 100644
--- a/mysql-test/t/view_grant.test
+++ b/mysql-test/t/view_grant.test
@@ -809,6 +809,44 @@ 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;
+#
# BUG#20482: failure on Create join view with sources views/tables
# in different schemas
#