summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index d41d6f7568a..30d796c7688 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3460,6 +3460,11 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond)
table->reginfo.impossible_range= 1;
goto free_alloc;
}
+ else if (tree->type == SEL_TREE::ALWAYS)
+ {
+ rows= table_records;
+ goto free_alloc;
+ }
else if (tree->type == SEL_TREE::MAYBE)
{
rows= table_records;