diff options
author | Igor Babaev <igor@askmonty.org> | 2011-06-06 12:19:35 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-06-06 12:19:35 -0700 |
commit | db0c3406011d9a6d6fdb98c1c1f7925d243bd1f9 (patch) | |
tree | 7288647c4e707fffc4362f4c71198c99be828231 /mysql-test/suite | |
parent | 3bf08e549a78ad12191f6b1ca49719bc667664ef (diff) | |
download | mariadb-git-db0c3406011d9a6d6fdb98c1c1f7925d243bd1f9.tar.gz |
Fixed LP bug #793436.
When looking for the execution plan of a derived table to be materialized
JOIN::optimize finds out that all joined tables of the derived table
contain not more than one row then the derived table should be maretialized
at the optimization stage.
Added a test case for the bug.
Adjusted results in other test cases.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/pbxt/r/subselect.result | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/suite/pbxt/r/subselect.result b/mysql-test/suite/pbxt/r/subselect.result index e91e720c6dd..e183cf389c0 100644 --- a/mysql-test/suite/pbxt/r/subselect.result +++ b/mysql-test/suite/pbxt/r/subselect.result @@ -44,13 +44,13 @@ SELECT (SELECT a) as a; ERROR 42S22: Reference 'a' not supported (forward reference in item list) EXPLAIN EXTENDED SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00 3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used 2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1 Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1 -Note 1003 select 1 AS `1` from (select 1 AS `a`) `b` having (<expr_cache><`b`.`a`>((select `b`.`a`)) = 1) +Note 1003 select 1 AS `1` from (select 1 AS `a`) `b` having (<expr_cache><1>((select 1)) = 1) SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; 1 1 |