summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2017-06-22 00:41:44 -0700
committerIgor Babaev <igor@askmonty.org>2017-06-22 22:06:03 -0700
commit9f3622191df074d9f4e512320effe86f06b250fb (patch)
tree16aadc76e982cb17349df79a381af23fec27b2f8 /sql/table.cc
parenta8131e71f9504a7399bc9a7f312b14ed6700d099 (diff)
downloadmariadb-git-9f3622191df074d9f4e512320effe86f06b250fb.tar.gz
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.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/table.cc b/sql/table.cc
index a856799ddd5..28fa34c5ad7 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -8128,8 +8128,7 @@ void TABLE_LIST::check_pushable_cond_for_table(Item *cond)
item->clear_extraction_flag();
}
}
- else if (cond->walk(&Item::exclusive_dependence_on_table_processor,
- 0, (void *) &tab_map))
+ else if (!cond->excl_dep_on_table(tab_map))
cond->set_extraction_flag(NO_EXTRACTION_FL);
}