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" ;