summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-01-31 16:24:11 +0200
committerunknown <bell@sanja.is.com.ua>2005-01-31 16:24:11 +0200
commitc02f4c5b6c1ee39b62a2074db476cde0632d5f62 (patch)
tree0fea402dd290d6b6525343fa1a289cca8b01054c /mysql-test
parentba98de430cd39c89e35407d01bf1c50877ebed02 (diff)
downloadmariadb-git-c02f4c5b6c1ee39b62a2074db476cde0632d5f62.tar.gz
fixed problem with groupping by view (BUG#7116)
mysql-test/r/view.result: view and group_concat() mysql-test/t/view.test: view and group_concat() sql/item.cc: comments added sql/sql_select.cc: fixed ORDER/GROUP BY processing for view support
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/view.result13
-rw-r--r--mysql-test/t/view.test11
2 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index f49d9c2efdb..aa010da7e8f 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -1758,3 +1758,16 @@ SELECT * FROM v2;
C1
drop view v2, v1;
drop table t1, t2;
+create table t1 (col1 char(5),col2 int,col3 int);
+insert into t1 values ('one',10,25), ('two',10,50), ('two',10,50), ('one',20,25), ('one',30,25);
+create view v1 as select * from t1;
+select col1,group_concat(col2,col3) from t1 group by col1;
+col1 group_concat(col2,col3)
+one 1025,2025,3025
+two 1050,1050
+select col1,group_concat(col2,col3) from v1 group by col1;
+col1 group_concat(col2,col3)
+two 1025,2025,3025
+two 1050,1050
+drop view v1;
+drop table t1;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 6c855f124ff..3a60f538a31 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -1690,3 +1690,14 @@ CREATE VIEW v2 AS SELECT C1 FROM t1 LEFT OUTER JOIN v1 USING (C2);
SELECT * FROM v2;
drop view v2, v1;
drop table t1, t2;
+
+#
+# view and group_concat() (BUG#7116)
+#
+create table t1 (col1 char(5),col2 int,col3 int);
+insert into t1 values ('one',10,25), ('two',10,50), ('two',10,50), ('one',20,25), ('one',30,25);
+create view v1 as select * from t1;
+select col1,group_concat(col2,col3) from t1 group by col1;
+select col1,group_concat(col2,col3) from v1 group by col1;
+drop view v1;
+drop table t1;