summaryrefslogtreecommitdiff
path: root/mysql-test/t/view_grant.test
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-03-23 00:09:12 +0400
committerunknown <holyfoot/hf@hfmain.(none)>2007-03-23 00:09:12 +0400
commit646b2cbb8f941d5e5542b09ae24180c5bb39c58f (patch)
tree76cf679fd607f9683c09454e81480f5c0930410d /mysql-test/t/view_grant.test
parent2c5395eedb85105f8ad7d58c0ce1902807dc0948 (diff)
parent3206447b02bf858bbc9175c9baad4d47c452f7b1 (diff)
downloadmariadb-git-646b2cbb8f941d5e5542b09ae24180c5bb39c58f.tar.gz
Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt mysql-test/r/view_grant.result: Auto merged mysql-test/t/view_grant.test: Auto merged sql/sql_view.cc: Auto merged
Diffstat (limited to 'mysql-test/t/view_grant.test')
-rw-r--r--mysql-test/t/view_grant.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test
index a4a1cefd0aa..acdfec90601 100644
--- a/mysql-test/t/view_grant.test
+++ b/mysql-test/t/view_grant.test
@@ -1040,5 +1040,36 @@ DROP DATABASE mysqltest_db2;
DROP USER mysqltest_u1@localhost;
DROP USER mysqltest_u2@localhost;
+#
+# Bug#26813: The SUPER privilege is wrongly required to alter a view created
+# by another user.
+#
+connection root;
+CREATE DATABASE db26813;
+USE db26813;
+CREATE TABLE t1(f1 INT, f2 INT);
+CREATE VIEW v1 AS SELECT f1 FROM t1;
+CREATE VIEW v2 AS SELECT f1 FROM t1;
+CREATE VIEW v3 AS SELECT f1 FROM t1;
+CREATE USER u26813@localhost;
+GRANT DROP ON db26813.v1 TO u26813@localhost;
+GRANT CREATE VIEW ON db26813.v2 TO u26813@localhost;
+GRANT DROP, CREATE VIEW ON db26813.v3 TO u26813@localhost;
+GRANT SELECT ON db26813.t1 TO u26813@localhost;
+
+connect (u1,localhost,u26813,,db26813);
+connection u1;
+--error 1142
+ALTER VIEW v1 AS SELECT f2 FROM t1;
+--error 1142
+ALTER VIEW v2 AS SELECT f2 FROM t1;
+ALTER VIEW v3 AS SELECT f2 FROM t1;
+
+connection root;
+SHOW CREATE VIEW v3;
+
+DROP USER u26813@localhost;
+DROP DATABASE db26813;
+disconnect u1;
--echo End of 5.0 tests.