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.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 7361c8443c4..c2979f97e80 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3545,9 +3545,11 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
break;
bitmap_set_bit(&handled_columns, key_part->fieldnr-1);
}
- double selectivity_mult;
if (i)
{
+ double selectivity_mult;
+ UNINIT_VAR(selectivity_mult);
+
/*
There is at least 1-column prefix of columns whose selectivity has
not yet been accounted for.