diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2019-05-02 14:38:43 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2019-05-03 08:50:40 +0530 |
commit | 879878e43d5ffd2bf4d18ffe4d0186f8926e58ca (patch) | |
tree | 7f21d3d6b599d24d83fe00f597fd513095fa80be /mysql-test/main | |
parent | 5182348316bfe5a3b78484caf76875a5aaa77f5f (diff) | |
download | mariadb-git-879878e43d5ffd2bf4d18ffe4d0186f8926e58ca.tar.gz |
MDEV-18943: Group Concat with limit not working with views
Adjusted the Item_func_group_concat::print function to take into account
limit if present with GROUP_CONCAT
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/func_gconcat.result | 14 | ||||
-rw-r--r-- | mysql-test/main/func_gconcat.test | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/main/func_gconcat.result b/mysql-test/main/func_gconcat.result index 723a1952d79..1701bb364e8 100644 --- a/mysql-test/main/func_gconcat.result +++ b/mysql-test/main/func_gconcat.result @@ -1378,5 +1378,19 @@ group_concat(a,b limit ?) 1a,1b,2x,2y drop table t2; # +# MDEV-18943: Group Concat with limit not working with views +# +create table t1 (a int, b varchar(10)); +insert into t1 values(1,'a'),(1,'b'),(NULL,'c'),(2,'x'),(2,'y'); +select group_concat(a,b limit 2) from t1; +group_concat(a,b limit 2) +1a,1b +create view v1 as select group_concat(a,b limit 2) from t1; +select * from v1; +group_concat(a,b limit 2) +1a,1b +drop view v1; +drop table t1; +# # End of 10.3 tests # diff --git a/mysql-test/main/func_gconcat.test b/mysql-test/main/func_gconcat.test index 5cbc6969e02..b8ab96bdea4 100644 --- a/mysql-test/main/func_gconcat.test +++ b/mysql-test/main/func_gconcat.test @@ -986,5 +986,17 @@ execute STMT using @x; drop table t2; --echo # +--echo # MDEV-18943: Group Concat with limit not working with views +--echo # + +create table t1 (a int, b varchar(10)); +insert into t1 values(1,'a'),(1,'b'),(NULL,'c'),(2,'x'),(2,'y'); +select group_concat(a,b limit 2) from t1; +create view v1 as select group_concat(a,b limit 2) from t1; +select * from v1; +drop view v1; +drop table t1; + +--echo # --echo # End of 10.3 tests --echo # |