summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2013-04-06 12:33:38 -0700
committerIgor Babaev <igor@askmonty.org>2013-04-06 12:33:38 -0700
commit1c30fb2a156b9c510e1829108bc8db71dcea3d43 (patch)
tree5d8d758dc8a8b72601e56ca287309e86391e4be5 /sql/opt_range.cc
parentb2d0a33ea04a5eb20124667ea277fe78eb981a90 (diff)
downloadmariadb-git-1c30fb2a156b9c510e1829108bc8db71dcea3d43.tar.gz
Fixed bug mdev-4372.
Range analysis of non-indexed columns should handle properly range trees with type == SEL_TREE::MAYBE.
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 215c85cbdf5..035ea3635e2 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3368,7 +3368,12 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond)
rows= 0;
table->reginfo.impossible_range= 1;
goto free_alloc;
- }
+ }
+ else if (tree->type == SEL_TREE::MAYBE)
+ {
+ rows= table_records;
+ goto free_alloc;
+ }
for (key= tree->keys, end= key + param.keys; key != end; key++, idx++)
{