~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/union.result

  • Committer: Brian Aker
  • Date: 2010-02-25 07:54:52 UTC
  • mfrom: (1273.13.101 build)
  • Revision ID: brian@gaz-20100225075452-19eozreshbrerypu
Merge of all patches in build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1102
1102
select f2,a1 from (select a1, CAST('2004-12-31' AS DATE) f2 from t1) a
1103
1103
order by f2, a1;
1104
1104
show columns from t2;
1105
 
Field   Type    Null    Key     Default Extra
1106
 
f2      date    YES             NULL    
1107
 
a1      int     YES             NULL    
 
1105
Field   Type    Null    Default Default is NULL On Update
 
1106
f2      DATE    TRUE            TRUE    
 
1107
a1      INTEGER TRUE            TRUE    
1108
1108
drop table t1, t2;
1109
1109
create table t1 (f1 int);
1110
1110
create table t2 (f1 int, f2 int ,f3 date);
1128
1128
)
1129
1129
order by sdate;
1130
1130
show columns from t4;
1131
 
Field   Type    Null    Key     Default Extra
1132
 
sdate   date    YES             NULL    
 
1131
Field   Type    Null    Default Default is NULL On Update
 
1132
sdate   DATE    TRUE            TRUE    
1133
1133
drop table t1, t2, t3, t4;
1134
1134
create table t1 (a int not null, b char (10) not null);
1135
1135
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
1438
1438
INSERT INTO t1 VALUES (1), (2), (3);
1439
1439
CREATE TABLE t2 SELECT * FROM (SELECT NULL) a UNION SELECT a FROM t1;
1440
1440
DESC t2;
1441
 
Field   Type    Null    Key     Default Extra
1442
 
NULL    int     YES             NULL    
 
1441
Field   Type    Null    Default Default is NULL On Update
 
1442
NULL    INTEGER TRUE            TRUE    
1443
1443
CREATE TABLE t3 SELECT a FROM t1 UNION SELECT * FROM (SELECT NULL) a;
1444
1444
DESC t3;
1445
 
Field   Type    Null    Key     Default Extra
1446
 
a       int     YES             NULL    
 
1445
Field   Type    Null    Default Default is NULL On Update
 
1446
a       INTEGER TRUE            TRUE    
1447
1447
CREATE TABLE t4 SELECT NULL;
1448
1448
DESC t4;
1449
 
Field   Type    Null    Key     Default Extra
1450
 
NULL    varbinary(0)    YES             NULL    
 
1449
Field   Type    Null    Default Default is NULL On Update
 
1450
NULL    VARCHAR TRUE            TRUE    
1451
1451
CREATE TABLE t5 SELECT NULL UNION SELECT NULL;
1452
1452
DESC t5;
1453
 
Field   Type    Null    Key     Default Extra
1454
 
NULL    varbinary(0)    YES             NULL    
 
1453
Field   Type    Null    Default Default is NULL On Update
 
1454
NULL    VARCHAR TRUE            TRUE    
1455
1455
CREATE TABLE t6 
1456
1456
SELECT * FROM (SELECT * FROM (SELECT NULL)a) b UNION SELECT a FROM t1;
1457
1457
DESC t6;
1458
 
Field   Type    Null    Key     Default Extra
1459
 
NULL    int     YES             NULL    
 
1458
Field   Type    Null    Default Default is NULL On Update
 
1459
NULL    INTEGER TRUE            TRUE    
1460
1460
DROP TABLE t1, t2, t3, t4, t5, t6;
1461
1461
End of 5.0 tests