diff options
author | unknown <gkodinov/kgeorge@macbook.gmz> | 2008-01-09 16:49:13 +0200 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.gmz> | 2008-01-09 16:49:13 +0200 |
commit | 06b68454eadd20cbc2af5b2bfa8389e85120c0a3 (patch) | |
tree | 3cc97ab38bc2e07f0427ff5d412eab18772463e8 /mysql-test/t/func_group.test | |
parent | 1cdd95f7d1a27723c1ae1d3a6f457a0042b44795 (diff) | |
download | mariadb-git-06b68454eadd20cbc2af5b2bfa8389e85120c0a3.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.
mysql-test/r/func_group.result:
Bug #33133: test case
mysql-test/t/func_group.test:
Bug #33133: test case
sql/sql_base.cc:
Bug #33133: allow qualified alias refs to view fields
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r-- | mysql-test/t/func_group.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 25cb13a2f75..75a380c733f 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -901,5 +901,20 @@ SELECT COUNT(*), a FROM t1; DROP TABLE t1; +# +# Bug #33133: Views are not transparent +# + +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; + +DROP VIEW v1; +DROP TABLE t1; +SET SQL_MODE=DEFAULT; + ### --echo End of 5.0 tests |