diff options
author | Evgeny Potemkin <epotemkin@mysql.com> | 2009-10-19 15:13:26 +0400 |
---|---|---|
committer | Evgeny Potemkin <epotemkin@mysql.com> | 2009-10-19 15:13:26 +0400 |
commit | 60fc8507bdcc203cc77709d44279efd0bd79f0eb (patch) | |
tree | 94084ca09596e61d7aca98f810ee34d4e4ee67b3 /mysql-test/r/subselect3.result | |
parent | 3c557833205a44e08b72d47db53054562907cc78 (diff) | |
download | mariadb-git-60fc8507bdcc203cc77709d44279efd0bd79f0eb.tar.gz |
Bug#30302: Tables that were optimized away are printed in the
EXPLAIN EXTENDED warning.
Query optimizer searches for the constant tables and optimizes them away. This
means that fields of such tables are substituted for their values and on later
phases they are treated as constants. After this constant tables are removed
from the query execution plan. Nevertheless constant tables were shown in
the EXPLAIN EXTENDED warning thus producing query that might be not an
equivalent of the original query.
Now the print_join function skips all tables that were optimized away from
printing to the EXPLAIN EXTENDED warning. If all tables were optimized away it
produces the 'FROM dual' clause.
mysql-test/r/explain.result:
A test case added for the bug#30302.
mysql-test/r/func_default.result:
Adjusted test case result after fix for the bug#30302.
mysql-test/r/func_regexp.result:
Adjusted test case result after fix for the bug#30302.
mysql-test/r/func_test.result:
Adjusted test case result after fix for the bug#30302.
mysql-test/r/having.result:
Adjusted test case result after fix for the bug#30302.
mysql-test/r/select.result:
Adjusted test case result after fix for the bug#30302.
mysql-test/r/subselect.result:
Adjusted test case result after fix for the bug#30302.
mysql-test/r/subselect3.result:
Adjusted test case result after fix for the bug#30302.
mysql-test/r/type_datetime.result:
Adjusted test case result after fix for the bug#30302.
mysql-test/t/explain.test:
A test case added for the bug#30302.
sql/sql_select.cc:
Bug#30302: Tables that were optimized away are printed in the
EXPLAIN EXTENDED warning.
Now the print_join function skips all tables that were optimized away from
printing to the EXPLAIN EXTENDED warning. If all tables were optimized away it
produces the 'FROM dual' clause.
sql/table.h:
Adjusted test case result after fix for the bug#30302.
The optimized_away flag is added to the TABLE_LIST struct.
Diffstat (limited to 'mysql-test/r/subselect3.result')
-rw-r--r-- | mysql-test/r/subselect3.result | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index f055b40116a..f20ae6a31be 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -864,7 +864,7 @@ Level Code Message Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2 Note 1276 Field or reference 'test.t1.c' of SELECT #3 was resolved in SELECT #2 Error 1054 Unknown column 'c' in 'field list' -Note 1003 select `c` AS `c` from (select (select count(`test`.`t1`.`a`) AS `COUNT(a)` from (select count(`test`.`t1`.`b`) AS `COUNT(b)` from `test`.`t1`) `x` group by `c`) AS `(SELECT COUNT(a) FROM +Note 1003 select `c` AS `c` from (select (select count(`test`.`t1`.`a`) AS `COUNT(a)` from dual group by `c`) AS `(SELECT COUNT(a) FROM (SELECT COUNT(b) FROM t1) AS x GROUP BY c )` from `test`.`t1` group by `test`.`t1`.`b`) `y` DROP TABLE t1; |