mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge with 4.0.14
This commit is contained in:
@ -90,6 +90,13 @@ explain (select a,b from t1 limit 2) union all (select a,b from t2 order by a l
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
|
||||
2 UNION t2 ALL NULL NULL NULL NULL 4 Using filesort
|
||||
select sql_calc_found_rows a,b from t1 union all select a,b from t2 limit 2;
|
||||
a b
|
||||
1 a
|
||||
2 b
|
||||
select found_rows();
|
||||
found_rows()
|
||||
6
|
||||
explain select a,b from t1 union all select a,b from t2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
|
||||
@ -269,6 +276,35 @@ uid rl g1 cid gg
|
||||
uid rl g1 cid gg
|
||||
1 NULL V1 NULL 1
|
||||
drop table t1,t2,t3,t4,t5,t6;
|
||||
CREATE TABLE t1 (a int not null, b char (10) not null);
|
||||
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
|
||||
CREATE TABLE t2 (a int not null, b char (10) not null);
|
||||
insert into t2 values (3,'c'),(4,'d'),(5,'f'),(6,'e');
|
||||
create table t3 select a,b from t1 union select a,b from t2;
|
||||
create table t4 (select a,b from t1) union (select a,b from t2) limit 2;
|
||||
insert into t4 select a,b from t1 union select a,b from t2;
|
||||
insert into t3 (select a,b from t1) union (select a,b from t2) limit 2;
|
||||
select * from t3;
|
||||
a b
|
||||
1 a
|
||||
2 b
|
||||
3 c
|
||||
4 d
|
||||
5 f
|
||||
6 e
|
||||
1 a
|
||||
2 b
|
||||
select * from t4;
|
||||
a b
|
||||
1 a
|
||||
2 b
|
||||
1 a
|
||||
2 b
|
||||
3 c
|
||||
4 d
|
||||
5 f
|
||||
6 e
|
||||
drop table t1,t2,t3,t4;
|
||||
CREATE TABLE t1 ( id int(3) unsigned default '0') TYPE=MyISAM;
|
||||
INSERT INTO t1 (id) VALUES("1");
|
||||
CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) TYPE=MyISAM;
|
||||
|
Reference in New Issue
Block a user