summaryrefslogtreecommitdiff
path: root/mysql-test/r/view_grant.result
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-08-20 17:11:22 +0300
committerGeorgi Kodinov <joro@sun.com>2009-08-20 17:11:22 +0300
commit1317d24b333ecf9e2b9669455c337ceec4b228bf (patch)
tree7f9becefd5fd85f099cf01731039060ba43c0092 /mysql-test/r/view_grant.result
parent4b6f5f530f06300a06794d41c96f412cf11325a7 (diff)
parent0665536995fa1afe4ac71e13451dd8258063ff36 (diff)
downloadmariadb-git-1317d24b333ecf9e2b9669455c337ceec4b228bf.tar.gz
merge of bug #46019 to 5.1-bugteam
Diffstat (limited to 'mysql-test/r/view_grant.result')
-rw-r--r--mysql-test/r/view_grant.result24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index 7e280fa2fe5..6d1d872c3b7 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -947,6 +947,30 @@ DROP USER foo;
DROP VIEW db1.v1;
DROP TABLE db1.t1;
DROP DATABASE db1;
+#
+# Bug #46019: ERROR 1356 When selecting from within another
+# view that has Group By
+#
+CREATE DATABASE db1;
+USE db1;
+CREATE TABLE t1 (a INT);
+CREATE SQL SECURITY INVOKER VIEW v1 AS
+SELECT a FROM t1 GROUP BY a;
+CREATE SQL SECURITY INVOKER VIEW v2 AS
+SELECT a FROM v1;
+CREATE USER u1;
+GRANT SELECT ON TABLE t1 TO u1;
+GRANT SELECT, SHOW VIEW ON TABLE v1 TO u1;
+GRANT SELECT, SHOW VIEW ON TABLE v2 TO u1;
+SELECT a FROM v1;
+a
+SELECT a FROM v2;
+a
+DROP USER u1;
+DROP VIEW v1,v2;
+DROP TABLE t1;
+USE test;
+DROP DATABASE db1;
End of 5.0 tests.
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;