diff options
author | unknown <bar@mysql.com> | 2005-09-07 14:57:27 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-09-07 14:57:27 +0500 |
commit | b2c770799cdff62e974583d6c92f50657ba546b1 (patch) | |
tree | a0a4fca657a4f67b74274b1f305cdd52f1e549c9 | |
parent | 44b35dbb0e98f02286121b7b8738027d65256004 (diff) | |
parent | 44e289b45144ffd0afbe50b6ac36b5fb23d68d32 (diff) | |
download | mariadb-git-b2c770799cdff62e974583d6c92f50657ba546b1.tar.gz |
Merge mysql.com:/usr/home/bar/mysql-4.1.b12829
into mysql.com:/usr/home/bar/mysql-5.0
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/item_sum.cc:
Auto merged
-rw-r--r-- | mysql-test/r/func_gconcat.result | 9 | ||||
-rw-r--r-- | mysql-test/t/func_gconcat.test | 10 | ||||
-rw-r--r-- | sql/item_sum.cc | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index c4e8e08929d..1ad412209ad 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -469,6 +469,15 @@ select collation(group_concat(a,b)) from t1; ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,IMPLICIT) for operation 'group_concat' drop table t1; drop table t2; +CREATE TABLE t1 (a CHAR(10) CHARACTER SET cp850); +INSERT INTO t1 VALUES ('À'); +SELECT a FROM t1; +a +À +SELECT GROUP_CONCAT(a) FROM t1; +GROUP_CONCAT(a) +À +DROP TABLE t1; CREATE TABLE t1 (id int); SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL; gc diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 0b61a445270..896c377662b 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -282,6 +282,16 @@ drop table t1; drop table t2; # +# Bug #12829 +# Cannot convert the charset of a GROUP_CONCAT result +# +CREATE TABLE t1 (a CHAR(10) CHARACTER SET cp850); +INSERT INTO t1 VALUES ('À'); +SELECT a FROM t1; +SELECT GROUP_CONCAT(a) FROM t1; +DROP TABLE t1; + +# # bug #7769: group_concat returning null is checked in having # CREATE TABLE t1 (id int); diff --git a/sql/item_sum.cc b/sql/item_sum.cc index f6544d76504..17d82e3fc98 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -3001,6 +3001,7 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref) args, arg_count, MY_COLL_ALLOW_CONV)) return 1; + result.set_charset(collation.collation); result_field= 0; null_value= 1; thd->allow_sum_func= 1; |