~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/union.test

  • Committer: Monty Taylor
  • Date: 2010-12-26 03:15:44 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101226031544-1cf3raipu53fnmyj
Through page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
--replace_column 9 #
40
40
explain select a,b from t1 union all select a,b from t2;
41
41
 
42
 
--error ER_BAD_FIELD_ERROR
 
42
--error  1054
43
43
explain select xx from t1 union select 1;
44
44
--error ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT
45
45
explain select a,b from t1 union select 1;
316
316
insert into t2 (group_name) values ('Group A');
317
317
insert into t2 (group_name) values ('Group B');
318
318
insert into t3 (user_id, group_id) values (1,1);
319
 
select 1 'is_in_group', a.user_name, c.group_name, b.id from t1 a, t3 b, t2 c where a.id = b.user_id and b.group_id = c.id UNION  select 0 'is_in_group', a.user_name, c.group_name, null from t1 a CROSS JOIN t2 c;
 
319
select 1 'is_in_group', a.user_name, c.group_name, b.id from t1 a, t3 b, t2 c where a.id = b.user_id and b.group_id = c.id UNION  select 0 'is_in_group', a.user_name, c.group_name, null from t1 a, t2 c;
320
320
drop table t3, t1, t2;
321
321
 
322
322
#
436
436
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
437
437
show create table t1;
438
438
drop table t1;
439
 
--error ER_BAD_FIELD_ERROR
 
439
-- error 1054
440
440
create table t1 select _latin1"test" union select _latin1"testt" ;
441
 
--error ER_BAD_FIELD_ERROR
 
441
-- error 1054
442
442
create table t1 select _utf8"test" union select _utf8"testt" ;
443
443
create table t1 select "test" union select "testt" ;
444
444
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
748
748
select concat('a', 'b' collate utf8_bin);
749
749
create table t1 (foo varchar(100)) collate=utf8_bin;
750
750
insert into t1 (foo) values ("foo");
751
 
--error ER_TABLE_UNKNOWN
 
751
--error ER_NO_SUCH_TABLE
752
752
select foo from t1 union select 'bar' as foo from dual;
753
753
select foo from t1 union select 'bar' as foo;
754
754
drop table t1;