From 879878e43d5ffd2bf4d18ffe4d0186f8926e58ca Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Thu, 2 May 2019 14:38:43 +0530 Subject: 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 --- mysql-test/main/func_gconcat.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/main/func_gconcat.test') 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 @@ -985,6 +985,18 @@ prepare STMT from 'select group_concat(a,b limit ?) from t2'; 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 # -- cgit v1.2.1