~linuxjedi/drizzle/one-more-stab-at-boolean

« back to all changes in this revision

Viewing changes to tests/r/union.result

  • Committer: Lee Bieber
  • Date: 2011-02-12 05:43:48 UTC
  • mfrom: (2155.6.1 timestamp)
  • Revision ID: kalebral@gmail.com-20110212054348-abdusxb151j5n2b4
Merge Brian - fixes for union

Show diffs side-by-side

added added

removed removed

Lines of Context:
539
539
select * from t1;
540
540
a
541
541
a
 
542
aa
542
543
show create table t1;
543
544
Table   Create Table
544
545
t1      CREATE TABLE `t1` (
545
 
  `a` VARCHAR(1) COLLATE utf8_general_ci NOT NULL DEFAULT ''
 
546
  `a` VARCHAR(2) COLLATE utf8_general_ci NOT NULL DEFAULT ''
546
547
) ENGINE=DEFAULT COLLATE = utf8_general_ci
547
548
drop table t1;
548
549
create table t1 SELECT 12 as a UNION select "aa" as a;
553
554
show create table t1;
554
555
Table   Create Table
555
556
t1      CREATE TABLE `t1` (
556
 
  `a` VARBINARY(4) NOT NULL DEFAULT ''
 
557
  `a` VARBINARY(8) NOT NULL DEFAULT ''
557
558
) ENGINE=DEFAULT COLLATE = utf8_general_ci
558
559
drop table t1;
559
560
create table t1 SELECT 12 as a UNION select 12.2 as a;
665
666
show create table t1;
666
667
Table   Create Table
667
668
t1      CREATE TABLE `t1` (
668
 
  `dt` VARBINARY(19) DEFAULT NULL
 
669
  `dt` VARBINARY(40) DEFAULT NULL
669
670
) ENGINE=DEFAULT COLLATE = utf8_general_ci
670
671
drop table t1;
671
672
create table t1 SELECT dt from t2 UNION select sv from t2;
765
766
show create table t1;
766
767
Table   Create Table
767
768
t1      CREATE TABLE `t1` (
768
 
  `test` VARCHAR(4) COLLATE utf8_general_ci NOT NULL DEFAULT ''
 
769
  `test` VARCHAR(5) COLLATE utf8_general_ci NOT NULL DEFAULT ''
769
770
) ENGINE=DEFAULT COLLATE = utf8_general_ci
770
771
drop table t1;
771
772
create table t1 (s char(200));
1195
1196
show create table t2;
1196
1197
Table   Create Table
1197
1198
t2      CREATE TABLE `t2` (
1198
 
  `a` VARCHAR(5) COLLATE utf8_general_ci DEFAULT NULL
 
1199
  `a` VARCHAR(12) COLLATE utf8_general_ci DEFAULT NULL
1199
1200
) ENGINE=DEFAULT COLLATE = utf8_general_ci
1200
1201
select row_format from data_dictionary.TABLES where table_schema="test" and table_name="t2";
1201
1202
row_format
1203
1204
show create table t2;
1204
1205
Table   Create Table
1205
1206
t2      CREATE TABLE `t2` (
1206
 
  `a` VARCHAR(5) COLLATE utf8_general_ci DEFAULT NULL
 
1207
  `a` VARCHAR(12) COLLATE utf8_general_ci DEFAULT NULL
1207
1208
) ENGINE=DEFAULT COLLATE = utf8_general_ci
1208
1209
drop table t1,t2;
1209
1210
CREATE TABLE t1 (a mediumtext);
1358
1359
select '12' union select '12345';
1359
1360
12
1360
1361
12
 
1362
12345
1361
1363
CREATE TABLE t1 (a int);
1362
1364
INSERT INTO t1 VALUES (3),(1),(2),(4),(1);
1363
1365
SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a) AS test;