diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2002-12-12 16:09:06 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2002-12-12 16:09:06 +0200 |
commit | 657b311206e5230e540845fedbb388a683d0e917 (patch) | |
tree | 92a456da0a6fe604493cc93e3cfbb89268ca086e /mysql-test/r/derived.result | |
parent | 62ce900c2e116627b05a611e6ad03698b6b18a3b (diff) | |
download | mariadb-git-657b311206e5230e540845fedbb388a683d0e917.tar.gz |
derived tables with UNION's ...
Scrum task !!!!!
mysql-test/r/analyse.result:
reverting a fix
mysql-test/r/derived.result:
derived tables with UNION's ...
mysql-test/t/analyse.test:
reverting a fix
mysql-test/t/derived.test:
derived tables with UNION's ...
sql/mysql_priv.h:
derived tables with UNION's ...
sql/sql_analyse.cc:
reverting a fix
sql/sql_derived.cc:
derived tables with UNION's ...
sql/sql_lex.cc:
derived tables with UNION's ...
sql/sql_select.cc:
derived tables with UNION's ...
sql/sql_union.cc:
derived tables with UNION's ...
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r-- | mysql-test/r/derived.result | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 95640e69d8b..94977b4f2f0 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -63,6 +63,31 @@ a select 1 from (select 1) as a; 1 1 +select * from (select * from t1 union select * from t1) a; +a b +1 a +2 b +3 c +select * from (select * from t1 union all select * from t1) a; +a b +1 a +2 b +3 c +3 c +1 a +2 b +3 c +3 c +explain select * from (select * from t1 union select * from t1) a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 +2 DERIVED t1 ALL NULL NULL NULL NULL 4 +3 UNION t1 ALL NULL NULL NULL NULL 4 +explain select * from (select * from t1 union all select * from t1) a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 8 +2 DERIVED t1 ALL NULL NULL NULL NULL 4 +3 UNION t1 ALL NULL NULL NULL NULL 4 drop table if exists t1; create table t1(a int not null, t char(8), index(a)); SELECT * FROM (SELECT * FROM t1) as b ORDER BY a ASC LIMIT 0,20; |