summaryrefslogtreecommitdiff
path: root/mysql-test/t/view_grant.test
diff options
context:
space:
mode:
authorunknown <gkodinov@dl145s.mysql.com>2006-11-29 15:24:51 +0100
committerunknown <gkodinov@dl145s.mysql.com>2006-11-29 15:24:51 +0100
commit56219e755e47dd81e4d75200b312725745c0866e (patch)
tree08d8ff637f1797cf18d33512f3298e4827c4f019 /mysql-test/t/view_grant.test
parent5cad510490ee56630f667af6091702116086332a (diff)
parent5e4dc47a62c7e3c810cfd7f19f6b756f65a112bc (diff)
downloadmariadb-git-56219e755e47dd81e4d75200b312725745c0866e.tar.gz
Merge dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.0-opt
into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.1-opt mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/r/view_grant.result: Auto merged mysql-test/t/group_min_max.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/view_grant.test: Auto merged sql/opt_range.cc: Auto merged sql/sql_base.cc: Auto merged sql/table.cc: Auto merged
Diffstat (limited to 'mysql-test/t/view_grant.test')
-rw-r--r--mysql-test/t/view_grant.test37
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test
index 39444a97984..5c920a2fc4c 100644
--- a/mysql-test/t/view_grant.test
+++ b/mysql-test/t/view_grant.test
@@ -933,4 +933,41 @@ DROP VIEW v2;
DROP VIEW v1;
DROP USER mysqltest_u1@localhost;
+#
+# Bug#17254: Error for DEFINER security on VIEW provides too much info
+#
+connect (root,localhost,root,,);
+connection root;
+CREATE DATABASE db17254;
+USE db17254;
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (10),(20);
+CREATE USER def_17254@localhost;
+GRANT SELECT ON db17254.* TO def_17254@localhost;
+CREATE USER inv_17254@localhost;
+GRANT SELECT ON db17254.t1 TO inv_17254@localhost;
+GRANT CREATE VIEW ON db17254.* TO def_17254@localhost;
+
+connect (def,localhost,def_17254,,db17254);
+connection def;
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+connection root;
+DROP USER def_17254@localhost;
+
+connect (inv,localhost,inv_17254,,db17254);
+connection inv;
+--echo for a user
+--error 1142
+SELECT * FROM v1;
+
+connection root;
+--echo for a superuser
+--error 1449
+SELECT * FROM v1;
+DROP USER inv_17254@localhost;
+DROP DATABASE db17254;
+disconnect def;
+disconnect inv;
+
# End of 5.0 tests.