diff options
author | unknown <jimw@mysql.com> | 2005-02-23 17:58:20 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-02-23 17:58:20 -0800 |
commit | a728ad71cf073b9b10080d866e904c9eaa05ab32 (patch) | |
tree | ceabc348388cb8f2c4784cebe1f57fb75adc5b47 /mysql-test | |
parent | 8776230074184a255e8df4c5c4eb45e66fc81fe0 (diff) | |
download | mariadb-git-a728ad71cf073b9b10080d866e904c9eaa05ab32.tar.gz |
Make sure that warning message when GROUP_CONCAT() cuts values is also
updated with the correct number of lines. (Bug #8681)
mysql-test/t/join_outer.test:
Add new regression test
mysql-test/r/join_outer.result:
Add new results
sql/item_sum.cc:
Move cleanup of warning message outside of "if (original)" test or it won't
always get cleaned up.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/join_outer.result | 19 | ||||
-rw-r--r-- | mysql-test/t/join_outer.test | 11 |
2 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index c045aa0d00a..1d15b2ba070 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -816,3 +816,22 @@ id text_id text_data 1 0 0-SV 2 10 10-SV DROP TABLE invoice, text_table; +set group_concat_max_len=5; +create table t1 (a int, b varchar(20)); +create table t2 (a int, c varchar(20)); +insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb"); +insert into t2 values (1,"cccccccccc"),(2,"dddddddddd"); +select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a; +group_concat(t1.b,t2.c) +aaaaa +bbbbb +Warnings: +Warning 1260 2 line(s) were cut by GROUP_CONCAT() +select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a; +group_concat(t1.b,t2.c) +aaaaa +bbbbb +Warnings: +Warning 1260 2 line(s) were cut by GROUP_CONCAT() +drop table t1, t2; +set group_concat_max_len=default; diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index d177a68e685..62e76525d84 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -582,3 +582,14 @@ SELECT invoice.id, invoice.text_id, text_table.text_data WHERE (invoice.id LIKE '%' OR text_table.text_data LIKE '%'); DROP TABLE invoice, text_table; + +# Bug #8681: Bad warning message when group_concat() exceeds max length +set group_concat_max_len=5; +create table t1 (a int, b varchar(20)); +create table t2 (a int, c varchar(20)); +insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb"); +insert into t2 values (1,"cccccccccc"),(2,"dddddddddd"); +select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a; +select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a; +drop table t1, t2; +set group_concat_max_len=default; |