diff options
author | unknown <bell@sanja.is.com.ua> | 2004-09-17 13:23:57 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-09-17 13:23:57 +0300 |
commit | f177c76fb226f70be426175f3d53eed557096ba4 (patch) | |
tree | beabd49788868b6e0aaa1150c108f4da4e3d7e9e /mysql-test/t/union.test | |
parent | ca65afeb72e7f514d51b7dcf2cc49e85a3b92677 (diff) | |
download | mariadb-git-f177c76fb226f70be426175f3d53eed557096ba4.tar.gz |
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
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r-- | mysql-test/t/union.test | 20 |
1 files changed, 20 insertions, 0 deletions
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; |