diff options
author | unknown <wax@kishkin.ru> | 2003-06-26 05:06:49 +0600 |
---|---|---|
committer | unknown <wax@kishkin.ru> | 2003-06-26 05:06:49 +0600 |
commit | 6350e8c14cd3560f264a28c37fa46286f835c867 (patch) | |
tree | a464107c8a1f6dc2e6b90378bbfc621a4cbb539d /mysql-test | |
parent | 2534f837c177eda645ec45864b58fa5b44b1c083 (diff) | |
parent | a58c324a132ec2d3f3382c79b7a56a3aff4220f8 (diff) | |
download | mariadb-git-6350e8c14cd3560f264a28c37fa46286f835c867.tar.gz |
Merge kishkin.ru:/home/wax/mysql-4.1 into kishkin.ru:/home/wax/mysql-4g
sql/field.h:
Auto merged
sql/item_sum.cc:
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 51b61dbb3e6..bf96727a6a7 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; ERROR HY000: Invalid use of group function select grp,group_concat(c order by 2) from t1 group by grp; ERROR 42S22: 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; |