summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 4df4b4d257d..f355f2c7760 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -3520,7 +3520,7 @@ double get_column_range_cardinality(Field *field,
{
double sel, min_mp_pos, max_mp_pos;
- if (min_endp && !min_endp->key[0])
+ if (min_endp && !(field->null_ptr && min_endp->key[0]))
{
store_key_image_to_rec(field, (uchar *) min_endp->key,
min_endp->length);