mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
This commit is contained in:
@@ -83,10 +83,10 @@ a b
|
||||
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b;
|
||||
ERROR 42000: Table 't1' from one of the SELECTs cannot be used in global ORDER clause
|
||||
explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
|
||||
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
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL Using filesort
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
|
||||
2 UNION t2 ALL NULL NULL NULL NULL 4 100.00 Using filesort
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
|
||||
Warnings:
|
||||
Note 1003 (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` limit 2) union all (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`a` limit 1) order by `b` desc
|
||||
(select sql_calc_found_rows a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 2;
|
||||
@@ -475,10 +475,10 @@ create table t2 (a int not null primary key auto_increment, b int);
|
||||
insert into t1 (b) values (1),(2),(2),(3);
|
||||
insert into t2 (b) values (10),(11),(12),(13);
|
||||
explain extended (select * from t1 where a=1) union (select * from t2 where a=1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
|
||||
2 UNION t2 const PRIMARY PRIMARY 4 const 1
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 100.00
|
||||
2 UNION t2 const PRIMARY PRIMARY 4 const 1 100.00
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
|
||||
Warnings:
|
||||
Note 1003 (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a` = 1)) union (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` = 1))
|
||||
(select * from t1 where a=5) union (select * from t2 where a=1);
|
||||
@@ -500,7 +500,7 @@ explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index
|
||||
2 UNION t2 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
|
||||
2 UNION t2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
|
||||
explain (select * from t1 where a=1) union (select * from t1 where b=1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
||||
Reference in New Issue
Block a user