summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-07-25 12:57:23 -0700
committerunknown <igor@rurik.mysql.com>2005-07-25 12:57:23 -0700
commit1c3f8cc214db5d487ea275dbbc9ec24712050fd3 (patch)
tree4f5f2513b048293936bbcdb418a9b120f937ffa5 /mysql-test/r
parent9a0d9c35697c250f3136b1cb7b6a184cef3c6d45 (diff)
downloadmariadb-git-1c3f8cc214db5d487ea275dbbc9ec24712050fd3.tar.gz
sql_select.cc:
Fixed bug #11412. Reversed the patch of cs 1.1934 for the function create_tmp_table. Modified the function to support tem_ref objects created for view fields. item_buff.cc: Fixed bug #11412. Modified implementation of new_Cached_item to support cacheing of view fields. item.h: Fixed bug #11412. Changed implementation of Item_ref::get_tmp_table_field and added Item_ref::get_tmp_table_item to support Item_ref objects created for view fields. view.test, view.result: Added a test case for bug #11412. mysql-test/r/view.result: Added a test case for bug #11412. mysql-test/t/view.test: Added a test case for bug #11412. sql/item.h: Fixed bug #11412. Changed implementation of Item_ref::get_tmp_table_field and added Item_ref::get_tmp_table_item to support Item_ref objects created for view fields. sql/item_buff.cc: Fixed bug #11412. Modified implementation of new_Cached_item to support cacheing of view fields. sql/sql_select.cc: Fixed bug #11412. Reversed the patch of cs 1.1934 for the function create_tmp_table. Modified the function to support tem_ref objects created for view fields.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/view.result23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index c8078a0604e..730e180cbd9 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2024,3 +2024,26 @@ f1 sb
2005-01-01 12:00:00 2005-01-01 10:58:59
drop view v1;
drop table t1;
+CREATE TABLE t1 (
+aid int PRIMARY KEY,
+fn varchar(20) NOT NULL,
+ln varchar(20) NOT NULL
+);
+CREATE TABLE t2 (
+aid int NOT NULL,
+pid int NOT NULL
+);
+INSERT INTO t1 VALUES(1,'a','b'), (2,'c','d');
+INSERT INTO t2 values (1,1), (2,1), (2,2);
+CREATE VIEW v1 AS SELECT t1.*,t2.pid FROM t1,t2 WHERE t1.aid = t2.aid;
+SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM t1,t2
+WHERE t1.aid = t2.aid GROUP BY pid;
+pid GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1)
+1 a b,c d
+2 c d
+SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM v1 GROUP BY pid;
+pid GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1)
+1 a b,c d
+2 c d
+DROP VIEW v1;
+DROP TABLE t1,t2;