1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for the optimiser problem caused by the fact that with derived

tables one (or more tables) is opened / closed twice.
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2003-05-31 18:31:57 +03:00
parent 8d52377a5c
commit 90b6af3da0
2 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,7 @@ a t
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 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
2 DERIVED tt1 index NULL a 4 NULL 10000 Using index
2 DERIVED tt1 ALL NULL NULL NULL NULL 10000
drop table t1;
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b;
(SELECT * FROM (SELECT 1 as a) as a )