diff options
author | unknown <wax@kishkin.ru> | 2003-06-03 17:07:46 +0600 |
---|---|---|
committer | unknown <wax@kishkin.ru> | 2003-06-03 17:07:46 +0600 |
commit | 284a6abeea27640bf7a726c06c90c5af9db09cf7 (patch) | |
tree | f843ad0e54bde2b08179141dbc0431f17a5aefd6 /mysql-test | |
parent | 27d95e9687e840c98235a89ff7aea880bb905f44 (diff) | |
parent | fbd157fa5754c5c1dac01ad824531aeb434426d7 (diff) | |
download | mariadb-git-284a6abeea27640bf7a726c06c90c5af9db09cf7.tar.gz |
Merge kishkin.ru:/home/wax/mysql-4n into kishkin.ru:/home/wax/mysql-4g
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_gconcat.result | 20 | ||||
-rw-r--r-- | mysql-test/t/func_gconcat.test | 16 |
2 files changed, 34 insertions, 2 deletions
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 0dc84f090f1..f2246f2e514 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -154,8 +154,26 @@ Warning 1258 1 line(s) was(were) cut by group_concat() show warnings; Level Code Message Warning 1258 1 line(s) was(were) cut by group_concat() +set group_concat_max_len = 1024; +drop table if exists T_URL; +Warnings: +Note 1051 Unknown table 'T_URL' +create table T_URL ( URL_ID int(11), URL varchar(80)); +drop table if exists T_REQUEST; +Warnings: +Note 1051 Unknown table 'T_REQUEST' +create table T_REQUEST ( REQ_ID int(11), URL_ID int(11)); +insert into T_URL values (4,'www.host.com'), (5,'www.google.com'),(5,'www.help.com'); +insert into T_REQUEST values (1,4), (5,4), (5,5); +select REQ_ID, Group_Concat(URL) as URL from T_URL, T_REQUEST where +T_REQUEST.URL_ID = T_URL.URL_ID group by REQ_ID; +REQ_ID URL +1 www.host.com +5 www.host.com,www.google.com,www.help.com +drop table T_URL; +drop table T_REQUEST; select group_concat(sum(a)) from t1 group by grp; Invalid use of group function select grp,group_concat(c order by 2) from t1 group by grp; Unknown column '2' in 'group statement' -drop table if exists t1; +drop table t1; diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 0a95410e842..a5a7abe3b01 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -68,6 +68,20 @@ select grp,group_concat(c order by c) from t1 group by grp; set group_concat_max_len = 5; select grp,group_concat(c) from t1 group by grp; show warnings; +set group_concat_max_len = 1024; + +# Test variable length + +drop table if exists T_URL; +create table T_URL ( URL_ID int(11), URL varchar(80)); +drop table if exists T_REQUEST; +create table T_REQUEST ( REQ_ID int(11), URL_ID int(11)); +insert into T_URL values (4,'www.host.com'), (5,'www.google.com'),(5,'www.help.com'); +insert into T_REQUEST values (1,4), (5,4), (5,5); +select REQ_ID, Group_Concat(URL) as URL from T_URL, T_REQUEST where +T_REQUEST.URL_ID = T_URL.URL_ID group by REQ_ID; +drop table T_URL; +drop table T_REQUEST; # Test errors @@ -76,4 +90,4 @@ select group_concat(sum(a)) from t1 group by grp; --error 1054 select grp,group_concat(c order by 2) from t1 group by grp; -drop table if exists t1; +drop table t1; |