mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
union.result, union.test: Adding test case. item.cc: Allow safe character set conversion in UNION - string constant to column's charset - to unicode Thus, UNION now works the same with CONCAT (and other string functions) in respect of aggregating arguments with different character sets.
This commit is contained in:
@@ -710,6 +710,15 @@ drop table t1;
|
||||
set @val:=6;
|
||||
select concat('value is: ', @val) union select 'some text';
|
||||
|
||||
#
|
||||
# Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
|
||||
#
|
||||
select concat(_latin1'a', _ascii'b' collate ascii_bin);
|
||||
create table t1 (foo varchar(100)) collate ascii_bin;
|
||||
insert into t1 (foo) values ("foo");
|
||||
select foo from t1 union select 'bar' as foo from dual;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Enum merging test
|
||||
#
|
||||
@@ -729,8 +738,8 @@ drop table t2;
|
||||
create table t2 select a from t1 union select a from t1;
|
||||
show columns from t2;
|
||||
drop table t2;
|
||||
-- error 1267
|
||||
create table t2 select a from t1 union select c from t1;
|
||||
drop table t2;
|
||||
create table t2 select a from t1 union select b from t1;
|
||||
show columns from t2;
|
||||
drop table t2, t1;
|
||||
|
||||
Reference in New Issue
Block a user