diff options
author | evgen@moonbone.local <> | 2006-04-12 23:05:38 +0400 |
---|---|---|
committer | evgen@moonbone.local <> | 2006-04-12 23:05:38 +0400 |
commit | ac54aa2aee9557746ac902fab156b12b4f84a03c (patch) | |
tree | f083605a57e3ffde293d12350970584f01465821 /mysql-test/t/func_gconcat.test | |
parent | b4980d43830040ae950e36d7dc71398bf613a575 (diff) | |
download | mariadb-git-ac54aa2aee9557746ac902fab156b12b4f84a03c.tar.gz |
Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was
used
In a simple queries a result of the GROUP_CONCAT() function was always of
varchar type.
But if length of GROUP_CONCAT() result is greater than 512 chars and temporary
table is used during select then the result is converted to blob, due to
policy to not to store fields longer than 512 chars in tmp table as varchar
fields.
In order to provide consistent behaviour, result of GROUP_CONCAT() now
will always be converted to blob if it is longer than 512 chars.
Item_func_group_concat::field_type() is modified accordingly.
Diffstat (limited to 'mysql-test/t/func_gconcat.test')
-rw-r--r-- | mysql-test/t/func_gconcat.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index f116aa6f164..1bb49a312b8 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -390,4 +390,14 @@ insert into t1 values(1),(2),(3); select f1, group_concat(f1+1) from t1 group by f1 with rollup; select count(distinct (f1+1)) from t1 group by f1 with rollup; drop table t1; + +# +# Bug#14169 type of group_concat() result changed to blob if tmp_table was used +# +create table t1 (f1 int unsigned, f2 varchar(255)); +insert into t1 values (1,repeat('a',255)),(2,repeat('b',255)); +--enable_metadata +select f2,group_concat(f1) from t1 group by f2; +select f2,group_concat(f1) from t1 group by f2 order by 2; +--disable_metadata # End of 4.1 tests |