From 0e53aad72b38e7004f42fdb6b926a70a0fe03214 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 17 Sep 2004 13:23:57 +0300 Subject: Do not try use fields examples is expression and fiend used or SET/ENUM field used in types merging procedure (BUG#5618) mysql-test/r/union.result: merging ENUM and SET fields in one UNION mysql-test/t/union.test: merging ENUM and SET fields in one UNION --- mysql-test/t/union.test | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/t/union.test') diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 263f631a65f..c5e72e85835 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -575,3 +575,23 @@ PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION (SELECT * FROM t1 AS PARTITIONED, t2 AS PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1); drop table t1,t2; + +# +# merging ENUM and SET fields in one UNION +# +create table t1 (a ENUM('Yes', 'No') NOT NULL); +create table t2 (a ENUM('aaa', 'bbb') NOT NULL); +insert into t1 values ('No'); +insert into t2 values ('bbb'); +create table t3 (a SET('Yes', 'No') NOT NULL); +create table t4 (a SET('aaa', 'bbb') NOT NULL); +insert into t3 values (1); +insert into t4 values (3); +select "1" as a union select a from t1; +select a as a from t1 union select "1"; +select a as a from t2 union select a from t1; +select "1" as a union select a from t3; +select a as a from t3 union select "1"; +select a as a from t4 union select a from t3; +select a as a from t1 union select a from t4; +drop table t1,t2,t3,t4; -- cgit v1.2.1