summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-03-01 17:58:01 +0400
committerunknown <bar@mysql.com>2006-03-01 17:58:01 +0400
commitc64c108eda29fbcb397a694056708261f2891916 (patch)
tree555d6d5bd61ca7008cffa4a2624c3fe72148fd8e /mysql-test/t/union.test
parenta7abbd918ba952e2f387cec28ed0f74997b14975 (diff)
downloadmariadb-git-c64c108eda29fbcb397a694056708261f2891916.tar.gz
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. sql/item.cc: Allow character set conversion in UNION - string to column's charset - to unicode Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE) mysql-test/t/union.test: Adding test case. mysql-test/r/union.result: Adding test case.
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test11
1 files changed, 10 insertions, 1 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 1f6fc2c8d3b..994546e9d97 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -711,6 +711,15 @@ 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
#
CREATE TABLE t1 (
@@ -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;