From 9f3622191df074d9f4e512320effe86f06b250fb Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Thu, 22 Jun 2017 00:41:44 -0700 Subject: Fixed the bug mdev-12845. This patch fills in a serious flaw in the code that supports condition pushdown into materialized views / derived tables. If a predicate happened to contain a reference to a mergeable view / derived table and it does not depended directly on the target materialized view / derived table then the predicate was not considered as a subject to pusdown to this view / derived table. --- mysql-test/r/derived.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r/derived.result') diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 8a7422ba5ec..722ff76e556 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -554,7 +554,7 @@ EXPLAIN SELECT * FROM (SELECT * FROM t1) AS table1, id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 1 PRIMARY ref key0 key0 5 const 0 -3 DERIVED t2 ALL NULL NULL NULL NULL 2 Using temporary +3 DERIVED t2 ALL NULL NULL NULL NULL 2 Using where; Using temporary Warnings: Note 1249 Select 4 was reduced during optimization DROP TABLE t1, t2; -- cgit v1.2.1