diff options
author | unknown <jimw@mysql.com> | 2005-02-04 11:59:02 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-02-04 11:59:02 -0800 |
commit | 1be345edc0cc351029dc207d836ced1742bdfd8d (patch) | |
tree | 51df5e0d0334e67749bc68845ba7a952061390a5 /mysql-test/t/union.test | |
parent | 74ad9e8f1efde5295b9bf0b4bc4a3331d0faab4f (diff) | |
parent | 2f91118458995b9fe780aa7a5a664765572cdc30 (diff) | |
download | mariadb-git-1be345edc0cc351029dc207d836ced1742bdfd8d.tar.gz |
Merge changes
client/mysqlcheck.c:
Auto merged
myisam/ft_boolean_search.c:
Auto merged
myisam/ft_static.c:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysql-test/t/union.test:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/ha_myisam.h:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/field.cc:
Clean up merge
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r-- | mysql-test/t/union.test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 6045d8e3c30..be6bc7a48d8 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -682,3 +682,38 @@ show create table t1; drop table t1; drop table t2; +# +# Bug 6931: Date Type column problem when using UNION-Table. +# +create table t1(a1 int, f1 char(10)); +create table t2 +select f2,a1 from (select a1, CAST('2004-12-31' AS DATE) f2 from t1) a +union +select f2,a1 from (select a1, CAST('2004-12-31' AS DATE) f2 from t1) a +order by f2, a1; +show columns from t2; +drop table t1, t2; + +create table t1 (f1 int); +create table t2 (f1 int, f2 int ,f3 date); +create table t3 (f1 int, f2 char(10)); +create table t4 +( + select t2.f3 as sdate + from t1 + left outer join t2 on (t1.f1 = t2.f1) + inner join t3 on (t2.f2 = t3.f1) + order by t1.f1, t3.f1, t2.f3 +) +union +( + select cast('2004-12-31' as date) as sdate + from t1 + left outer join t2 on (t1.f1 = t2.f1) + inner join t3 on (t2.f2 = t3.f1) + group by t1.f1 + order by t1.f1, t3.f1, t2.f3 +) +order by sdate; +show columns from t4; +drop table t1, t2, t3, t4; |