diff options
author | bell@sanja.is.com.ua <> | 2004-09-17 13:23:57 +0300 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2004-09-17 13:23:57 +0300 |
commit | d2474ee2e58fe2dea6adff6a9f47987f07811ea0 (patch) | |
tree | beabd49788868b6e0aaa1150c108f4da4e3d7e9e /mysql-test/t/union.test | |
parent | c12c9af2249034f4fb2e9c79800e9900301934e2 (diff) | |
download | mariadb-git-d2474ee2e58fe2dea6adff6a9f47987f07811ea0.tar.gz |
Do not try use fields examples is expression and fiend used or SET/ENUM field used in types merging procedure (BUG#5618)
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; |