mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
func_gconcat.result, func_gconcat.test:
Adding test item_sum.cc: Adding a call for collation/charset aggregation, to collect attributes from the arguments. The actual bug fix. item_func.h, item_func.cc, item.h, item.cc: - Removing collation aggrgation functions from Item_func class in item.cc, and adding it as non-class functions in item.cc to be able to reuse this code for group_concat. - Adding replacement for these functions into Item_func class as wrappers for moved functions, to minizize patch size, sql/item.cc: - Removing collation aggrgation functions from Item_func class in item.cc, and adding it as non-class functions in item.cc to be able to reuse this code for group_concat. - Adding replacement for these functions into Item_func class as wrappers for moved functions, to minizize patch size, sql/item.h: - Removing collation aggrgation functions from Item_func class in item.cc, and adding it as non-class functions in item.cc to be able to reuse this code for group_concat. - Adding replacement for these functions into Item_func class as wrappers for moved functions, to minizize patch size, sql/item_func.cc: - Removing collation aggrgation functions from Item_func class in item.cc, and adding it as non-class functions in item.cc to be able to reuse this code for group_concat. - Adding replacement for these functions into Item_func class as wrappers for moved functions, to minizize patch size, sql/item_func.h: - Removing collation aggrgation functions from Item_func class in item.cc, and adding it as non-class functions in item.cc to be able to reuse this code for group_concat. - Adding replacement for these functions into Item_func class as wrappers for moved functions, to minizize patch size, sql/item_sum.cc: Adding a call for collation/charset aggregation, to collect attributes from the arguments. The actual bug fix. mysql-test/t/func_gconcat.test: Adding test mysql-test/r/func_gconcat.result: Adding test
This commit is contained in:
@ -445,6 +445,30 @@ group_concat(distinct b order by b)
|
||||
Warnings:
|
||||
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
|
||||
drop table t1;
|
||||
create table t1 (a varchar(255) character set cp1250 collate cp1250_general_ci,
|
||||
b varchar(255) character set koi8r);
|
||||
insert into t1 values ('xxx','yyy');
|
||||
select collation(a) from t1;
|
||||
collation(a)
|
||||
cp1250_general_ci
|
||||
select collation(group_concat(a)) from t1;
|
||||
collation(group_concat(a))
|
||||
cp1250_general_ci
|
||||
create table t2 select group_concat(a) as a from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` longtext character set cp1250
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
select collation(group_concat(a,_koi8r'test')) from t1;
|
||||
collation(group_concat(a,_koi8r'test'))
|
||||
cp1250_general_ci
|
||||
select collation(group_concat(a,_koi8r 0xC1C2)) from t1;
|
||||
ERROR HY000: Illegal mix of collations (cp1250_general_ci,IMPLICIT) and (koi8r_general_ci,COERCIBLE) for operation 'group_concat'
|
||||
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 (id int);
|
||||
SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
|
||||
gc
|
||||
|
Reference in New Issue
Block a user