1
0
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:
bar@mysql.com
2006-03-01 17:58:01 +04:00
parent e75a62aeae
commit a6973ceed0
3 changed files with 22 additions and 3 deletions

View File

@@ -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;