diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2002-11-30 19:53:31 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2002-11-30 19:53:31 +0200 |
commit | b790bc24d81856d896231c42e3c7e259933cb1e7 (patch) | |
tree | cba8ea432e644376637cbf2fa6247440d696cd0b /mysql-test/r/derived.result | |
parent | b49669266301cb28b7ffa6f355ef9a3fb483c09e (diff) | |
download | mariadb-git-b790bc24d81856d896231c42e3c7e259933cb1e7.tar.gz |
some bug fixes and tests for those.
I am pushing now, because :
* I have a fix for crashing bug
* Sanja will destroy my changes in sub-select test ... ;)
mysql-test/r/derived.result:
tests for recent bugs
mysql-test/r/subselect.result:
tests for recent bugs
mysql-test/t/derived.test:
tests for recent bugs
mysql-test/t/subselect.test:
tests for recent bugs
sql/sql_derived.cc:
Luckily, we have `make test` so that my last changes could be re-checked
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r-- | mysql-test/r/derived.result | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 0dce2b50819..95640e69d8b 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -30,6 +30,29 @@ SELECT 1 FROM (SELECT 1) a WHERE a=2; Unknown column 'a' in 'where clause' SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1) as a; Unknown column 'a' in 'having clause' +select * from t1 as x1, (select * from t1) as x2; +a b a b +1 a 1 a +2 b 1 a +3 c 1 a +3 c 1 a +1 a 2 b +2 b 2 b +3 c 2 b +3 c 2 b +1 a 3 c +2 b 3 c +3 c 3 c +3 c 3 c +1 a 3 c +2 b 3 c +3 c 3 c +3 c 3 c +explain select * from t1 as x1, (select * from t1) as x2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY x1 ALL NULL NULL NULL NULL 4 +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 +2 DERIVED x1 ALL NULL NULL NULL NULL 4 drop table if exists t1.t2,t3; select * from (select 1) as a; 1 @@ -66,7 +89,8 @@ a t 20 20 explain select count(*) from t1 as tt1, (select * from t1) as tt2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE Select tables optimized away +1 PRIMARY Select tables optimized away +2 DERIVED tt1 index NULL a 4 NULL 10000 Using index drop table if exists t1; SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b; (SELECT * FROM (SELECT 1 as a) as a ) |