summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 41c8a3b0121..11939793158 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -9081,6 +9081,11 @@ uint check_join_cache_usage(JOIN_TAB *tab,
case JT_EQ_REF:
if (cache_level <=2 || (no_hashed_cache && no_bka_cache))
goto no_join_cache;
+ for (uint i= 0; i < tab->ref.key_parts; i++)
+ {
+ if (tab->ref.cond_guards[i])
+ goto no_join_cache;
+ }
if (!tab->is_ref_for_hash_join())
{
flags= HA_MRR_NO_NULL_ENDPOINTS | HA_MRR_SINGLE_POINT;