summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_group.result
diff options
context:
space:
mode:
authorgkodinov/kgeorge@macbook.gmz <>2008-01-09 16:49:13 +0200
committergkodinov/kgeorge@macbook.gmz <>2008-01-09 16:49:13 +0200
commit2fc45f017d511ea2386a8c0417eadeab849f3de6 (patch)
tree3cc97ab38bc2e07f0427ff5d412eab18772463e8 /mysql-test/r/func_group.result
parent0e3e5cf40d310751eac8ff9109b9a768c2096a7a (diff)
downloadmariadb-git-2fc45f017d511ea2386a8c0417eadeab849f3de6.tar.gz
Bug #33133: Views are not transparent
When resolving references we need to take into consideration the view "fields" and allow qualified access to them. Fixed by extending the reference resolution to process view fields correctly.
Diffstat (limited to 'mysql-test/r/func_group.result')
-rw-r--r--mysql-test/r/func_group.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 1e130877088..4785ca9919d 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1407,4 +1407,16 @@ SELECT COUNT(*), a FROM t1;
COUNT(*) a
4 1
DROP TABLE t1;
+set SQL_MODE=ONLY_FULL_GROUP_BY;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+CREATE VIEW v1 AS SELECT a,(a + 1) AS y FROM t1;
+EXPLAIN EXTENDED SELECT y FROM v1 GROUP BY v1.y;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
+Warnings:
+Note 1003 select (`test`.`t1`.`a` + 1) AS `y` from `test`.`t1` group by (`test`.`t1`.`a` + 1)
+DROP VIEW v1;
+DROP TABLE t1;
+SET SQL_MODE=DEFAULT;
End of 5.0 tests