diff options
author | gkodinov/kgeorge@macbook.gmz <> | 2006-07-25 11:45:10 +0300 |
---|---|---|
committer | gkodinov/kgeorge@macbook.gmz <> | 2006-07-25 11:45:10 +0300 |
commit | 9380bb837f58d45cff35a9f61a5e78f0028b1177 (patch) | |
tree | 4f46bbdaea88db32a194b6e66baa82a41c8894c9 /mysql-test/r/func_gconcat.result | |
parent | ece5fff44e6ccdfdf2f54387fd62314d93ee1fb2 (diff) | |
download | mariadb-git-9380bb837f58d45cff35a9f61a5e78f0028b1177.tar.gz |
Bug#16712: group_concat returns odd srting insead of intended result
when calculating GROUP_CONCAT all blob fields are transformed
to varchar when making the temp table.
However a varchar has at max 2 bytes for length.
This fix makes the conversion only for blobs whose max length
is below that limit.
Otherwise blob field is created by make_string_field() call.
Diffstat (limited to 'mysql-test/r/func_gconcat.result')
-rw-r--r-- | mysql-test/r/func_gconcat.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index d8a539da3fe..dc09a68682c 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -641,3 +641,16 @@ select charset(group_concat(c1 order by c2)) from t1; charset(group_concat(c1 order by c2)) latin1 drop table t1; +CREATE TABLE t1 (a INT(10), b LONGTEXT, PRIMARY KEY (a)); +SET GROUP_CONCAT_MAX_LEN = 20000000; +INSERT INTO t1 VALUES (1,REPEAT(CONCAT('A',CAST(CHAR(0) AS BINARY),'B'), 40000)); +INSERT INTO t1 SELECT a + 1, b FROM t1; +SELECT a, CHAR_LENGTH(b) FROM t1; +a CHAR_LENGTH(b) +1 120000 +2 120000 +SELECT CHAR_LENGTH( GROUP_CONCAT(b) ) FROM t1; +CHAR_LENGTH( GROUP_CONCAT(b) ) +240001 +SET GROUP_CONCAT_MAX_LEN = 1024; +DROP TABLE t1; |